id stringlengths 7 14 | test_class dict | test_case dict | focal_class dict | focal_method dict | repository dict |
|---|---|---|---|---|---|
35680131_173 | {
"fields": [
{
"declarator": "factory = new DefaultConverterFactory()",
"modifier": "private final",
"original_string": "private final ConverterFactory factory = new DefaultConverterFactory();",
"type": "ConverterFactory",
"var_name": "factory"
}
],
"file": "corc-core/src/te... | {
"body": "@Test\n public void intJava() throws UnexpectedTypeException {\n Converter converter = factory.newConverter(PrimitiveObjectInspectorFactory.javaIntObjectInspector);\n assertThat(converter.toJavaObject(new IntWritable(1)), is((Object) 1));\n }",
"class_method_signature": "DefaultConverterFactoryTe... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
}
],
"file": "corc-core/src/main/java/com/hotels/corc/DefaultConver... | {
"body": "@Override\n public Converter newConverter(ObjectInspector inspector) {\n switch (inspector.getCategory()) {\n case PRIMITIVE:\n switch (((PrimitiveObjectInspector) inspector).getPrimitiveCategory()) {\n case STRING:\n return new StringConverter();\n case BOOLEAN:\n retur... | {
"created": null,
"fork": null,
"fork_count": 7,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 35680131,
"size": 282,
"stargazer_count": 13,
"stars": null,
"updates": null,
"url": "https://github.com/HotelsDotCom/corc"
} |
35680131_53 | {
"fields": [
{
"declarator": "COL0 = \"col0\"",
"modifier": "private static final",
"original_string": "private static final String COL0 = \"col0\";",
"type": "String",
"var_name": "COL0"
},
{
"declarator": "COL1 = \"col1\"",
"modifier": "private static final",
... | {
"body": "@Test\n public void lessThanIsLessThanIsTrue() throws IOException {\n when(corc.getWritable(COL0)).thenReturn(ZERO_WRITABLE);\n SearchArgument searchArgument = builder.startAnd().lessThan(COL0,PredicateLeaf.Type.LONG, ONE).end().build();\n assertThat(new SearchArgumentFilter(searchArgument, struc... | {
"fields": [
{
"declarator": "searchArgument",
"modifier": "private final",
"original_string": "private final SearchArgument searchArgument;",
"type": "SearchArgument",
"var_name": "searchArgument"
},
{
"declarator": "evaluators",
"modifier": "private final",
... | {
"body": "@Override\n public boolean accept(Corc corc) throws IOException {\n TruthValue[] truthValues = new TruthValue[evaluators.size()];\n for (int i = 0; i < evaluators.size(); i++) {\n truthValues[i] = evaluators.get(i).evaluate(corc);\n }\n TruthValue truthValue = searchArgument.evaluate(trut... | {
"created": null,
"fork": null,
"fork_count": 7,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 35680131,
"size": 282,
"stargazer_count": 13,
"stars": null,
"updates": null,
"url": "https://github.com/HotelsDotCom/corc"
} |
35680131_124 | {
"fields": [
{
"declarator": "COL0 = \"col0\"",
"modifier": "private static final",
"original_string": "private static final String COL0 = \"col0\";",
"type": "String",
"var_name": "COL0"
},
{
"declarator": "ZERO = new LongWritable(0L)",
"modifier": "private stat... | {
"body": "@Test\n public void equalsMax() {\n when(corc.getWritable(COL0)).thenReturn(THREE);\n assertThat(evaluator.evaluate(corc), is(TruthValue.YES));\n }",
"class_method_signature": "BetweenEvaluatorTest.equalsMax()",
"constructor": false,
"full_signature": "@Test public void equalsMax()",
"ident... | {
"fields": [
{
"declarator": "minLiteral",
"modifier": "private final",
"original_string": "private final Comparable<T> minLiteral;",
"type": "Comparable<T>",
"var_name": "minLiteral"
},
{
"declarator": "maxLiteral",
"modifier": "private final",
"original_s... | {
"body": "@Override\n protected TruthValue evaluate(T value) {\n if (value == null) {\n return TruthValue.NULL;\n }\n int minCompare = minLiteral.compareTo(value);\n int maxCompare = maxLiteral.compareTo(value);\n if (minCompare <= 0 && maxCompare >= 0) {\n return TruthValue.YES;\n }\n ... | {
"created": null,
"fork": null,
"fork_count": 7,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 35680131,
"size": 282,
"stargazer_count": 13,
"stars": null,
"updates": null,
"url": "https://github.com/HotelsDotCom/corc"
} |
35680131_90 | {
"fields": [
{
"declarator": "COL0 = \"col0\"",
"modifier": "private static final",
"original_string": "private static final String COL0 = \"col0\";",
"type": "String",
"var_name": "COL0"
},
{
"declarator": "predicateLeaf",
"modifier": "@Mock\n private",
"... | {
"body": "@Test\n public void stringBetween() {\n when(predicateLeaf.getColumnName()).thenReturn(COL0);\n when(predicateLeaf.getOperator()).thenReturn(Operator.BETWEEN);\n when(predicateLeaf.getLiteralList()).thenReturn(Arrays.asList((Object) \"foo\", \"bar\"));\n\n StructTypeInfo structTypeInfo = new S... | {
"fields": [
{
"declarator": "structTypeInfo",
"modifier": "private final",
"original_string": "private final StructTypeInfo structTypeInfo;",
"type": "StructTypeInfo",
"var_name": "structTypeInfo"
}
],
"file": "corc-core/src/main/java/com/hotels/corc/sarg/EvaluatorFactory.j... | {
"body": "Evaluator<?> newInstance(PredicateLeaf predicateLeaf) {\n TypeInfo typeInfo = structTypeInfo.getStructFieldTypeInfo(predicateLeaf.getColumnName());\n if (typeInfo.getCategory() != Category.PRIMITIVE) {\n throw new IllegalArgumentException(\"Unsupported column type: \" + typeInfo.getCategory());\... | {
"created": null,
"fork": null,
"fork_count": 7,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 35680131,
"size": 282,
"stargazer_count": 13,
"stars": null,
"updates": null,
"url": "https://github.com/HotelsDotCom/corc"
} |
35680131_108 | {
"fields": [
{
"declarator": "COL0 = \"col0\"",
"modifier": "private static final",
"original_string": "private static final String COL0 = \"col0\";",
"type": "String",
"var_name": "COL0"
},
{
"declarator": "predicateLeaf",
"modifier": "@Mock\n private",
"... | {
"body": "@SuppressWarnings(\"rawtypes\")\n @Test(expected = IllegalArgumentException.class)\n public void unsupportedDateType() {\n assertThat(toComparable(DATE, new Long(0L)), is((Comparable) new DateWritable(new Date(0L))));\n }",
"class_method_signature": "EvaluatorFactoryTest.unsupportedDateType()",
"... | {
"fields": [
{
"declarator": "structTypeInfo",
"modifier": "private final",
"original_string": "private final StructTypeInfo structTypeInfo;",
"type": "StructTypeInfo",
"var_name": "structTypeInfo"
}
],
"file": "corc-core/src/main/java/com/hotels/corc/sarg/EvaluatorFactory.j... | {
"body": "static Comparable<?> toComparable(PrimitiveCategory category, Object literal) {\n String stringLiteral;\n switch (category) {\n case STRING:\n return new Text((String) literal);\n case BOOLEAN:\n return new BooleanWritable((Boolean) literal);\n case BYTE:\n return new ByteWrit... | {
"created": null,
"fork": null,
"fork_count": 7,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 35680131,
"size": 282,
"stargazer_count": 13,
"stars": null,
"updates": null,
"url": "https://github.com/HotelsDotCom/corc"
} |
35680131_28 | {
"fields": [
{
"declarator": "COL0 = \"col0\"",
"modifier": "private static final",
"original_string": "private static final String COL0 = \"col0\";",
"type": "String",
"var_name": "COL0"
},
{
"declarator": "COL1 = \"col1\"",
"modifier": "private static final",
... | {
"body": "@Test\n public void notNullSafeEqualsIsTrue() throws IOException {\n when(corc.getWritable(COL0)).thenReturn(ZERO_WRITABLE);\n SearchArgument searchArgument = builder.startNot().nullSafeEquals(COL0,PredicateLeaf.Type.LONG, ONE).end().build();\n assertThat(new SearchArgumentFilter(searchArgument, ... | {
"fields": [
{
"declarator": "searchArgument",
"modifier": "private final",
"original_string": "private final SearchArgument searchArgument;",
"type": "SearchArgument",
"var_name": "searchArgument"
},
{
"declarator": "evaluators",
"modifier": "private final",
... | {
"body": "@Override\n public boolean accept(Corc corc) throws IOException {\n TruthValue[] truthValues = new TruthValue[evaluators.size()];\n for (int i = 0; i < evaluators.size(); i++) {\n truthValues[i] = evaluators.get(i).evaluate(corc);\n }\n TruthValue truthValue = searchArgument.evaluate(trut... | {
"created": null,
"fork": null,
"fork_count": 7,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 35680131,
"size": 282,
"stargazer_count": 13,
"stars": null,
"updates": null,
"url": "https://github.com/HotelsDotCom/corc"
} |
35680131_221 | {
"fields": [
{
"declarator": "ONE = new Fields(\"A\", Integer.class)",
"modifier": "private static final",
"original_string": "private static final Fields ONE = new Fields(\"A\", Integer.class);",
"type": "Fields",
"var_name": "ONE"
},
{
"declarator": "TWO = new Fields... | {
"body": "@Test\n public void builderFactoryMethod() {\n SearchArgument kryoFromFields = SearchArgumentFactory\n .newBuilder()\n .startAnd()\n .equals(new Fields(\"a\", String.class), \"hello\")\n .end()\n .build();\n String kryoFields = CorcInputFormat.toKryo(kryoFromFields... | {
"fields": [],
"file": "corc-cascading/src/main/java/com/hotels/corc/cascading/SearchArgumentFactory.java",
"identifier": "SearchArgumentFactory",
"interfaces": "",
"methods": [
{
"class_method_signature": "SearchArgumentFactory.newBuilder()",
"constructor": false,
"full_signature": "pu... | {
"body": "public static SearchArgumentFactory.Builder newBuilder() {\n org.apache.hadoop.hive.ql.io.sarg.SearchArgument.Builder internalBuilder = org.apache.hadoop.hive.ql.io.sarg.SearchArgumentFactory\n .newBuilder();\n return new Builder(internalBuilder);\n }",
"class_method_signature": "SearchArgu... | {
"created": null,
"fork": null,
"fork_count": 7,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 35680131,
"size": 282,
"stargazer_count": 13,
"stars": null,
"updates": null,
"url": "https://github.com/HotelsDotCom/corc"
} |
35680131_149 | {
"fields": [
{
"declarator": "temporaryFolder = new TemporaryFolder()",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final TemporaryFolder temporaryFolder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "temporaryFolder"
},
{
... | {
"body": "@Test\n public void setInputReadColumnProjection() {\n StructTypeInfo typeInfo = new StructTypeInfoBuilder()\n .add(\"a\", TypeInfoFactory.stringTypeInfo)\n .add(\"b\", TypeInfoFactory.longTypeInfo)\n .build();\n\n conf.set(CorcInputFormat.INPUT_TYPE_INFO, \"struct<a:string>\");... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(CorcInputFormat.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(CorcInputFormat.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"de... | {
"body": "static void setReadColumns(Configuration conf, StructTypeInfo actualStructTypeInfo) {\n StructTypeInfo readStructTypeInfo = getTypeInfo(conf);\n LOG.info(\"Read StructTypeInfo: {}\", readStructTypeInfo);\n\n List<Integer> ids = new ArrayList<>();\n List<String> names = new ArrayList<>();\n\n ... | {
"created": null,
"fork": null,
"fork_count": 7,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 35680131,
"size": 282,
"stargazer_count": 13,
"stars": null,
"updates": null,
"url": "https://github.com/HotelsDotCom/corc"
} |
35680131_86 | {
"fields": [
{
"declarator": "COL0 = \"col0\"",
"modifier": "private static final",
"original_string": "private static final String COL0 = \"col0\";",
"type": "String",
"var_name": "COL0"
},
{
"declarator": "predicateLeaf",
"modifier": "@Mock\n private",
"... | {
"body": "@Test\n public void stringNullSafeEquals() {\n when(predicateLeaf.getColumnName()).thenReturn(COL0);\n when(predicateLeaf.getOperator()).thenReturn(Operator.NULL_SAFE_EQUALS);\n when(predicateLeaf.getLiteral()).thenReturn(\"foo\");\n\n StructTypeInfo structTypeInfo = new StructTypeInfoBuilder(... | {
"fields": [
{
"declarator": "structTypeInfo",
"modifier": "private final",
"original_string": "private final StructTypeInfo structTypeInfo;",
"type": "StructTypeInfo",
"var_name": "structTypeInfo"
}
],
"file": "corc-core/src/main/java/com/hotels/corc/sarg/EvaluatorFactory.j... | {
"body": "Evaluator<?> newInstance(PredicateLeaf predicateLeaf) {\n TypeInfo typeInfo = structTypeInfo.getStructFieldTypeInfo(predicateLeaf.getColumnName());\n if (typeInfo.getCategory() != Category.PRIMITIVE) {\n throw new IllegalArgumentException(\"Unsupported column type: \" + typeInfo.getCategory());\... | {
"created": null,
"fork": null,
"fork_count": 7,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 35680131,
"size": 282,
"stargazer_count": 13,
"stars": null,
"updates": null,
"url": "https://github.com/HotelsDotCom/corc"
} |
35680131_69 | {
"fields": [
{
"declarator": "COL0 = \"col0\"",
"modifier": "private static final",
"original_string": "private static final String COL0 = \"col0\";",
"type": "String",
"var_name": "COL0"
},
{
"declarator": "COL1 = \"col1\"",
"modifier": "private static final",
... | {
"body": "@Test\n public void orEqualsIsFalse() throws IOException {\n when(corc.getWritable(COL0)).thenReturn(ZERO_WRITABLE);\n when(corc.getWritable(COL1)).thenReturn(ZERO_WRITABLE);\n SearchArgument searchArgument = builder.startOr().equals(COL0,PredicateLeaf.Type.LONG, ONE).equals(COL1,PredicateLeaf.Ty... | {
"fields": [
{
"declarator": "searchArgument",
"modifier": "private final",
"original_string": "private final SearchArgument searchArgument;",
"type": "SearchArgument",
"var_name": "searchArgument"
},
{
"declarator": "evaluators",
"modifier": "private final",
... | {
"body": "@Override\n public boolean accept(Corc corc) throws IOException {\n TruthValue[] truthValues = new TruthValue[evaluators.size()];\n for (int i = 0; i < evaluators.size(); i++) {\n truthValues[i] = evaluators.get(i).evaluate(corc);\n }\n TruthValue truthValue = searchArgument.evaluate(trut... | {
"created": null,
"fork": null,
"fork_count": 7,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 35680131,
"size": 282,
"stargazer_count": 13,
"stars": null,
"updates": null,
"url": "https://github.com/HotelsDotCom/corc"
} |
35680131_217 | {
"fields": [
{
"declarator": "FIELD_A = new Fields(\"A\", String.class)",
"modifier": "private static final",
"original_string": "private static final Fields FIELD_A = new Fields(\"A\", String.class);",
"type": "Fields",
"var_name": "FIELD_A"
},
{
"declarator": "FIELD_... | {
"body": "@Test\n public void readDecimalPredicatePushdown() throws IOException {\n TypeInfo typeInfo = TypeInfoFactory.getDecimalTypeInfo(2, 1);\n\n try (OrcWriter writer = getOrcWriter(typeInfo)) {\n writer.addRow(HiveDecimal.create(\"0.0\"));\n writer.addRow(HiveDecimal.create(\"0.1\"));\n }\n... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "ROW_ID_NAME = VirtualColumn.ROWID.getName... | {
"body": "public static SourceBuilder source() {\n return new SourceBuilder();\n }",
"class_method_signature": "OrcFile.source()",
"constructor": false,
"full_signature": "public static SourceBuilder source()",
"identifier": "source",
"invocations": [],
"modifiers": "public static",
"parameters": "... | {
"created": null,
"fork": null,
"fork_count": 7,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 35680131,
"size": 282,
"stargazer_count": 13,
"stars": null,
"updates": null,
"url": "https://github.com/HotelsDotCom/corc"
} |
35680131_49 | {
"fields": [
{
"declarator": "COL0 = \"col0\"",
"modifier": "private static final",
"original_string": "private static final String COL0 = \"col0\";",
"type": "String",
"var_name": "COL0"
},
{
"declarator": "COL1 = \"col1\"",
"modifier": "private static final",
... | {
"body": "@Test\n public void notBetweenMiddleIsFalse() throws IOException {\n when(corc.getWritable(COL0)).thenReturn(TWO_WRITABLE);\n SearchArgument searchArgument = builder.startNot().between(COL0,PredicateLeaf.Type.LONG, ONE, THREE).end().build();\n assertThat(new SearchArgumentFilter(searchArgument, s... | {
"fields": [
{
"declarator": "searchArgument",
"modifier": "private final",
"original_string": "private final SearchArgument searchArgument;",
"type": "SearchArgument",
"var_name": "searchArgument"
},
{
"declarator": "evaluators",
"modifier": "private final",
... | {
"body": "@Override\n public boolean accept(Corc corc) throws IOException {\n TruthValue[] truthValues = new TruthValue[evaluators.size()];\n for (int i = 0; i < evaluators.size(); i++) {\n truthValues[i] = evaluators.get(i).evaluate(corc);\n }\n TruthValue truthValue = searchArgument.evaluate(trut... | {
"created": null,
"fork": null,
"fork_count": 7,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 35680131,
"size": 282,
"stargazer_count": 13,
"stars": null,
"updates": null,
"url": "https://github.com/HotelsDotCom/corc"
} |
35680131_186 | {
"fields": [
{
"declarator": "factory = new DefaultConverterFactory()",
"modifier": "private final",
"original_string": "private final ConverterFactory factory = new DefaultConverterFactory();",
"type": "ConverterFactory",
"var_name": "factory"
}
],
"file": "corc-core/src/te... | {
"body": "@Test\n public void binaryWritable() throws UnexpectedTypeException {\n Converter converter = factory.newConverter(PrimitiveObjectInspectorFactory.javaByteArrayObjectInspector);\n assertThat(converter.toWritableObject(new byte[] { 0, 1 }), is((Object) new BytesWritable(new byte[] { 0, 1 })));\n }",... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
}
],
"file": "corc-core/src/main/java/com/hotels/corc/DefaultConver... | {
"body": "@Override\n public Converter newConverter(ObjectInspector inspector) {\n switch (inspector.getCategory()) {\n case PRIMITIVE:\n switch (((PrimitiveObjectInspector) inspector).getPrimitiveCategory()) {\n case STRING:\n return new StringConverter();\n case BOOLEAN:\n retur... | {
"created": null,
"fork": null,
"fork_count": 7,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 35680131,
"size": 282,
"stargazer_count": 13,
"stars": null,
"updates": null,
"url": "https://github.com/HotelsDotCom/corc"
} |
35680131_169 | {
"fields": [
{
"declarator": "factory = new DefaultConverterFactory()",
"modifier": "private final",
"original_string": "private final ConverterFactory factory = new DefaultConverterFactory();",
"type": "ConverterFactory",
"var_name": "factory"
}
],
"file": "corc-core/src/te... | {
"body": "@Test\n public void byteJava() throws UnexpectedTypeException {\n Converter converter = factory.newConverter(PrimitiveObjectInspectorFactory.javaByteObjectInspector);\n assertThat(converter.toJavaObject(new ByteWritable((byte) 1)), is((Object) (byte) 1));\n }",
"class_method_signature": "DefaultC... | {
"fields": [
{
"declarator": "serialVersionUID = 1L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1L;",
"type": "long",
"var_name": "serialVersionUID"
}
],
"file": "corc-core/src/main/java/com/hotels/corc/DefaultConver... | {
"body": "@Override\n public Converter newConverter(ObjectInspector inspector) {\n switch (inspector.getCategory()) {\n case PRIMITIVE:\n switch (((PrimitiveObjectInspector) inspector).getPrimitiveCategory()) {\n case STRING:\n return new StringConverter();\n case BOOLEAN:\n retur... | {
"created": null,
"fork": null,
"fork_count": 7,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 35680131,
"size": 282,
"stargazer_count": 13,
"stars": null,
"updates": null,
"url": "https://github.com/HotelsDotCom/corc"
} |
35680131_190 | {
"fields": [],
"file": "corc-cascading/src/test/java/com/hotels/corc/cascading/FieldsTypeUtilsTest.java",
"identifier": "FieldsTypeUtilsTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void doubleToFloatType(){\n Fields fields = new Fields(\"A\", Double.class);\n PredicateLeaf.Type fieldsType = toType(fields);\n\n assertThat(fieldsType, is (PredicateLeaf.Type.FLOAT));\n }",
"class_method_signature": "FieldsTypeUtilsTest.doubleToFloatType()",
"constructor": f... | {
"fields": [],
"file": "corc-cascading/src/main/java/com/hotels/corc/cascading/FieldsTypeUtils.java",
"identifier": "FieldsTypeUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "FieldsTypeUtils.FieldsTypeUtils()",
"constructor": true,
"full_signature": "private FieldsT... | {
"body": "static PredicateLeaf.Type toType(Fields fields) {\n Type type = fields.getType(0);\n if (type.equals(Double.class)) {\n return PredicateLeaf.Type.FLOAT;\n } else if (type.equals(Long.class)) {\n return PredicateLeaf.Type.LONG;\n } else if (type.equals(Integer.class)) {\n re... | {
"created": null,
"fork": null,
"fork_count": 7,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 35680131,
"size": 282,
"stargazer_count": 13,
"stars": null,
"updates": null,
"url": "https://github.com/HotelsDotCom/corc"
} |
35680131_201 | {
"fields": [],
"file": "corc-cascading/src/test/java/com/hotels/corc/cascading/SchemaFactoryTest.java",
"identifier": "SchemaFactoryTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = NullPointerException.class)\n public void createStructTypeInfoComplex() {\n String[] names = new String[] { \"a\" };\n Class<?>[] types = new Class<?>[] { List.class };\n\n Fields fields = new Fields(names, types);\n\n SchemaFactory.newStructTypeInfo(fields);\n }",
"class_m... | {
"fields": [
{
"declarator": "PRIMITIVES",
"modifier": "private static final",
"original_string": "private static final Map<TypeInfo, Class<?>> PRIMITIVES;",
"type": "Map<TypeInfo, Class<?>>",
"var_name": "PRIMITIVES"
}
],
"file": "corc-cascading/src/main/java/com/hotels/cor... | {
"body": "static StructTypeInfo newStructTypeInfo(Fields fields) {\n List<String> names = new ArrayList<>();\n List<TypeInfo> typeInfos = new ArrayList<>();\n\n for (int i = 0; i < fields.size(); i++) {\n String name = fields.get(i).toString();\n if (ROW_ID_NAME.equals(name)) {\n if (!field... | {
"created": null,
"fork": null,
"fork_count": 7,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 35680131,
"size": 282,
"stargazer_count": 13,
"stars": null,
"updates": null,
"url": "https://github.com/HotelsDotCom/corc"
} |
35680131_128 | {
"fields": [
{
"declarator": "typeInfo = (StructTypeInfo) TypeInfoUtils.getTypeInfoFromTypeString(\"struct<a:string>\")",
"modifier": "private final",
"original_string": "private final StructTypeInfo typeInfo = (StructTypeInfo) TypeInfoUtils.getTypeInfoFromTypeString(\"struct<a:string>\");",
... | {
"body": "@Test\n public void readerCreateValue() {\n @SuppressWarnings(\"unchecked\")\n RecordReader<NullWritable, OrcStruct> recordReader = mock(RecordReader.class);\n CorcRecordReader reader = new CorcRecordReader(typeInfo, recordReader, factory, Filter.ACCEPT);\n\n Corc corc = reader.createValue();\... | {
"fields": [
{
"declarator": "typeInfo",
"modifier": "private final",
"original_string": "private final StructTypeInfo typeInfo;",
"type": "StructTypeInfo",
"var_name": "typeInfo"
},
{
"declarator": "reader",
"modifier": "private final",
"original_string": ... | {
"body": "@Override\n public Corc createValue() {\n return new Corc(typeInfo, factory);\n }",
"class_method_signature": "CorcRecordReader.createValue()",
"constructor": false,
"full_signature": "@Override public Corc createValue()",
"identifier": "createValue",
"invocations": [],
"modifiers": "@Over... | {
"created": null,
"fork": null,
"fork_count": 7,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 35680131,
"size": 282,
"stargazer_count": 13,
"stars": null,
"updates": null,
"url": "https://github.com/HotelsDotCom/corc"
} |
35680131_73 | {
"fields": [
{
"declarator": "COL0 = \"col0\"",
"modifier": "private static final",
"original_string": "private static final String COL0 = \"col0\";",
"type": "String",
"var_name": "COL0"
},
{
"declarator": "COL1 = \"col1\"",
"modifier": "private static final",
... | {
"body": "@Test\n public void complexArgumentIsTrue() throws IOException {\n when(corc.getWritable(COL0)).thenReturn(ONE_WRITABLE);\n when(corc.getWritable(COL1)).thenReturn(ZERO_WRITABLE);\n\n /*\n * COL0 is not null and COL0 > 0 and COL1 not between 1 and 3\n */\n SearchArgument searchArgument... | {
"fields": [
{
"declarator": "searchArgument",
"modifier": "private final",
"original_string": "private final SearchArgument searchArgument;",
"type": "SearchArgument",
"var_name": "searchArgument"
},
{
"declarator": "evaluators",
"modifier": "private final",
... | {
"body": "@Override\n public boolean accept(Corc corc) throws IOException {\n TruthValue[] truthValues = new TruthValue[evaluators.size()];\n for (int i = 0; i < evaluators.size(); i++) {\n truthValues[i] = evaluators.get(i).evaluate(corc);\n }\n TruthValue truthValue = searchArgument.evaluate(trut... | {
"created": null,
"fork": null,
"fork_count": 7,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 35680131,
"size": 282,
"stargazer_count": 13,
"stars": null,
"updates": null,
"url": "https://github.com/HotelsDotCom/corc"
} |
35680131_153 | {
"fields": [
{
"declarator": "temporaryFolder = new TemporaryFolder()",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final TemporaryFolder temporaryFolder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "temporaryFolder"
},
{
... | {
"body": "@Test(expected = IllegalStateException.class)\n public void setInputReadColumnsDifferentTypes() {\n StructTypeInfo typeInfo = new StructTypeInfoBuilder().add(\"a\", TypeInfoFactory.stringTypeInfo).build();\n\n conf.set(CorcInputFormat.INPUT_TYPE_INFO, \"struct<a:bigint>\");\n\n CorcInputFormat.se... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(CorcInputFormat.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(CorcInputFormat.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"de... | {
"body": "static void setReadColumns(Configuration conf, StructTypeInfo actualStructTypeInfo) {\n StructTypeInfo readStructTypeInfo = getTypeInfo(conf);\n LOG.info(\"Read StructTypeInfo: {}\", readStructTypeInfo);\n\n List<Integer> ids = new ArrayList<>();\n List<String> names = new ArrayList<>();\n\n ... | {
"created": null,
"fork": null,
"fork_count": 7,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 35680131,
"size": 282,
"stargazer_count": 13,
"stars": null,
"updates": null,
"url": "https://github.com/HotelsDotCom/corc"
} |
35680131_24 | {
"fields": [
{
"declarator": "COL0 = \"col0\"",
"modifier": "private static final",
"original_string": "private static final String COL0 = \"col0\";",
"type": "String",
"var_name": "COL0"
},
{
"declarator": "COL1 = \"col1\"",
"modifier": "private static final",
... | {
"body": "@Test\n public void notEqualsNullIsFalse() throws IOException {\n when(corc.getWritable(COL0)).thenReturn(null);\n SearchArgument searchArgument = builder.startNot().equals(COL0,PredicateLeaf.Type.LONG, ZERO).end().build();\n assertThat(new SearchArgumentFilter(searchArgument, structTypeInfo).acc... | {
"fields": [
{
"declarator": "searchArgument",
"modifier": "private final",
"original_string": "private final SearchArgument searchArgument;",
"type": "SearchArgument",
"var_name": "searchArgument"
},
{
"declarator": "evaluators",
"modifier": "private final",
... | {
"body": "@Override\n public boolean accept(Corc corc) throws IOException {\n TruthValue[] truthValues = new TruthValue[evaluators.size()];\n for (int i = 0; i < evaluators.size(); i++) {\n truthValues[i] = evaluators.get(i).evaluate(corc);\n }\n TruthValue truthValue = searchArgument.evaluate(trut... | {
"created": null,
"fork": null,
"fork_count": 7,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 35680131,
"size": 282,
"stargazer_count": 13,
"stars": null,
"updates": null,
"url": "https://github.com/HotelsDotCom/corc"
} |
35680131_104 | {
"fields": [
{
"declarator": "COL0 = \"col0\"",
"modifier": "private static final",
"original_string": "private static final String COL0 = \"col0\";",
"type": "String",
"var_name": "COL0"
},
{
"declarator": "predicateLeaf",
"modifier": "@Mock\n private",
"... | {
"body": "@SuppressWarnings(\"rawtypes\")\n @Test\n public void doubleTypical() {\n assertThat(toComparable(DOUBLE, 0.0D), is((Comparable) new DoubleWritable(0.0D)));\n }",
"class_method_signature": "EvaluatorFactoryTest.doubleTypical()",
"constructor": false,
"full_signature": "@SuppressWarnings(\"rawty... | {
"fields": [
{
"declarator": "structTypeInfo",
"modifier": "private final",
"original_string": "private final StructTypeInfo structTypeInfo;",
"type": "StructTypeInfo",
"var_name": "structTypeInfo"
}
],
"file": "corc-core/src/main/java/com/hotels/corc/sarg/EvaluatorFactory.j... | {
"body": "static Comparable<?> toComparable(PrimitiveCategory category, Object literal) {\n String stringLiteral;\n switch (category) {\n case STRING:\n return new Text((String) literal);\n case BOOLEAN:\n return new BooleanWritable((Boolean) literal);\n case BYTE:\n return new ByteWrit... | {
"created": null,
"fork": null,
"fork_count": 7,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 35680131,
"size": 282,
"stargazer_count": 13,
"stars": null,
"updates": null,
"url": "https://github.com/HotelsDotCom/corc"
} |
35680131_32 | {
"fields": [
{
"declarator": "COL0 = \"col0\"",
"modifier": "private static final",
"original_string": "private static final String COL0 = \"col0\";",
"type": "String",
"var_name": "COL0"
},
{
"declarator": "COL1 = \"col1\"",
"modifier": "private static final",
... | {
"body": "@Test\n public void isNullIsFalse() throws IOException {\n when(corc.getWritable(COL0)).thenReturn(ZERO_WRITABLE);\n SearchArgument searchArgument = builder.startAnd().isNull(COL0,PredicateLeaf.Type.LONG).end().build();\n assertThat(new SearchArgumentFilter(searchArgument, structTypeInfo).accept(... | {
"fields": [
{
"declarator": "searchArgument",
"modifier": "private final",
"original_string": "private final SearchArgument searchArgument;",
"type": "SearchArgument",
"var_name": "searchArgument"
},
{
"declarator": "evaluators",
"modifier": "private final",
... | {
"body": "@Override\n public boolean accept(Corc corc) throws IOException {\n TruthValue[] truthValues = new TruthValue[evaluators.size()];\n for (int i = 0; i < evaluators.size(); i++) {\n truthValues[i] = evaluators.get(i).evaluate(corc);\n }\n TruthValue truthValue = searchArgument.evaluate(trut... | {
"created": null,
"fork": null,
"fork_count": 7,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 35680131,
"size": 282,
"stargazer_count": 13,
"stars": null,
"updates": null,
"url": "https://github.com/HotelsDotCom/corc"
} |
35680131_112 | {
"fields": [
{
"declarator": "COL0 = \"col0\"",
"modifier": "private static final",
"original_string": "private static final String COL0 = \"col0\";",
"type": "String",
"var_name": "COL0"
},
{
"declarator": "predicateLeaf",
"modifier": "@Mock\n private",
"... | {
"body": "@Test(expected = ClassCastException.class)\n public void varcharWithVarcharInput() {\n toComparable(VARCHAR, new HiveVarchar(\"foo\", 3));\n }",
"class_method_signature": "EvaluatorFactoryTest.varcharWithVarcharInput()",
"constructor": false,
"full_signature": "@Test(expected = ClassCastExceptio... | {
"fields": [
{
"declarator": "structTypeInfo",
"modifier": "private final",
"original_string": "private final StructTypeInfo structTypeInfo;",
"type": "StructTypeInfo",
"var_name": "structTypeInfo"
}
],
"file": "corc-core/src/main/java/com/hotels/corc/sarg/EvaluatorFactory.j... | {
"body": "static Comparable<?> toComparable(PrimitiveCategory category, Object literal) {\n String stringLiteral;\n switch (category) {\n case STRING:\n return new Text((String) literal);\n case BOOLEAN:\n return new BooleanWritable((Boolean) literal);\n case BYTE:\n return new ByteWrit... | {
"created": null,
"fork": null,
"fork_count": 7,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 35680131,
"size": 282,
"stargazer_count": 13,
"stars": null,
"updates": null,
"url": "https://github.com/HotelsDotCom/corc"
} |
35680131_65 | {
"fields": [
{
"declarator": "COL0 = \"col0\"",
"modifier": "private static final",
"original_string": "private static final String COL0 = \"col0\";",
"type": "String",
"var_name": "COL0"
},
{
"declarator": "COL1 = \"col1\"",
"modifier": "private static final",
... | {
"body": "@Test\n public void notLessThanEqualsIsLessThanIsFalse() throws IOException {\n when(corc.getWritable(COL0)).thenReturn(ZERO_WRITABLE);\n SearchArgument searchArgument = builder.startNot().lessThanEquals(COL0,PredicateLeaf.Type.LONG, ONE).end().build();\n assertThat(new SearchArgumentFilter(searc... | {
"fields": [
{
"declarator": "searchArgument",
"modifier": "private final",
"original_string": "private final SearchArgument searchArgument;",
"type": "SearchArgument",
"var_name": "searchArgument"
},
{
"declarator": "evaluators",
"modifier": "private final",
... | {
"body": "@Override\n public boolean accept(Corc corc) throws IOException {\n TruthValue[] truthValues = new TruthValue[evaluators.size()];\n for (int i = 0; i < evaluators.size(); i++) {\n truthValues[i] = evaluators.get(i).evaluate(corc);\n }\n TruthValue truthValue = searchArgument.evaluate(trut... | {
"created": null,
"fork": null,
"fork_count": 7,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 35680131,
"size": 282,
"stargazer_count": 13,
"stars": null,
"updates": null,
"url": "https://github.com/HotelsDotCom/corc"
} |
35680131_145 | {
"fields": [
{
"declarator": "temporaryFolder = new TemporaryFolder()",
"modifier": "@Rule\n public final",
"original_string": "@Rule\n public final TemporaryFolder temporaryFolder = new TemporaryFolder();",
"type": "TemporaryFolder",
"var_name": "temporaryFolder"
},
{
... | {
"body": "@Test\n public void setSchemaTypeInfoNull() {\n CorcInputFormat.setSchemaTypeInfo(conf, null);\n\n assertThat(conf.get(CorcInputFormat.SCHEMA_TYPE_INFO), is(nullValue()));\n }",
"class_method_signature": "CorcInputFormatTest.setSchemaTypeInfoNull()",
"constructor": false,
"full_signature": "@... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(CorcInputFormat.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(CorcInputFormat.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"de... | {
"body": "public static void setSchemaTypeInfo(Configuration conf, StructTypeInfo schemaTypeInfo) {\n if (schemaTypeInfo != null) {\n conf.set(SCHEMA_TYPE_INFO, schemaTypeInfo.getTypeName());\n LOG.debug(\"Set schema typeInfo on conf: {}\", schemaTypeInfo);\n }\n }",
"class_method_signature": "Cor... | {
"created": null,
"fork": null,
"fork_count": 7,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 35680131,
"size": 282,
"stargazer_count": 13,
"stars": null,
"updates": null,
"url": "https://github.com/HotelsDotCom/corc"
} |
17559168_38 | {
"fields": [],
"file": "titl-core/src/test/java/org/kafsemo/titl/TestParseLibrary.java",
"identifier": "TestParseLibrary",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testParseEmptyItunes9Library() throws IOException, ItlException\n {\n File f = new File(\"src/test/resources/Empty iTunes 9.0.3 Library.itl\");\n\n Library lib = ParseLibrary.parse(f);\n assertNotNull(lib);\n assertEquals(\"9.0.3\", lib.getVersion());\n... | {
"fields": [
{
"declarator": "playlists = new ArrayList<Playlist>()",
"modifier": "private final",
"original_string": "private final Collection<Playlist> playlists = new ArrayList<Playlist>();",
"type": "Collection<Playlist>",
"var_name": "playlists"
},
{
"declarator":... | {
"body": "public static Library parse(File f) throws IOException, ItlException\n {\n long fileLength = f.length();\n\n InputStream in = new FileInputStream(f);\n try {\n return parse(in, fileLength);\n } finally {\n in.close();\n }\n }",
"class_method_... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
17559168_14 | {
"fields": [
{
"declarator": "emptySample = {\n 0x03, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x10,\n 0x70, 0x65, 0x63, 0x68,\n 0x00, 0x00, 0x00, 0x00,\n 0x73, 0x74, 0x72, 0x74\n }",
"modifier": "private static final",
"origin... | {
"body": "@Test\n public void parseSinglePodcast() throws IOException\n {\n HohmPodcast hp = HohmPodcast.parse(\n new InputImpl(new ByteArrayInputStream(sample)),\n sample.length);\n \n assertEquals(\"http://www.tmbg.com/_media/_pod/podcast.xml\", hp.url);\n ... | {
"fields": [
{
"declarator": "url",
"modifier": "public final",
"original_string": "public final String url;",
"type": "String",
"var_name": "url"
},
{
"declarator": "link",
"modifier": "public final",
"original_string": "public final String link;",
"... | {
"body": "public static HohmPodcast parse(Input di, int length) throws IOException\n {\n String url, link, aurl;\n\n di.skipBytes(23 * 4);\n length -= 23 * 4;\n\n if (length <= 0) {\n return null;\n }\n\n int len = di.readInt();\n String type = Util.toSt... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
17559168_3 | {
"fields": [],
"file": "titl-core/src/test/java/org/kafsemo/titl/TestUtil.java",
"identifier": "TestUtil",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testPidToString()\n {\n byte[] libraryPersistentId = {\n 0x30, 0x14, (byte) 0x96, (byte) 0xC1, 0x63, (byte) 0xC0, (byte) 0xDF, 0x40\n };\n\n assertEquals(\"301496C163C0DF40\", Util.pidToString(libraryPersistentId));\n }",
"class_method_sign... | {
"fields": [
{
"declarator": "ID_PATTERN = Pattern.compile(\"[a-zA-Z0-9]+\")",
"modifier": "private static",
"original_string": "private static Pattern ID_PATTERN = Pattern.compile(\"[a-zA-Z0-9]+\");",
"type": "Pattern",
"var_name": "ID_PATTERN"
}
],
"file": "titl-core/src/m... | {
"body": "public static String pidToString(byte[] libraryPersistentId)\n {\n StringBuffer sb = new StringBuffer(libraryPersistentId.length * 2);\n for (byte b : libraryPersistentId) {\n sb.append(String.format(\"%02X\", b & 0xFF));\n }\n\n return sb.toString();\n }",
"c... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
17559168_43 | {
"fields": [],
"file": "titl-core/src/test/java/org/kafsemo/titl/TestParseLibrary.java",
"identifier": "TestParseLibrary",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testParseEmptyItunes10_2Library() throws IOException, ItlException\n {\n File f = new File(\"src/test/resources/Empty iTunes 10.2 Library.itl\");\n\n Library lib = ParseLibrary.parse(f);\n assertNotNull(lib);\n assertEquals(\"10.2.2\", lib.getVersion())... | {
"fields": [
{
"declarator": "playlists = new ArrayList<Playlist>()",
"modifier": "private final",
"original_string": "private final Collection<Playlist> playlists = new ArrayList<Playlist>();",
"type": "Collection<Playlist>",
"var_name": "playlists"
},
{
"declarator":... | {
"body": "public static Library parse(File f) throws IOException, ItlException\n {\n long fileLength = f.length();\n\n InputStream in = new FileInputStream(f);\n try {\n return parse(in, fileLength);\n } finally {\n in.close();\n }\n }",
"class_method_... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
17559168_22 | {
"fields": [],
"file": "titl-core/src/test/java/org/kafsemo/titl/TestBase64.java",
"identifier": "TestBase64",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testDecodeWhitespaceStripped() throws UnsupportedEncodingException\n {\n byte[] ba = Base64.decode(\"VGV\\nzdA==\");\n assertEquals(\"Test\", new String(ba, \"US-ASCII\"));\n }",
"class_method_signature": "TestBase64.testDecodeWhitespaceStripped()",
"construct... | {
"fields": [
{
"declarator": "CHARS = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\"",
"modifier": "public static final",
"original_string": "public static final String CHARS = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";",
"type": "String",
... | {
"body": "public static byte[] decode(String s)\n {\n s = s.replaceAll(\"\\\\s+\", \"\");\n\n char[] ca = s.toCharArray();\n\n if (ca.length % 4 != 0)\n {\n throw new IllegalArgumentException();\n }\n\n ByteArrayOutputStream baos = new ByteArrayOutputStream((ca... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
17559168_34 | {
"fields": [],
"file": "titl-core/src/test/java/org/kafsemo/titl/TestParseLibrary.java",
"identifier": "TestParseLibrary",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testMinimalLibraryPodcast() throws Exception\n {\n File f = new File(\"src/test/resources/Minimal iTunes 8.0.1 Library.itl\");\n\n Library lib = ParseLibrary.parse(f);\n\n // Podcast\n Collection<Podcast> podcasts = lib.getPodcasts();\n assertNot... | {
"fields": [
{
"declarator": "playlists = new ArrayList<Playlist>()",
"modifier": "private final",
"original_string": "private final Collection<Playlist> playlists = new ArrayList<Playlist>();",
"type": "Collection<Playlist>",
"var_name": "playlists"
},
{
"declarator":... | {
"body": "public static Library parse(File f) throws IOException, ItlException\n {\n long fileLength = f.length();\n\n InputStream in = new FileInputStream(f);\n try {\n return parse(in, fileLength);\n } finally {\n in.close();\n }\n }",
"class_method_... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
17559168_18 | {
"fields": [
{
"declarator": "hdfm6Header = {\n 0x68, 0x64, 0x66, 0x6d,\n 0x00, 0x00, 0x00, (byte) 0x84,\n 0x00, 0x68, 0x65, 0x7c,\n 0x00, 0x08, 0x00, 0x03,\n 0x05, 0x36, 0x2e, 0x30,\n 0x2e, 0x34, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x... | {
"body": "@Test\n public void uncompressedDataIsNotInflated() throws Exception\n {\n byte[] data = \"Uncompressed.\".getBytes(\"us-ascii\");\n \n assertEquals(\"The same array is returned when data is not compressed\",\n data, Hdfm.inflate(data));\n }",
"class_method_signa... | {
"fields": [
{
"declarator": "version",
"modifier": "public final",
"original_string": "public final String version;",
"type": "String",
"var_name": "version"
},
{
"declarator": "unknown",
"modifier": "public final",
"original_string": "public final int unk... | {
"body": "static byte[] inflate(byte[] orig) throws ItlException, ZipException\n {\n /* Check for a zlib flag byte; 0x78 => 32k window, deflate */\n boolean probablyCompressed = (orig.length >= 1 && orig[0] == 0x78);\n \n \tbyte[] inflated = null;\n\n \ttry\n \t{\n\t InflaterI... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
17559168_19 | {
"fields": [],
"file": "titl-core/src/test/java/org/kafsemo/titl/TestProcessLibrary.java",
"identifier": "TestProcessLibrary",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void chooseCorrectEncoding()\n {\n ProcessLibrary.Encoding enc;\n \n enc = ProcessLibrary.chooseEncoding(\"\");\n assertEquals(ProcessLibrary.Encoding.ISO88591, enc);\n \n enc = ProcessLibrary.chooseEncoding(\"Test\");\n assertEquals(Pro... | {
"fields": [
{
"declarator": "converters = new HashMap<Integer, StringConverter>()",
"modifier": "private final",
"original_string": "private final Map<Integer, StringConverter> converters = new HashMap<Integer, StringConverter>();",
"type": "Map<Integer, StringConverter>",
"var_nam... | {
"body": "static Encoding chooseEncoding(String s)\n {\n for (char c : s.toCharArray()) {\n if (c > 0xff) {\n return Encoding.UTF16BE;\n }\n }\n\n return Encoding.ISO88591;\n }",
"class_method_signature": "ProcessLibrary.chooseEncoding(String s)",
"... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
17559168_35 | {
"fields": [],
"file": "titl-core/src/test/java/org/kafsemo/titl/TestParseLibrary.java",
"identifier": "TestParseLibrary",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testMinimalLibraryPlaylist() throws Exception\n {\n File f = new File(\"src/test/resources/Minimal iTunes 8.0.1 Library.itl\");\n\n Library lib = ParseLibrary.parse(f);\n\n // Playlist\n Collection<Playlist> playlists = lib.getPlaylists();\n asse... | {
"fields": [
{
"declarator": "playlists = new ArrayList<Playlist>()",
"modifier": "private final",
"original_string": "private final Collection<Playlist> playlists = new ArrayList<Playlist>();",
"type": "Collection<Playlist>",
"var_name": "playlists"
},
{
"declarator":... | {
"body": "public static Library parse(File f) throws IOException, ItlException\n {\n long fileLength = f.length();\n\n InputStream in = new FileInputStream(f);\n try {\n return parse(in, fileLength);\n } finally {\n in.close();\n }\n }",
"class_method_... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
17559168_23 | {
"fields": [],
"file": "titl-core/src/test/java/org/kafsemo/titl/TestBase64.java",
"identifier": "TestBase64",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testDecodeNoPadding() throws UnsupportedEncodingException\n {\n byte[] ba = Base64.decode(\"QUJD\");\n assertEquals(\"ABC\", new String(ba, \"US-ASCII\"));\n }",
"class_method_signature": "TestBase64.testDecodeNoPadding()",
"constructor": false,
"full_signat... | {
"fields": [
{
"declarator": "CHARS = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\"",
"modifier": "public static final",
"original_string": "public static final String CHARS = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";",
"type": "String",
... | {
"body": "public static byte[] decode(String s)\n {\n s = s.replaceAll(\"\\\\s+\", \"\");\n\n char[] ca = s.toCharArray();\n\n if (ca.length % 4 != 0)\n {\n throw new IllegalArgumentException();\n }\n\n ByteArrayOutputStream baos = new ByteArrayOutputStream((ca... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
17559168_42 | {
"fields": [],
"file": "titl-core/src/test/java/org/kafsemo/titl/TestParseLibrary.java",
"identifier": "TestParseLibrary",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testParseEmptyItunes10_1Library() throws IOException, ItlException\n {\n File f = new File(\"src/test/resources/Empty iTunes 10.1 Library.itl\");\n\n Library lib = ParseLibrary.parse(f);\n assertNotNull(lib);\n assertEquals(\"10.1\", lib.getVersion());\... | {
"fields": [
{
"declarator": "playlists = new ArrayList<Playlist>()",
"modifier": "private final",
"original_string": "private final Collection<Playlist> playlists = new ArrayList<Playlist>();",
"type": "Collection<Playlist>",
"var_name": "playlists"
},
{
"declarator":... | {
"body": "public static Library parse(File f) throws IOException, ItlException\n {\n long fileLength = f.length();\n\n InputStream in = new FileInputStream(f);\n try {\n return parse(in, fileLength);\n } finally {\n in.close();\n }\n }",
"class_method_... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
17559168_2 | {
"fields": [],
"file": "titl-core/src/test/java/org/kafsemo/titl/TestUtil.java",
"identifier": "TestUtil",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void isPlausibleIdentifier() throws UnsupportedEncodingException\n {\n assertTrue(\"Letters form a valid identifier\", Util.isIdentifier(\"test\"));\n assertTrue(\"Letters form a valid identifier\", Util.isIdentifier(\"0123\"));\n assertFalse(\"Non-alphanumeric cha... | {
"fields": [
{
"declarator": "ID_PATTERN = Pattern.compile(\"[a-zA-Z0-9]+\")",
"modifier": "private static",
"original_string": "private static Pattern ID_PATTERN = Pattern.compile(\"[a-zA-Z0-9]+\");",
"type": "Pattern",
"var_name": "ID_PATTERN"
}
],
"file": "titl-core/src/m... | {
"body": "public static boolean isIdentifier(String id)\n {\n return ID_PATTERN.matcher(id).matches();\n }",
"class_method_signature": "Util.isIdentifier(String id)",
"constructor": false,
"full_signature": "public static boolean isIdentifier(String id)",
"identifier": "isIdentifier",
"invocat... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
17559168_15 | {
"fields": [
{
"declarator": "emptySample = {\n 0x03, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x10,\n 0x70, 0x65, 0x63, 0x68,\n 0x00, 0x00, 0x00, 0x00,\n 0x73, 0x74, 0x72, 0x74\n }",
"modifier": "private static final",
"origin... | {
"body": "@Ignore(\"Doesn't work yet.\")\n @Test\n public void parseMultiplePodcasts() throws IOException\n {\n HohmPodcast.dump(\n new InputImpl(new ByteArrayInputStream(fullSample)),\n sample.length);\n \n// HohmPodcast hp = HohmPodcast.parse(\n// ... | {
"fields": [
{
"declarator": "url",
"modifier": "public final",
"original_string": "public final String url;",
"type": "String",
"var_name": "url"
},
{
"declarator": "link",
"modifier": "public final",
"original_string": "public final String link;",
"... | {
"body": "static void dump(Input di, int length) throws IOException\n {\n di.skipBytes(12);\n\n String type = Util.toString(di.readInt());\n System.out.println(type);\n\n// parse(di, length - 60 + 23);\n// di.skipBytes(24);\n// length -= 24;\n\n// ParseLibrary.hexD... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
17559168_39 | {
"fields": [],
"file": "titl-core/src/test/java/org/kafsemo/titl/TestParseLibrary.java",
"identifier": "TestParseLibrary",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testParseEmptyItunes9_2Library() throws IOException, ItlException\n {\n File f = new File(\"src/test/resources/Empty iTunes 9.2.0 Library.itl\");\n\n Library lib = ParseLibrary.parse(f);\n assertNotNull(lib);\n assertEquals(\"9.2\", lib.getVersion());\n... | {
"fields": [
{
"declarator": "playlists = new ArrayList<Playlist>()",
"modifier": "private final",
"original_string": "private final Collection<Playlist> playlists = new ArrayList<Playlist>();",
"type": "Collection<Playlist>",
"var_name": "playlists"
},
{
"declarator":... | {
"body": "public static Library parse(File f) throws IOException, ItlException\n {\n long fileLength = f.length();\n\n InputStream in = new FileInputStream(f);\n try {\n return parse(in, fileLength);\n } finally {\n in.close();\n }\n }",
"class_method_... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
17559168_24 | {
"fields": [],
"file": "titl-core/src/test/java/org/kafsemo/titl/TestBase64.java",
"identifier": "TestBase64",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testDecodeOnePaddingChar() throws UnsupportedEncodingException\n {\n byte[] ba = Base64.decode(\"ISE=\");\n assertEquals(\"!!\", new String(ba, \"US-ASCII\"));\n }",
"class_method_signature": "TestBase64.testDecodeOnePaddingChar()",
"constructor": false,
"fu... | {
"fields": [
{
"declarator": "CHARS = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\"",
"modifier": "public static final",
"original_string": "public static final String CHARS = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";",
"type": "String",
... | {
"body": "public static byte[] decode(String s)\n {\n s = s.replaceAll(\"\\\\s+\", \"\");\n\n char[] ca = s.toCharArray();\n\n if (ca.length % 4 != 0)\n {\n throw new IllegalArgumentException();\n }\n\n ByteArrayOutputStream baos = new ByteArrayOutputStream((ca... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
17559168_32 | {
"fields": [],
"file": "titl-core/src/test/java/org/kafsemo/titl/TestParseLibrary.java",
"identifier": "TestParseLibrary",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testParseEmptyItunes80Library() throws IOException, ItlException\n {\n File f = new File(\"src/test/resources/Empty iTunes 8.0 Library.itl\");\n\n Library lib = ParseLibrary.parse(f);\n assertNotNull(lib);\n assertEquals(\"8.0\", lib.getVersion());\n ... | {
"fields": [
{
"declarator": "playlists = new ArrayList<Playlist>()",
"modifier": "private final",
"original_string": "private final Collection<Playlist> playlists = new ArrayList<Playlist>();",
"type": "Collection<Playlist>",
"var_name": "playlists"
},
{
"declarator":... | {
"body": "public static Library parse(File f) throws IOException, ItlException\n {\n long fileLength = f.length();\n\n InputStream in = new FileInputStream(f);\n try {\n return parse(in, fileLength);\n } finally {\n in.close();\n }\n }",
"class_method_... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
17559168_9 | {
"fields": [],
"file": "titl-core/src/test/java/org/kafsemo/titl/tools/TestMain.java",
"identifier": "TestMain",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void exceptionWhenNoClassIsProvided() throws Exception\n {\n Main.main();\n }",
"class_method_signature": "TestMain.exceptionWhenNoClassIsProvided()",
"constructor": false,
"full_signature": "@Test(expected = IllegalArgumentExc... | {
"fields": [],
"file": "titl-core/src/main/java/org/kafsemo/titl/tools/Main.java",
"identifier": "Main",
"interfaces": "",
"methods": [
{
"class_method_signature": "Main.main(String... args)",
"constructor": false,
"full_signature": "public static void main(String... args)",
"iden... | {
"body": "public static void main(String... args)\n throws ClassNotFoundException, SecurityException,\n NoSuchMethodException, IllegalArgumentException,\n IllegalAccessException, InvocationTargetException\n {\n if (args.length < 1)\n {\n throw new IllegalArgum... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
17559168_28 | {
"fields": [],
"file": "titl-core/src/test/java/org/kafsemo/titl/art/TestArtworkFile.java",
"identifier": "TestArtworkFile",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void fileFromDefinitionWithNumbers()\n {\n ArtworkFile af = new ArtworkFile(\n ArtworkFile.Directory.Cache,\n new byte[]{0, 1, 2, 3, 4, 5, 6, 7},\n 1);\n \n String f = af.toString(\n new byte[]{8, 9, 0xA, ... | {
"fields": [
{
"declarator": "dir",
"modifier": "final",
"original_string": "final Directory dir;",
"type": "Directory",
"var_name": "dir"
},
{
"declarator": "id",
"modifier": "final",
"original_string": "final byte[] id;",
"type": "byte[]",
"va... | {
"body": "public String toString(byte[] libraryPersistentId)\n {\n StringBuilder sb = new StringBuilder();\n \n sb.append(dir.name());\n sb.append('/');\n \n String libDir = Util.pidToString(libraryPersistentId);\n\n sb.append(libDir);\n sb.append('/');\n ... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
17559168_12 | {
"fields": [],
"file": "titl-core/src/test/java/org/kafsemo/titl/tools/TestMain.java",
"identifier": "TestMain",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = IOException.class)\n public void correctArgumentsArePassedToMainMethod() throws Throwable\n {\n try {\n Main.main(\"TestMain\", \"arg1\", \"arg2\");\n fail();\n } catch (InvocationTargetException ite) {\n throw ite.getCause();\n }... | {
"fields": [],
"file": "titl-core/src/main/java/org/kafsemo/titl/tools/Main.java",
"identifier": "Main",
"interfaces": "",
"methods": [
{
"class_method_signature": "Main.main(String... args)",
"constructor": false,
"full_signature": "public static void main(String... args)",
"iden... | {
"body": "public static void main(String... args)\n throws ClassNotFoundException, SecurityException,\n NoSuchMethodException, IllegalArgumentException,\n IllegalAccessException, InvocationTargetException\n {\n if (args.length < 1)\n {\n throw new IllegalArgum... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
17559168_5 | {
"fields": [],
"file": "titl-core/src/test/java/org/kafsemo/titl/TestUtil.java",
"identifier": "TestUtil",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void failsWithBadIdStringCharacters()\n {\n Util.fromString(\"€€€€\");\n }",
"class_method_signature": "TestUtil.failsWithBadIdStringCharacters()",
"constructor": false,
"full_signature": "@Test(expected = IllegalArgumentExcept... | {
"fields": [
{
"declarator": "ID_PATTERN = Pattern.compile(\"[a-zA-Z0-9]+\")",
"modifier": "private static",
"original_string": "private static Pattern ID_PATTERN = Pattern.compile(\"[a-zA-Z0-9]+\");",
"type": "Pattern",
"var_name": "ID_PATTERN"
}
],
"file": "titl-core/src/m... | {
"body": "public static int fromString(String s) throws IllegalArgumentException\n {\n char[] ca = s.toCharArray();\n if (ca.length != 4) {\n throw new IllegalArgumentException();\n }\n\n int res = 0;\n for (int i = 0; i < 4; i++) {\n int c = ca[i];\n ... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
17559168_45 | {
"fields": [],
"file": "titl-core/src/test/java/org/kafsemo/titl/TestParseLibrary.java",
"identifier": "TestParseLibrary",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testParseItunes10_2LibraryWithTrackWithArtwork() throws IOException, ItlException\n {\n File f = new File(\"src/test/resources/iTunes 10.2.2 Library with single track with artwork.itl\");\n\n Library lib = ParseLibrary.parse(f);\n assertNotNull(lib);\n ... | {
"fields": [
{
"declarator": "playlists = new ArrayList<Playlist>()",
"modifier": "private final",
"original_string": "private final Collection<Playlist> playlists = new ArrayList<Playlist>();",
"type": "Collection<Playlist>",
"var_name": "playlists"
},
{
"declarator":... | {
"body": "public static Library parse(File f) throws IOException, ItlException\n {\n long fileLength = f.length();\n\n InputStream in = new FileInputStream(f);\n try {\n return parse(in, fileLength);\n } finally {\n in.close();\n }\n }",
"class_method_... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
17559168_44 | {
"fields": [],
"file": "titl-core/src/test/java/org/kafsemo/titl/TestParseLibrary.java",
"identifier": "TestParseLibrary",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testParseItunes10_2LibraryWithSingleTrack() throws IOException, ItlException\n {\n File f = new File(\"src/test/resources/iTunes 10.2.2 Library with single track.itl\");\n\n Library lib = ParseLibrary.parse(f);\n assertNotNull(lib);\n assertEquals(\"10.... | {
"fields": [
{
"declarator": "playlists = new ArrayList<Playlist>()",
"modifier": "private final",
"original_string": "private final Collection<Playlist> playlists = new ArrayList<Playlist>();",
"type": "Collection<Playlist>",
"var_name": "playlists"
},
{
"declarator":... | {
"body": "public static Library parse(File f) throws IOException, ItlException\n {\n long fileLength = f.length();\n\n InputStream in = new FileInputStream(f);\n try {\n return parse(in, fileLength);\n } finally {\n in.close();\n }\n }",
"class_method_... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
17559168_4 | {
"fields": [],
"file": "titl-core/src/test/java/org/kafsemo/titl/TestUtil.java",
"identifier": "TestUtil",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void failsWithBadIdStringLength()\n {\n Util.fromString(\"\");\n }",
"class_method_signature": "TestUtil.failsWithBadIdStringLength()",
"constructor": false,
"full_signature": "@Test(expected = IllegalArgumentException.class) p... | {
"fields": [
{
"declarator": "ID_PATTERN = Pattern.compile(\"[a-zA-Z0-9]+\")",
"modifier": "private static",
"original_string": "private static Pattern ID_PATTERN = Pattern.compile(\"[a-zA-Z0-9]+\");",
"type": "Pattern",
"var_name": "ID_PATTERN"
}
],
"file": "titl-core/src/m... | {
"body": "public static int fromString(String s) throws IllegalArgumentException\n {\n char[] ca = s.toCharArray();\n if (ca.length != 4) {\n throw new IllegalArgumentException();\n }\n\n int res = 0;\n for (int i = 0; i < 4; i++) {\n int c = ca[i];\n ... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
17559168_13 | {
"fields": [
{
"declarator": "emptySample = {\n 0x03, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x10,\n 0x70, 0x65, 0x63, 0x68,\n 0x00, 0x00, 0x00, 0x00,\n 0x73, 0x74, 0x72, 0x74\n }",
"modifier": "private static final",
"origin... | {
"body": "@Test\n public void parseEmptySample() throws IOException\n {\n HohmPodcast hp = HohmPodcast.parse(\n new InputImpl(new ByteArrayInputStream(emptySample)), emptySample.length);\n \n assertNull(hp);\n }",
"class_method_signature": "TestHohmPodcast.parseEmptySam... | {
"fields": [
{
"declarator": "url",
"modifier": "public final",
"original_string": "public final String url;",
"type": "String",
"var_name": "url"
},
{
"declarator": "link",
"modifier": "public final",
"original_string": "public final String link;",
"... | {
"body": "public static HohmPodcast parse(Input di, int length) throws IOException\n {\n String url, link, aurl;\n\n di.skipBytes(23 * 4);\n length -= 23 * 4;\n\n if (length <= 0) {\n return null;\n }\n\n int len = di.readInt();\n String type = Util.toSt... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
17559168_29 | {
"fields": [],
"file": "titl-core/src/test/java/org/kafsemo/titl/TestDates.java",
"identifier": "TestDates",
"interfaces": "",
"superclass": "extends TestCase"
} | {
"body": "@Test\n public void zeroBecomesNullDate()\n {\n int a = 0;\n \n Date d = Dates.fromMac(a);\n assertNull(d);\n }",
"class_method_signature": "TestDates.zeroBecomesNullDate()",
"constructor": false,
"full_signature": "@Test public void zeroBecomesNullDate()",
"ide... | {
"fields": [],
"file": "titl-core/src/main/java/org/kafsemo/titl/Dates.java",
"identifier": "Dates",
"interfaces": "",
"methods": [
{
"class_method_signature": "Dates.toString(Date d)",
"constructor": false,
"full_signature": "static String toString(Date d)",
"identifier": "toStri... | {
"body": "public static Date fromMac(long seconds)\n {\n if (seconds == 0)\n {\n return null;\n }\n\n seconds &= 0xFFFFFFFFL;\n\n Calendar cal = Calendar.getInstance();\n cal.setTimeZone(TimeZone.getTimeZone(\"Europe/London\"));\n cal.clear();\n c... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
17559168_48 | {
"fields": [],
"file": "titl-core/src/test/java/org/kafsemo/titl/TestParseLibrary.java",
"identifier": "TestParseLibrary",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void parseEmptyLibraryFromOsX() throws IOException, ItlException\n {\n File f = new File(\"src/test/resources/Empty OS X iTunes 11.1.5 Library.itl\");\n\n Library lib = ParseLibrary.parse(f);\n assertNotNull(lib);\n assertEquals(\"11.1.5\", lib.getVersion())... | {
"fields": [
{
"declarator": "playlists = new ArrayList<Playlist>()",
"modifier": "private final",
"original_string": "private final Collection<Playlist> playlists = new ArrayList<Playlist>();",
"type": "Collection<Playlist>",
"var_name": "playlists"
},
{
"declarator":... | {
"body": "public static Library parse(File f) throws IOException, ItlException\n {\n long fileLength = f.length();\n\n InputStream in = new FileInputStream(f);\n try {\n return parse(in, fileLength);\n } finally {\n in.close();\n }\n }",
"class_method_... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
17559168_8 | {
"fields": [],
"file": "titl-core/src/test/java/org/kafsemo/titl/tools/TestMoveMusic.java",
"identifier": "TestMoveMusic",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testConversion()\n {\n MoveMusic mm = new MoveMusic(null, \"before-\", \"after-\");\n assertEquals(\"xxx\", mm.convert(\"xxx\"));\n assertEquals(\"after-xx\", mm.convert(\"before-xx\"));\n assertEquals(\"after-xx\", mm.convert(\"after-xx\"));\n }",
... | {
"fields": [
{
"declarator": "libraryFilename",
"modifier": "private final",
"original_string": "private final String libraryFilename;",
"type": "String",
"var_name": "libraryFilename"
},
{
"declarator": "origDir",
"modifier": "private final",
"original_str... | {
"body": "public String convert(String s)\n {\n if (s.startsWith(origDir)) {\n String np = destDir + s.substring(origDir.length());\n System.out.println(s + \" -> \" + np);\n return np;\n } else {\n return s;\n }\n }",
"class_method_signature":... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
17559168_33 | {
"fields": [],
"file": "titl-core/src/test/java/org/kafsemo/titl/TestParseLibrary.java",
"identifier": "TestParseLibrary",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testMinimalLibraryTracksLoaded() throws IOException, ItlException\n {\n File f = new File(\"src/test/resources/Minimal iTunes 8.0.1 Library.itl\");\n\n Library lib = ParseLibrary.parse(f);\n\n // Song\n Collection<Track> tracks = lib.getTracks();\n ... | {
"fields": [
{
"declarator": "playlists = new ArrayList<Playlist>()",
"modifier": "private final",
"original_string": "private final Collection<Playlist> playlists = new ArrayList<Playlist>();",
"type": "Collection<Playlist>",
"var_name": "playlists"
},
{
"declarator":... | {
"body": "public static Library parse(File f) throws IOException, ItlException\n {\n long fileLength = f.length();\n\n InputStream in = new FileInputStream(f);\n try {\n return parse(in, fileLength);\n } finally {\n in.close();\n }\n }",
"class_method_... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
17559168_25 | {
"fields": [],
"file": "titl-core/src/test/java/org/kafsemo/titl/TestBase64.java",
"identifier": "TestBase64",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void testDecodeBadCharacter()\n {\n Base64.decode(\"!!!!\");\n }",
"class_method_signature": "TestBase64.testDecodeBadCharacter()",
"constructor": false,
"full_signature": "@Test(expected = IllegalArgumentException.class) publi... | {
"fields": [
{
"declarator": "CHARS = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\"",
"modifier": "public static final",
"original_string": "public static final String CHARS = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";",
"type": "String",
... | {
"body": "public static byte[] decode(String s)\n {\n s = s.replaceAll(\"\\\\s+\", \"\");\n\n char[] ca = s.toCharArray();\n\n if (ca.length % 4 != 0)\n {\n throw new IllegalArgumentException();\n }\n\n ByteArrayOutputStream baos = new ByteArrayOutputStream((ca... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
17559168_30 | {
"fields": [],
"file": "titl-core/src/test/java/org/kafsemo/titl/TestITunesVersion.java",
"identifier": "TestITunesVersion",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void versionsAreAtLeastTen()\n {\n assertTrue(ITunesVersion.isAtLeast(\"10\", 10));\n assertTrue(ITunesVersion.isAtLeast(\"10.1\", 10));\n assertTrue(ITunesVersion.isAtLeast(\"11\", 10));\n }",
"class_method_signature": "TestITunesVersion.versionsAreAtLeastTen... | {
"fields": [],
"file": "titl-core/src/main/java/org/kafsemo/titl/ITunesVersion.java",
"identifier": "ITunesVersion",
"interfaces": "",
"methods": [
{
"class_method_signature": "ITunesVersion.isAtLeast(String fullVersion, int majorVersion)",
"constructor": false,
"full_signature": "publi... | {
"body": "public static boolean isAtLeast(String fullVersion, int majorVersion)\n {\n int endOfFirstNumber = fullVersion.indexOf('.');\n if (endOfFirstNumber < 0) {\n endOfFirstNumber = fullVersion.length();\n }\n \n try {\n return Integer.parseInt(fullVers... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
17559168_26 | {
"fields": [],
"file": "titl-core/src/test/java/org/kafsemo/titl/TestBase64.java",
"identifier": "TestBase64",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = IllegalArgumentException.class)\n public void testDecodeBadStringLength()\n {\n Base64.decode(\"ISE\");\n }",
"class_method_signature": "TestBase64.testDecodeBadStringLength()",
"constructor": false,
"full_signature": "@Test(expected = IllegalArgumentException.class) ... | {
"fields": [
{
"declarator": "CHARS = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\"",
"modifier": "public static final",
"original_string": "public static final String CHARS = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";",
"type": "String",
... | {
"body": "public static byte[] decode(String s)\n {\n s = s.replaceAll(\"\\\\s+\", \"\");\n\n char[] ca = s.toCharArray();\n\n if (ca.length % 4 != 0)\n {\n throw new IllegalArgumentException();\n }\n\n ByteArrayOutputStream baos = new ByteArrayOutputStream((ca... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
17559168_47 | {
"fields": [],
"file": "titl-core/src/test/java/org/kafsemo/titl/TestParseLibrary.java",
"identifier": "TestParseLibrary",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void inputForReturnsAByteFlippedInputForAStreamStartingWithMsdh() throws IllegalArgumentException, IOException\n {\n byte[] stream = {\n 'm', 's', 'd', 'h',\n 1, 0, 0, 0\n };\n\n Input input = ParseLibrary.inputFor(stream);\n as... | {
"fields": [
{
"declarator": "playlists = new ArrayList<Playlist>()",
"modifier": "private final",
"original_string": "private final Collection<Playlist> playlists = new ArrayList<Playlist>();",
"type": "Collection<Playlist>",
"var_name": "playlists"
},
{
"declarator":... | {
"body": "static Input inputFor(byte[] fileData)\n {\n InputStream in = new ByteArrayInputStream(fileData);\n\n if (fileData.length >= 4 && Arrays.equals(flippedHdsm, Arrays.copyOfRange(fileData, 0, 4))) {\n return new FlippedInputImpl(in);\n } else {\n return new InputI... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
17559168_7 | {
"fields": [],
"file": "titl-core/src/test/java/org/kafsemo/titl/tools/TestMoveMusic.java",
"identifier": "TestMoveMusic",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void badArguments()\n {\n assertNull(\"A switch is not an acceptable argument\",\n MoveMusic.fromArgs(new String[]{\"--use-urls\", \"a\"}));\n \n assertNull(\"Too many arguments is a problem\",\n MoveMusic.fromArgs(new String[]{\"a\", ... | {
"fields": [
{
"declarator": "libraryFilename",
"modifier": "private final",
"original_string": "private final String libraryFilename;",
"type": "String",
"var_name": "libraryFilename"
},
{
"declarator": "origDir",
"modifier": "private final",
"original_str... | {
"body": "public static MoveMusic fromArgs(String[] args)\n {\n if (args.length < 3) {\n return null;\n }\n\n boolean useUrls = false;\n int firstPath;\n\n if (args[0].startsWith(\"--\")) {\n firstPath = 1;\n if (args[0].equals(\"--use-urls\")) {... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
17559168_10 | {
"fields": [],
"file": "titl-core/src/test/java/org/kafsemo/titl/tools/TestMain.java",
"identifier": "TestMain",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test(expected = ClassNotFoundException.class)\n public void unknownClassesAreNotFound() throws Exception\n {\n Main.main(\"UnknownClass\");\n }",
"class_method_signature": "TestMain.unknownClassesAreNotFound()",
"constructor": false,
"full_signature": "@Test(expected = ClassNotFoundE... | {
"fields": [],
"file": "titl-core/src/main/java/org/kafsemo/titl/tools/Main.java",
"identifier": "Main",
"interfaces": "",
"methods": [
{
"class_method_signature": "Main.main(String... args)",
"constructor": false,
"full_signature": "public static void main(String... args)",
"iden... | {
"body": "public static void main(String... args)\n throws ClassNotFoundException, SecurityException,\n NoSuchMethodException, IllegalArgumentException,\n IllegalAccessException, InvocationTargetException\n {\n if (args.length < 1)\n {\n throw new IllegalArgum... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
17559168_11 | {
"fields": [],
"file": "titl-core/src/test/java/org/kafsemo/titl/tools/TestMain.java",
"identifier": "TestMain",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void knownClassIsFound() throws Exception\n {\n Main.main(\"TestMain\");\n }",
"class_method_signature": "TestMain.knownClassIsFound()",
"constructor": false,
"full_signature": "@Test public void knownClassIsFound()",
"identifier": "knownClassIsFound",
"invocations"... | {
"fields": [],
"file": "titl-core/src/main/java/org/kafsemo/titl/tools/Main.java",
"identifier": "Main",
"interfaces": "",
"methods": [
{
"class_method_signature": "Main.main(String... args)",
"constructor": false,
"full_signature": "public static void main(String... args)",
"iden... | {
"body": "public static void main(String... args)\n throws ClassNotFoundException, SecurityException,\n NoSuchMethodException, IllegalArgumentException,\n IllegalAccessException, InvocationTargetException\n {\n if (args.length < 1)\n {\n throw new IllegalArgum... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
17559168_6 | {
"fields": [],
"file": "titl-core/src/test/java/org/kafsemo/titl/tools/TestMoveMusic.java",
"identifier": "TestMoveMusic",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void enoughArguments()\n {\n assertNull(\"At least three arguments must be provided\", MoveMusic.fromArgs(new String[0]));\n assertNull(\"At least three arguments must be provided\", MoveMusic.fromArgs(new String[1]));\n assertNull(\"At least three arguments must b... | {
"fields": [
{
"declarator": "libraryFilename",
"modifier": "private final",
"original_string": "private final String libraryFilename;",
"type": "String",
"var_name": "libraryFilename"
},
{
"declarator": "origDir",
"modifier": "private final",
"original_str... | {
"body": "public static MoveMusic fromArgs(String[] args)\n {\n if (args.length < 3) {\n return null;\n }\n\n boolean useUrls = false;\n int firstPath;\n\n if (args[0].startsWith(\"--\")) {\n firstPath = 1;\n if (args[0].equals(\"--use-urls\")) {... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
17559168_46 | {
"fields": [],
"file": "titl-core/src/test/java/org/kafsemo/titl/TestParseLibrary.java",
"identifier": "TestParseLibrary",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void inputForReturnsAnInput() throws IllegalArgumentException, IOException\n {\n byte[] stream = {\n 'h', 'd', 's', 'm',\n 0, 0, 0, 1\n };\n\n Input input = ParseLibrary.inputFor(stream);\n assertNotNull(input);\n assertE... | {
"fields": [
{
"declarator": "playlists = new ArrayList<Playlist>()",
"modifier": "private final",
"original_string": "private final Collection<Playlist> playlists = new ArrayList<Playlist>();",
"type": "Collection<Playlist>",
"var_name": "playlists"
},
{
"declarator":... | {
"body": "static Input inputFor(byte[] fileData)\n {\n InputStream in = new ByteArrayInputStream(fileData);\n\n if (fileData.length >= 4 && Arrays.equals(flippedHdsm, Arrays.copyOfRange(fileData, 0, 4))) {\n return new FlippedInputImpl(in);\n } else {\n return new InputI... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
17559168_27 | {
"fields": [],
"file": "titl-core/src/test/java/org/kafsemo/titl/art/TestArtworkFile.java",
"identifier": "TestArtworkFile",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void fileFromDefinition()\n {\n ArtworkFile af = new ArtworkFile(\n ArtworkFile.Directory.Cache,\n new byte[8],\n 2);\n \n String f = af.toString(new byte[8]);\n \n assertEquals(\n \"Cache/00... | {
"fields": [
{
"declarator": "dir",
"modifier": "final",
"original_string": "final Directory dir;",
"type": "Directory",
"var_name": "dir"
},
{
"declarator": "id",
"modifier": "final",
"original_string": "final byte[] id;",
"type": "byte[]",
"va... | {
"body": "public String toString(byte[] libraryPersistentId)\n {\n StringBuilder sb = new StringBuilder();\n \n sb.append(dir.name());\n sb.append('/');\n \n String libDir = Util.pidToString(libraryPersistentId);\n\n sb.append(libDir);\n sb.append('/');\n ... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
17559168_31 | {
"fields": [],
"file": "titl-core/src/test/java/org/kafsemo/titl/TestITunesVersion.java",
"identifier": "TestITunesVersion",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void earlierVersionsAreNotAtLeastTen()\n {\n assertFalse(ITunesVersion.isAtLeast(\"9\", 10));\n assertFalse(ITunesVersion.isAtLeast(\"8.0\", 10));\n assertFalse(ITunesVersion.isAtLeast(\"8.0.1\", 10));\n }",
"class_method_signature": "TestITunesVersion.earlier... | {
"fields": [],
"file": "titl-core/src/main/java/org/kafsemo/titl/ITunesVersion.java",
"identifier": "ITunesVersion",
"interfaces": "",
"methods": [
{
"class_method_signature": "ITunesVersion.isAtLeast(String fullVersion, int majorVersion)",
"constructor": false,
"full_signature": "publi... | {
"body": "public static boolean isAtLeast(String fullVersion, int majorVersion)\n {\n int endOfFirstNumber = fullVersion.indexOf('.');\n if (endOfFirstNumber < 0) {\n endOfFirstNumber = fullVersion.length();\n }\n \n try {\n return Integer.parseInt(fullVers... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
17559168_41 | {
"fields": [],
"file": "titl-core/src/test/java/org/kafsemo/titl/TestParseLibrary.java",
"identifier": "TestParseLibrary",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testParseEmptyItunes10_0_1Library() throws IOException, ItlException\n {\n File f = new File(\"src/test/resources/Empty iTunes 10.0.1 Library.itl\");\n\n Library lib = ParseLibrary.parse(f);\n assertNotNull(lib);\n assertEquals(\"10.0.1\", lib.getVersio... | {
"fields": [
{
"declarator": "playlists = new ArrayList<Playlist>()",
"modifier": "private final",
"original_string": "private final Collection<Playlist> playlists = new ArrayList<Playlist>();",
"type": "Collection<Playlist>",
"var_name": "playlists"
},
{
"declarator":... | {
"body": "public static Library parse(File f) throws IOException, ItlException\n {\n long fileLength = f.length();\n\n InputStream in = new FileInputStream(f);\n try {\n return parse(in, fileLength);\n } finally {\n in.close();\n }\n }",
"class_method_... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
17559168_1 | {
"fields": [],
"file": "titl-core/src/test/java/org/kafsemo/titl/TestUtil.java",
"identifier": "TestUtil",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testFromString() throws UnsupportedEncodingException\n {\n String s = \"hdfm\";\n\n assertEquals(1751410285, Util.fromString(s));\n }",
"class_method_signature": "TestUtil.testFromString()",
"constructor": false,
"full_signature": "@Test public void testFrom... | {
"fields": [
{
"declarator": "ID_PATTERN = Pattern.compile(\"[a-zA-Z0-9]+\")",
"modifier": "private static",
"original_string": "private static Pattern ID_PATTERN = Pattern.compile(\"[a-zA-Z0-9]+\");",
"type": "Pattern",
"var_name": "ID_PATTERN"
}
],
"file": "titl-core/src/m... | {
"body": "public static int fromString(String s) throws IllegalArgumentException\n {\n char[] ca = s.toCharArray();\n if (ca.length != 4) {\n throw new IllegalArgumentException();\n }\n\n int res = 0;\n for (int i = 0; i < 4; i++) {\n int c = ca[i];\n ... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
17559168_16 | {
"fields": [
{
"declarator": "hdfm6Header = {\n 0x68, 0x64, 0x66, 0x6d,\n 0x00, 0x00, 0x00, (byte) 0x84,\n 0x00, 0x68, 0x65, 0x7c,\n 0x00, 0x08, 0x00, 0x03,\n 0x05, 0x36, 0x2e, 0x30,\n 0x2e, 0x34, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x... | {
"body": "@Test\n public void testParse6HdfmHeader() throws Exception\n {\n byte[] wholeFile = new byte[6841724];\n System.arraycopy(hdfm6Header, 0, wholeFile, 0, hdfm6Header.length);\n \n Input di = new InputImpl(new ByteArrayInputStream(wholeFile));\n \n Hdfm hdfm = ... | {
"fields": [
{
"declarator": "version",
"modifier": "public final",
"original_string": "public final String version;",
"type": "String",
"var_name": "version"
},
{
"declarator": "unknown",
"modifier": "public final",
"original_string": "public final int unk... | {
"body": "public static Hdfm read(Input di, long fileLength) throws IOException, ItlException\n {\n int hdr = di.readInt();\n assertEquals(\"hdfm\", Util.toString(hdr));\n\n int hl = di.readInt();\n\n int fl = di.readInt();\n if (fileLength != fl)\n {\n throw n... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
17559168_36 | {
"fields": [],
"file": "titl-core/src/test/java/org/kafsemo/titl/TestParseLibrary.java",
"identifier": "TestParseLibrary",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testMinimalLibraryTracksLoaded2() throws IOException, ItlException\n {\n File f = new File(\"src/test/resources/iTunes 8.0.1 Library TMBG.itl\");\n\n Library lib = ParseLibrary.parse(f);\n\n // Song\n Collection<Track> tracks = lib.getTracks();\n ... | {
"fields": [
{
"declarator": "playlists = new ArrayList<Playlist>()",
"modifier": "private final",
"original_string": "private final Collection<Playlist> playlists = new ArrayList<Playlist>();",
"type": "Collection<Playlist>",
"var_name": "playlists"
},
{
"declarator":... | {
"body": "public static Library parse(File f) throws IOException, ItlException\n {\n long fileLength = f.length();\n\n InputStream in = new FileInputStream(f);\n try {\n return parse(in, fileLength);\n } finally {\n in.close();\n }\n }",
"class_method_... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
17559168_20 | {
"fields": [],
"file": "titl-core/src/test/java/org/kafsemo/titl/TestBase64.java",
"identifier": "TestBase64",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testDecodeEmpty()\n {\n byte[] ba = Base64.decode(\"\");\n assertEquals(0, ba.length);\n }",
"class_method_signature": "TestBase64.testDecodeEmpty()",
"constructor": false,
"full_signature": "@Test public void testDecodeEmpty()",
"identifier": "testDecodeE... | {
"fields": [
{
"declarator": "CHARS = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\"",
"modifier": "public static final",
"original_string": "public static final String CHARS = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";",
"type": "String",
... | {
"body": "public static byte[] decode(String s)\n {\n s = s.replaceAll(\"\\\\s+\", \"\");\n\n char[] ca = s.toCharArray();\n\n if (ca.length % 4 != 0)\n {\n throw new IllegalArgumentException();\n }\n\n ByteArrayOutputStream baos = new ByteArrayOutputStream((ca... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
17559168_21 | {
"fields": [],
"file": "titl-core/src/test/java/org/kafsemo/titl/TestBase64.java",
"identifier": "TestBase64",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testDecode() throws UnsupportedEncodingException\n {\n byte[] ba = Base64.decode(\"VGVzdA==\");\n assertEquals(\"Test\", new String(ba, \"US-ASCII\"));\n }",
"class_method_signature": "TestBase64.testDecode()",
"constructor": false,
"full_signature": "@Test ... | {
"fields": [
{
"declarator": "CHARS = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\"",
"modifier": "public static final",
"original_string": "public static final String CHARS = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\";",
"type": "String",
... | {
"body": "public static byte[] decode(String s)\n {\n s = s.replaceAll(\"\\\\s+\", \"\");\n\n char[] ca = s.toCharArray();\n\n if (ca.length % 4 != 0)\n {\n throw new IllegalArgumentException();\n }\n\n ByteArrayOutputStream baos = new ByteArrayOutputStream((ca... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
17559168_37 | {
"fields": [],
"file": "titl-core/src/test/java/org/kafsemo/titl/TestParseLibrary.java",
"identifier": "TestParseLibrary",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testMinimalLibraryPodcast2() throws Exception\n {\n File f = new File(\"src/test/resources/iTunes 8.0.1 Library TMBG.itl\");\n\n Library lib = ParseLibrary.parse(f);\n\n // Podcast\n Collection<Podcast> podcasts = lib.getPodcasts();\n assertNotNu... | {
"fields": [
{
"declarator": "playlists = new ArrayList<Playlist>()",
"modifier": "private final",
"original_string": "private final Collection<Playlist> playlists = new ArrayList<Playlist>();",
"type": "Collection<Playlist>",
"var_name": "playlists"
},
{
"declarator":... | {
"body": "public static Library parse(File f) throws IOException, ItlException\n {\n long fileLength = f.length();\n\n InputStream in = new FileInputStream(f);\n try {\n return parse(in, fileLength);\n } finally {\n in.close();\n }\n }",
"class_method_... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
17559168_17 | {
"fields": [
{
"declarator": "hdfm6Header = {\n 0x68, 0x64, 0x66, 0x6d,\n 0x00, 0x00, 0x00, (byte) 0x84,\n 0x00, 0x68, 0x65, 0x7c,\n 0x00, 0x08, 0x00, 0x03,\n 0x05, 0x36, 0x2e, 0x30,\n 0x2e, 0x34, 0x00, 0x00,\n 0x00, 0x00, 0x00, 0x00,\n 0x00, 0x00, 0x... | {
"body": "@Test\n public void testParse8HdfmHeader() throws Exception\n {\n byte[] wholeFile = new byte[60699];\n System.arraycopy(hdfm8Header, 0, wholeFile, 0, hdfm8Header.length);\n \n Input di = new InputImpl(new ByteArrayInputStream(wholeFile));\n \n Hdfm hdfm = Hd... | {
"fields": [
{
"declarator": "version",
"modifier": "public final",
"original_string": "public final String version;",
"type": "String",
"var_name": "version"
},
{
"declarator": "unknown",
"modifier": "public final",
"original_string": "public final int unk... | {
"body": "public static Hdfm read(Input di, long fileLength) throws IOException, ItlException\n {\n int hdr = di.readInt();\n assertEquals(\"hdfm\", Util.toString(hdr));\n\n int hl = di.readInt();\n\n int fl = di.readInt();\n if (fileLength != fl)\n {\n throw n... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
17559168_0 | {
"fields": [],
"file": "titl-core/src/test/java/org/kafsemo/titl/TestUtil.java",
"identifier": "TestUtil",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testToString() throws UnsupportedEncodingException\n {\n int hdfmInt = 1751410285;\n assertEquals(\"hdfm\", Util.toString(hdfmInt));\n }",
"class_method_signature": "TestUtil.testToString()",
"constructor": false,
"full_signature": "@Test public void testToS... | {
"fields": [
{
"declarator": "ID_PATTERN = Pattern.compile(\"[a-zA-Z0-9]+\")",
"modifier": "private static",
"original_string": "private static Pattern ID_PATTERN = Pattern.compile(\"[a-zA-Z0-9]+\");",
"type": "Pattern",
"var_name": "ID_PATTERN"
}
],
"file": "titl-core/src/m... | {
"body": "public static String toString(int tag)\n {\n char[] ba = new char[4];\n for (int i = 0; i < 4; i++) {\n ba[i] = (char) (tag >> ((3 - i) * 8) & 0xff);\n }\n\n return new String(ba);\n }",
"class_method_signature": "Util.toString(int tag)",
"constructor": fals... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
17559168_40 | {
"fields": [],
"file": "titl-core/src/test/java/org/kafsemo/titl/TestParseLibrary.java",
"identifier": "TestParseLibrary",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void testParseEmptyItunes10_0Library() throws IOException, ItlException\n {\n File f = new File(\"src/test/resources/Empty iTunes 10.0 Library.itl\");\n\n Library lib = ParseLibrary.parse(f);\n assertNotNull(lib);\n assertEquals(\"10.0\", lib.getVersion());\... | {
"fields": [
{
"declarator": "playlists = new ArrayList<Playlist>()",
"modifier": "private final",
"original_string": "private final Collection<Playlist> playlists = new ArrayList<Playlist>();",
"type": "Collection<Playlist>",
"var_name": "playlists"
},
{
"declarator":... | {
"body": "public static Library parse(File f) throws IOException, ItlException\n {\n long fileLength = f.length();\n\n InputStream in = new FileInputStream(f);\n try {\n return parse(in, fileLength);\n } finally {\n in.close();\n }\n }",
"class_method_... | {
"created": null,
"fork": null,
"fork_count": 8,
"is_fork": false,
"language": "Java",
"license": "licensed",
"repo_id": 17559168,
"size": 614,
"stargazer_count": 49,
"stars": null,
"updates": null,
"url": "https://github.com/josephw/titl"
} |
70921758_407 | {
"fields": [],
"file": "commons/src/test/java/org/eclipse/kapua/commons/service/internal/cache/dummy/CacheTest.java",
"identifier": "CacheTest",
"interfaces": "",
"superclass": "extends Assert"
} | {
"body": "@Test\n public void getAllTest() {\n Cache cache = new Cache();\n Set set = new HashSet();\n set.add(\"String\");\n set.add('c');\n set.add(null);\n set.add(1);\n set.add(1000000);\n set.add(12333.222);\n set.add(10.0f);\n set.add(10L... | {
"fields": [],
"file": "commons/src/main/java/org/eclipse/kapua/commons/service/internal/cache/dummy/Cache.java",
"identifier": "Cache",
"interfaces": "implements javax.cache.Cache<K, V>",
"methods": [
{
"class_method_signature": "Cache.Cache()",
"constructor": true,
"full_signature": "... | {
"body": "@Override\n public Map getAll(Set keys) {\n throw new UnsupportedOperationException();\n }",
"class_method_signature": "Cache.getAll(Set keys)",
"constructor": false,
"full_signature": "@Override public Map getAll(Set keys)",
"identifier": "getAll",
"invocations": [],
"modifiers": ... | {
"created": "10/14/2016 3:14:46 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 70921758,
"size": null,
"stargazer_count": null,
"stars": 144,
"updates": "2020-01-27T13:05:02+00:00",
"url": "https://github.com/eclipse/kapua"
... |
70921758_112 | {
"fields": [],
"file": "commons/src/test/java/org/eclipse/kapua/commons/configuration/ValueTokenizerTest.java",
"identifier": "ValueTokenizerTest",
"interfaces": "",
"superclass": "extends Assert"
} | {
"body": "@Test\n public void valueTokenizerValuesAsArrayWithEscape() throws Exception {\n ValueTokenizer valueTokenizer = new ValueTokenizer(\"a123\\\\aaarr\\\\r\");\n String [] expectedValues = new String[]{\"a123aaarrr\"};\n try {\n assertArrayEquals(expectedValues, valueTokeniz... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(ValueTokenizer.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(ValueTokenizer.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"decl... | {
"body": "public String[] getValuesAsArray() {\n if (values.isEmpty()) {\n return null;\n }\n\n return values.toArray(new String[0]);\n }",
"class_method_signature": "ValueTokenizer.getValuesAsArray()",
"constructor": false,
"full_signature": "public String[] getValuesAsArray... | {
"created": "10/14/2016 3:14:46 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 70921758,
"size": null,
"stargazer_count": null,
"stars": 144,
"updates": "2020-01-27T13:05:02+00:00",
"url": "https://github.com/eclipse/kapua"
... |
70921758_542 | {
"fields": [],
"file": "commons/src/test/java/org/eclipse/kapua/commons/cache/LocalCacheTest.java",
"identifier": "LocalCacheTest",
"interfaces": "",
"superclass": "extends Assert"
} | {
"body": "@Test\n public void getAllKeysTest() {\n int[] sizeMaxList = new int[]{10, 1000, 10000, 2147483647};\n int[] expireAfterList = new int[]{1, 10, 1000, 10000, 2147483647};\n int zeroExpireAfter = 0;\n Object[] defaultValueList = new Object[]{0, 10, 100000, \"String\", 'c', -10,... | {
"fields": [
{
"declarator": "logger = LoggerFactory.getLogger(LocalCache.class)",
"modifier": "@SuppressWarnings(\"unused\")\n private static final",
"original_string": "@SuppressWarnings(\"unused\")\n private static final Logger logger = LoggerFactory.getLogger(LocalCache.class);",
... | {
"body": "public List<K> getAllKeys() {\n ArrayList<K> keys = new ArrayList<K>();\n if (cache != null) {\n keys.addAll(cache.asMap().keySet());\n }\n return keys;\n }",
"class_method_signature": "LocalCache.getAllKeys()",
"constructor": false,
"full_signature": "public... | {
"created": "10/14/2016 3:14:46 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 70921758,
"size": null,
"stargazer_count": null,
"stars": 144,
"updates": "2020-01-27T13:05:02+00:00",
"url": "https://github.com/eclipse/kapua"
... |
70921758_43 | {
"fields": [
{
"declarator": "tadImpl",
"modifier": "",
"original_string": "TadImpl tadImpl;",
"type": "TadImpl",
"var_name": "tadImpl"
},
{
"declarator": "toption",
"modifier": "",
"original_string": "ToptionImpl toption;",
"type": "ToptionImpl",
... | {
"body": "@Test\n public void getAnyTest() {\n assertTrue(tadImpl.getAny().isEmpty());\n }",
"class_method_signature": "TadImplTest.getAnyTest()",
"constructor": false,
"full_signature": "@Test public void getAnyTest()",
"identifier": "getAnyTest",
"invocations": [
"assertTrue",
"isEmp... | {
"fields": [
{
"declarator": "option",
"modifier": "protected",
"original_string": "protected List<ToptionImpl> option;",
"type": "List<ToptionImpl>",
"var_name": "option"
},
{
"declarator": "any",
"modifier": "protected",
"original_string": "protected List... | {
"body": "public List<Object> getAny() {\n if (any == null) {\n any = new ArrayList<Object>();\n }\n return this.any;\n }",
"class_method_signature": "TadImpl.getAny()",
"constructor": false,
"full_signature": "public List<Object> getAny()",
"identifier": "getAny",
"invoc... | {
"created": "10/14/2016 3:14:46 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 70921758,
"size": null,
"stargazer_count": null,
"stars": 144,
"updates": "2020-01-27T13:05:02+00:00",
"url": "https://github.com/eclipse/kapua"
... |
70921758_391 | {
"fields": [],
"file": "commons/src/test/java/org/eclipse/kapua/commons/service/internal/cache/KapuaCacheManagerTest.java",
"identifier": "KapuaCacheManagerTest",
"interfaces": "",
"superclass": "extends Assert"
} | {
"body": "@Test\n public void invalidateAllTest() {\n KapuaCacheManager.invalidateAll();\n }",
"class_method_signature": "KapuaCacheManagerTest.invalidateAllTest()",
"constructor": false,
"full_signature": "@Test public void invalidateAllTest()",
"identifier": "invalidateAllTest",
"invocations... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(KapuaCacheManager.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOGGER = LoggerFactory.getLogger(KapuaCacheManager.class);",
"type": "Logger",
"var_name": "LOGGER"
},
... | {
"body": "public static void invalidateAll() {\n CACHE_MAP.forEach((cacheKey, cache) -> {\n cache.clear();\n registeredCache.dec();\n });\n }",
"class_method_signature": "KapuaCacheManager.invalidateAll()",
"constructor": false,
"full_signature": "public static void inval... | {
"created": "10/14/2016 3:14:46 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 70921758,
"size": null,
"stargazer_count": null,
"stars": 144,
"updates": "2020-01-27T13:05:02+00:00",
"url": "https://github.com/eclipse/kapua"
... |
70921758_684 | {
"fields": [
{
"declarator": "executor",
"modifier": "private",
"original_string": "private ExecutorService executor;",
"type": "ExecutorService",
"var_name": "executor"
}
],
"file": "client/gateway/spi/src/test/java/org/eclipse/kapua/client/gateway/spi/util/TransportProxyTe... | {
"body": "@Test(expected = NullPointerException.class)\n public void testFail1() {\n TransportProxy.proxy(null, executor);\n }",
"class_method_signature": "TransportProxyTest.testFail1()",
"constructor": false,
"full_signature": "@Test(expected = NullPointerException.class) public void testFail1()... | {
"fields": [
{
"declarator": "transport",
"modifier": "private final",
"original_string": "private final Transport transport;",
"type": "Transport",
"var_name": "transport"
},
{
"declarator": "executor",
"modifier": "private final",
"original_string": "priv... | {
"body": "public static TransportProxy proxy(final Transport transport, final Executor executor) {\n Objects.requireNonNull(transport);\n Objects.requireNonNull(executor);\n\n return new TransportProxy(transport, executor);\n }",
"class_method_signature": "TransportProxy.proxy(final Transpo... | {
"created": "10/14/2016 3:14:46 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 70921758,
"size": null,
"stargazer_count": null,
"stars": 144,
"updates": "2020-01-27T13:05:02+00:00",
"url": "https://github.com/eclipse/kapua"
... |
70921758_450 | {
"fields": [],
"file": "commons/src/test/java/org/eclipse/kapua/commons/service/event/store/internal/EventStoreRecordCreatorImplTest.java",
"identifier": "EventStoreRecordCreatorImplTest",
"interfaces": "",
"superclass": "extends Assert"
} | {
"body": "@Test\n public void eventStoreRecordCreatorImplTest() {\n KapuaId[] scopeIdList = {null, new KapuaIdStatic(BigInteger.ONE)};\n\n for (KapuaId scopeId : scopeIdList) {\n EventStoreRecordCreatorImpl eventStoreRecordCreatorImpl = new EventStoreRecordCreatorImpl(scopeId);\n ... | {
"fields": [
{
"declarator": "serialVersionUID = 1048699703033893534L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 1048699703033893534L;",
"type": "long",
"var_name": "serialVersionUID"
}
],
"file": "commons/src/main/... | {
"body": "public EventStoreRecordCreatorImpl(KapuaId scopeId) {\n super(scopeId);\n }",
"class_method_signature": "EventStoreRecordCreatorImpl.EventStoreRecordCreatorImpl(KapuaId scopeId)",
"constructor": true,
"full_signature": "public EventStoreRecordCreatorImpl(KapuaId scopeId)",
"identifier": ... | {
"created": "10/14/2016 3:14:46 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 70921758,
"size": null,
"stargazer_count": null,
"stars": 144,
"updates": "2020-01-27T13:05:02+00:00",
"url": "https://github.com/eclipse/kapua"
... |
70921758_515 | {
"fields": [
{
"declarator": "key",
"modifier": "",
"original_string": "SimpleSettingKey key;",
"type": "SimpleSettingKey",
"var_name": "key"
},
{
"declarator": "map",
"modifier": "",
"original_string": "Map<String, Object> map;",
"type": "Map<String,... | {
"body": "@Test(expected = NullPointerException.class)\n public void getDoubleNullTest() {\n map.put(\"Key\", 10.11);\n\n abstractBaseKapuaSetting.getDouble(null);\n }",
"class_method_signature": "AbstractBaseKapuaSettingTest.getDoubleNullTest()",
"constructor": false,
"full_signature": "@T... | {
"fields": [
{
"declarator": "systemPropertyHotSwap",
"modifier": "private",
"original_string": "private boolean systemPropertyHotSwap;",
"type": "boolean",
"var_name": "systemPropertyHotSwap"
},
{
"declarator": "config",
"modifier": "protected final",
"ori... | {
"body": "public double getDouble(K key) {\n if (systemPropertyHotSwap) {\n String sysProp = System.getProperty(key.key());\n if (sysProp != null) {\n return PropertyConverter.toDouble(sysProp);\n }\n }\n return config.getDouble(key.key());\n }"... | {
"created": "10/14/2016 3:14:46 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 70921758,
"size": null,
"stargazer_count": null,
"stars": 144,
"updates": "2020-01-27T13:05:02+00:00",
"url": "https://github.com/eclipse/kapua"
... |
70921758_145 | {
"fields": [],
"file": "commons/src/test/java/org/eclipse/kapua/commons/configuration/ValueTokenizerTest.java",
"identifier": "ValueTokenizerTest",
"interfaces": "",
"superclass": "extends Assert"
} | {
"body": "@Test\n public void validateMinAndMaxDoubleRestrictionTest() {\n ValueTokenizer valueTokenizer = new ValueTokenizer(\"12, 99\");\n TadImpl tad = new TadImpl();\n tad.setCardinality(10);\n tad.setType(TscalarImpl.DOUBLE);\n tad.setMin(\"10\");\n tad.setMax(\"100\... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(ValueTokenizer.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(ValueTokenizer.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"decl... | {
"body": "public String validate(KapuaTad ad) {\n // An empty list means the original value was null. Null is never valid.\n if (values.isEmpty()) {\n return NULL_VALUE_INVALID;\n }\n try {\n // A value must match the cardinality.\n int cardinality = Math.... | {
"created": "10/14/2016 3:14:46 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 70921758,
"size": null,
"stargazer_count": null,
"stars": 144,
"updates": "2020-01-27T13:05:02+00:00",
"url": "https://github.com/eclipse/kapua"
... |
70921758_14 | {
"fields": [
{
"declarator": "exception",
"modifier": "",
"original_string": "TransportClientGetException exception;",
"type": "TransportClientGetException",
"var_name": "exception"
}
],
"file": "transport/api/src/test/java/org/eclipse/kapua/transport/exception/TransportClie... | {
"body": "@Test\n public void getRequestMessageNullTest() {\n TransportClientGetException transportClientGetException = new TransportClientGetException(null);\n assertNull(transportClientGetException.getRequestMessage());\n }",
"class_method_signature": "TransportClientGetExceptionTest.getReque... | {
"fields": [
{
"declarator": "serverIp",
"modifier": "private final",
"original_string": "private final String serverIp;",
"type": "String",
"var_name": "serverIp"
}
],
"file": "transport/api/src/main/java/org/eclipse/kapua/transport/exception/TransportClientGetException.jav... | {
"body": "public String getRequestMessage() {\n return serverIp;\n }",
"class_method_signature": "TransportClientGetException.getRequestMessage()",
"constructor": false,
"full_signature": "public String getRequestMessage()",
"identifier": "getRequestMessage",
"invocations": [],
"modifiers": "pu... | {
"created": "10/14/2016 3:14:46 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 70921758,
"size": null,
"stargazer_count": null,
"stars": 144,
"updates": "2020-01-27T13:05:02+00:00",
"url": "https://github.com/eclipse/kapua"
... |
70921758_329 | {
"fields": [
{
"declarator": "attributeName",
"modifier": "private final",
"original_string": "private final String attributeName;",
"type": "String",
"var_name": "attributeName"
},
{
"declarator": "operator",
"modifier": "private final",
"original_string":... | {
"body": "@Test\n public void attributePredicateImplTest() {\n String attributeValueStr = \"\";\n AttributePredicateImpl<String> attributePredicateStr = new AttributePredicateImpl<>(attributeName, attributeValueStr);\n assertEquals(\"Actual and expected values are not the same!\", attributeNa... | {
"fields": [
{
"declarator": "attributeName",
"modifier": "private",
"original_string": "private String attributeName;",
"type": "String",
"var_name": "attributeName"
},
{
"declarator": "attributeValue",
"modifier": "private",
"original_string": "private T ... | {
"body": "public AttributePredicateImpl(String attributeName, T attributeValue) {\n this(attributeName, attributeValue, Operator.EQUAL);\n }",
"class_method_signature": "AttributePredicateImpl.AttributePredicateImpl(String attributeName, T attributeValue)",
"constructor": true,
"full_signature": "pub... | {
"created": "10/14/2016 3:14:46 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 70921758,
"size": null,
"stargazer_count": null,
"stars": 144,
"updates": "2020-01-27T13:05:02+00:00",
"url": "https://github.com/eclipse/kapua"
... |
70921758_283 | {
"fields": [],
"file": "commons/src/test/java/org/eclipse/kapua/commons/util/StringUtilTest.java",
"identifier": "StringUtilTest",
"interfaces": "",
"superclass": "extends Assert"
} | {
"body": "@Test\n public void valueToStringTypeShortArrayTest() {\n Short[] shortArray = new Short[]{null, 0, 1, 12, 123, 1234, 32767, -32768, -1234, -123, -12, -1, -0};\n String resultString = \"0,1,12,123,1234,32767,-32768,-1234,-123,-12,-1,0\";\n assertEquals(\"Expected and actual values s... | {
"fields": [
{
"declarator": "DELIMITER = ','",
"modifier": "private static final",
"original_string": "private static final char DELIMITER = ',';",
"type": "char",
"var_name": "DELIMITER"
},
{
"declarator": "ESCAPE = '\\\\'",
"modifier": "private static final",
... | {
"body": "public static String valueToString(Object value) {\n String result = null;\n if (value == null) {\n result = null;\n } else if (value instanceof String) {\n result = value.toString();\n } else if (value instanceof Long) {\n result = value.toStrin... | {
"created": "10/14/2016 3:14:46 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 70921758,
"size": null,
"stargazer_count": null,
"stars": 144,
"updates": "2020-01-27T13:05:02+00:00",
"url": "https://github.com/eclipse/kapua"
... |
70921758_446 | {
"fields": [],
"file": "commons/src/test/java/org/eclipse/kapua/commons/service/internal/cache/dummy/CacheManagerTest.java",
"identifier": "CacheManagerTest",
"interfaces": "",
"superclass": "extends Assert"
} | {
"body": "@Test\n public void unwrapTest() {\n Class[] clazz = new Class[]{Integer.class, Character.class, String.class, Long.class, Double.class, Byte.class, Boolean.class};\n for (int i = 0; i < clazz.length; i++) {\n assertNull(\"Null expected\", CacheManager.getInstance().unwrap(clazz... | {
"fields": [
{
"declarator": "instance",
"modifier": "private static",
"original_string": "private static CacheManager instance;",
"type": "CacheManager",
"var_name": "instance"
}
],
"file": "commons/src/main/java/org/eclipse/kapua/commons/service/internal/cache/dummy/CacheM... | {
"body": "@Override\n public <T> T unwrap(Class<T> clazz) {\n return null;\n }",
"class_method_signature": "CacheManager.unwrap(Class<T> clazz)",
"constructor": false,
"full_signature": "@Override public T unwrap(Class<T> clazz)",
"identifier": "unwrap",
"invocations": [],
"modifiers": "@Ove... | {
"created": "10/14/2016 3:14:46 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 70921758,
"size": null,
"stargazer_count": null,
"stars": 144,
"updates": "2020-01-27T13:05:02+00:00",
"url": "https://github.com/eclipse/kapua"
... |
70921758_153 | {
"fields": [],
"file": "commons/src/test/java/org/eclipse/kapua/commons/configuration/ValueTokenizerTest.java",
"identifier": "ValueTokenizerTest",
"interfaces": "",
"superclass": "extends Assert"
} | {
"body": "@Test\n public void validateWithFloatTypeWitMaxRestrictionTest() {\n ValueTokenizer valueTokenizer = new ValueTokenizer(\"12, 99\");\n TadImpl tad = new TadImpl();\n tad.setCardinality(10);\n tad.setType(TscalarImpl.FLOAT);\n tad.setMax(\"50\");\n String message... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(ValueTokenizer.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(ValueTokenizer.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"decl... | {
"body": "public String validate(KapuaTad ad) {\n // An empty list means the original value was null. Null is never valid.\n if (values.isEmpty()) {\n return NULL_VALUE_INVALID;\n }\n try {\n // A value must match the cardinality.\n int cardinality = Math.... | {
"created": "10/14/2016 3:14:46 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 70921758,
"size": null,
"stargazer_count": null,
"stars": 144,
"updates": "2020-01-27T13:05:02+00:00",
"url": "https://github.com/eclipse/kapua"
... |
70921758_503 | {
"fields": [
{
"declarator": "key",
"modifier": "",
"original_string": "SimpleSettingKey key;",
"type": "SimpleSettingKey",
"var_name": "key"
},
{
"declarator": "map",
"modifier": "",
"original_string": "Map<String, Object> map;",
"type": "Map<String,... | {
"body": "@Test(expected = NullPointerException.class)\n public void getLongNullTest() {\n abstractBaseKapuaSetting.getLong(null);\n }",
"class_method_signature": "AbstractBaseKapuaSettingTest.getLongNullTest()",
"constructor": false,
"full_signature": "@Test(expected = NullPointerException.class)... | {
"fields": [
{
"declarator": "systemPropertyHotSwap",
"modifier": "private",
"original_string": "private boolean systemPropertyHotSwap;",
"type": "boolean",
"var_name": "systemPropertyHotSwap"
},
{
"declarator": "config",
"modifier": "protected final",
"ori... | {
"body": "public long getLong(K key) {\n if (systemPropertyHotSwap) {\n String sysProp = System.getProperty(key.key());\n if (sysProp != null) {\n return PropertyConverter.toLong(sysProp);\n }\n }\n return config.getLong(key.key());\n }",
"cla... | {
"created": "10/14/2016 3:14:46 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 70921758,
"size": null,
"stargazer_count": null,
"stars": 144,
"updates": "2020-01-27T13:05:02+00:00",
"url": "https://github.com/eclipse/kapua"
... |
70921758_295 | {
"fields": [],
"file": "commons/src/test/java/org/eclipse/kapua/commons/util/KapuaFileUtilsTest.java",
"identifier": "KapuaFileUtilsTest",
"interfaces": "",
"superclass": "extends Assert"
} | {
"body": "@Test(expected = Exception.class)\n public void getAsUrlPositiveAndNegativeTest() throws KapuaSettingException, MalformedURLException {\n String[] permittedFormats = new String[]{\"https://www.example3345.com/\", \"http://www.example.com:1080/docs/resource1.html\",\n \"https://www.... | {
"fields": [],
"file": "commons/src/main/java/org/eclipse/kapua/commons/util/KapuaFileUtils.java",
"identifier": "KapuaFileUtils",
"interfaces": "",
"methods": [
{
"class_method_signature": "KapuaFileUtils.KapuaFileUtils()",
"constructor": true,
"full_signature": "private KapuaFileUtil... | {
"body": "public static URL getAsURL(String filePath) throws KapuaSettingException {\n\n URL fileURL;\n try {\n if (hasValidScheme(filePath)) {\n fileURL = new URL(filePath);\n } else {\n fileURL = ResourceUtils.getResource(filePath);\n }\n... | {
"created": "10/14/2016 3:14:46 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 70921758,
"size": null,
"stargazer_count": null,
"stars": 144,
"updates": "2020-01-27T13:05:02+00:00",
"url": "https://github.com/eclipse/kapua"
... |
70921758_411 | {
"fields": [],
"file": "commons/src/test/java/org/eclipse/kapua/commons/service/internal/cache/dummy/CacheTest.java",
"identifier": "CacheTest",
"interfaces": "",
"superclass": "extends Assert"
} | {
"body": "@Test\n public void getAndPutTest() {\n Cache cache = new Cache();\n Object key = \"Key\";\n Object value = \"Value\";\n UnsupportedOperationException unsupportedOperationException = new UnsupportedOperationException();\n try {\n cache.getAndPut(key, value);... | {
"fields": [],
"file": "commons/src/main/java/org/eclipse/kapua/commons/service/internal/cache/dummy/Cache.java",
"identifier": "Cache",
"interfaces": "implements javax.cache.Cache<K, V>",
"methods": [
{
"class_method_signature": "Cache.Cache()",
"constructor": true,
"full_signature": "... | {
"body": "@Override\n public Object getAndPut(Object key, Object value) {\n throw new UnsupportedOperationException();\n }",
"class_method_signature": "Cache.getAndPut(Object key, Object value)",
"constructor": false,
"full_signature": "@Override public Object getAndPut(Object key, Object value)",... | {
"created": "10/14/2016 3:14:46 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 70921758,
"size": null,
"stargazer_count": null,
"stars": 144,
"updates": "2020-01-27T13:05:02+00:00",
"url": "https://github.com/eclipse/kapua"
... |
70921758_9 | {
"fields": [
{
"declarator": "exception",
"modifier": "",
"original_string": "TransportClientGetException exception;",
"type": "TransportClientGetException",
"var_name": "exception"
}
],
"file": "transport/api/src/test/java/org/eclipse/kapua/transport/exception/TransportClie... | {
"body": "@Test\n public void constructorRandomStringsTest() {\n String[] randomStrings = {\"a\", \"0.0.0.0\", \"asdfasfasfaf\", \"{@}]~ˇ^°˘˘˛˘`\", \"test\", \"127.0.0.0\"};\n for (String randomString : randomStrings) {\n try {\n TransportClientGetException transportClientG... | {
"fields": [
{
"declarator": "serverIp",
"modifier": "private final",
"original_string": "private final String serverIp;",
"type": "String",
"var_name": "serverIp"
}
],
"file": "transport/api/src/main/java/org/eclipse/kapua/transport/exception/TransportClientGetException.jav... | {
"body": "public String getRequestMessage() {\n return serverIp;\n }",
"class_method_signature": "TransportClientGetException.getRequestMessage()",
"constructor": false,
"full_signature": "public String getRequestMessage()",
"identifier": "getRequestMessage",
"invocations": [],
"modifiers": "pu... | {
"created": "10/14/2016 3:14:46 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 70921758,
"size": null,
"stargazer_count": null,
"stars": 144,
"updates": "2020-01-27T13:05:02+00:00",
"url": "https://github.com/eclipse/kapua"
... |
70921758_554 | {
"fields": [
{
"declarator": "metricRegistry",
"modifier": "",
"original_string": "MetricRegistry metricRegistry;",
"type": "MetricRegistry",
"var_name": "metricRegistry"
},
{
"declarator": "metricServiceImpl",
"modifier": "",
"original_string": "MetricsSer... | {
"body": "@Test\n public void getHistogramTest() {\n assertNotNull(\"Histogram object should be returned!\", metricServiceImpl.getHistogram(\"module\", \"component\", \"name1\", \"name2\", \"name3\"));\n assertTrue(\"The keys does not exist!\", metricServiceImpl.getMetricRegistry().getMetrics().cont... | {
"fields": [
{
"declarator": "logger = LoggerFactory.getLogger(MetricsServiceImpl.class)",
"modifier": "private static final",
"original_string": "private static final Logger logger = LoggerFactory.getLogger(MetricsServiceImpl.class);",
"type": "Logger",
"var_name": "logger"
},
... | {
"body": "@Override\n public Histogram getHistogram(String module, String component, String... names) {\n String name = getMetricName(module, component, names);\n Histogram histogram = metricRegistry.getHistograms().get(name);\n if (histogram == null) {\n logger.debug(\"Creating a ... | {
"created": "10/14/2016 3:14:46 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 70921758,
"size": null,
"stargazer_count": null,
"stars": 144,
"updates": "2020-01-27T13:05:02+00:00",
"url": "https://github.com/eclipse/kapua"
... |
70921758_104 | {
"fields": [],
"file": "commons/src/test/java/org/eclipse/kapua/commons/configuration/ValueTokenizerTest.java",
"identifier": "ValueTokenizerTest",
"interfaces": "",
"superclass": "extends Assert"
} | {
"body": "@Test\n public void valueTokenizerEscapeTest() throws Exception {\n ValueTokenizer valueTokenizer = new ValueTokenizer(\"a123\\\\aaa\\\\rrr\");\n try {\n assertEquals(\"a123aaarrr\", valueTokenizer.getValuesAsString());\n } catch (Exception ex){\n fail(\"Failed... | {
"fields": [
{
"declarator": "LOG = LoggerFactory.getLogger(ValueTokenizer.class)",
"modifier": "private static final",
"original_string": "private static final Logger LOG = LoggerFactory.getLogger(ValueTokenizer.class);",
"type": "Logger",
"var_name": "LOG"
},
{
"decl... | {
"body": "public String getValuesAsString() {\n if (values.isEmpty()) {\n return null;\n }\n\n if (values.size() == 1) {\n return values.get(0);\n }\n\n StringBuilder builder = new StringBuilder(values.get(0));\n for (int i = 1; i < values.size(); i++) ... | {
"created": "10/14/2016 3:14:46 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 70921758,
"size": null,
"stargazer_count": null,
"stars": 144,
"updates": "2020-01-27T13:05:02+00:00",
"url": "https://github.com/eclipse/kapua"
... |
70921758_387 | {
"fields": [],
"file": "commons/src/test/java/org/eclipse/kapua/commons/service/internal/cache/EntityCacheTest.java",
"identifier": "EntityCacheTest",
"interfaces": "",
"superclass": "extends Assert"
} | {
"body": "@Test\n public void removeListTest() {\n EntityCache entityCache = new EntityCache(\"IdCacheName\");\n KapuaId scopeId = new KapuaIdStatic(BigInteger.ONE);\n KapuaId scopeId1 = new KapuaIdStatic(BigInteger.ONE);\n Serializable key = new ComposedKey(scopeId1, null);\n S... | {
"fields": [
{
"declarator": "LOGGER = LoggerFactory.getLogger(EntityCache.class)",
"modifier": "protected static final",
"original_string": "protected static final Logger LOGGER = LoggerFactory.getLogger(EntityCache.class);",
"type": "Logger",
"var_name": "LOGGER"
},
{
... | {
"body": "public KapuaListResult removeList(KapuaId scopeId, Serializable id) {\n // First get the entity in order to perform a check of the scope id\n if (id != null) {\n KapuaListResult entity = getList(scopeId, id);\n if (entity != null) {\n listsCache.remove(new... | {
"created": "10/14/2016 3:14:46 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 70921758,
"size": null,
"stargazer_count": null,
"stars": 144,
"updates": "2020-01-27T13:05:02+00:00",
"url": "https://github.com/eclipse/kapua"
... |
70921758_55 | {
"fields": [],
"file": "commons/src/test/java/org/eclipse/kapua/commons/configuration/metatype/KapuaMetatypeFactoryImplTest.java",
"identifier": "KapuaMetatypeFactoryImplTest",
"interfaces": "",
"superclass": "extends Assert"
} | {
"body": "@Test\n public void testNewKapuaTobject() {\n KapuaMetatypeFactoryImpl factory = new KapuaMetatypeFactoryImpl();\n Assert.assertNotNull(factory.newKapuaTobject());\n }",
"class_method_signature": "KapuaMetatypeFactoryImplTest.testNewKapuaTobject()",
"constructor": false,
"full_sig... | {
"fields": [],
"file": "commons/src/main/java/org/eclipse/kapua/commons/configuration/metatype/KapuaMetatypeFactoryImpl.java",
"identifier": "KapuaMetatypeFactoryImpl",
"interfaces": "implements KapuaMetatypeFactory",
"methods": [
{
"class_method_signature": "KapuaMetatypeFactoryImpl.newKapuaTocd()... | {
"body": "public KapuaTobject newKapuaTobject() {\n return new TobjectImpl();\n }",
"class_method_signature": "KapuaMetatypeFactoryImpl.newKapuaTobject()",
"constructor": false,
"full_signature": "public KapuaTobject newKapuaTobject()",
"identifier": "newKapuaTobject",
"invocations": [],
"modif... | {
"created": "10/14/2016 3:14:46 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 70921758,
"size": null,
"stargazer_count": null,
"stars": 144,
"updates": "2020-01-27T13:05:02+00:00",
"url": "https://github.com/eclipse/kapua"
... |
70921758_692 | {
"fields": [],
"file": "client/gateway/spi/src/test/java/org/eclipse/kapua/client/gateway/spi/util/BuffersTest.java",
"identifier": "BuffersTest",
"interfaces": "",
"superclass": ""
} | {
"body": "@Test\n public void test4() {\n final ByteBuffer input = ByteBuffer.allocate(1);\n input.put((byte) 12);\n\n input.flip();\n\n final byte[] result = Buffers.toByteArray(input);\n Assert.assertNotNull(result);\n Assert.assertEquals(1, result.length);\n Ass... | {
"fields": [],
"file": "client/gateway/spi/src/main/java/org/eclipse/kapua/client/gateway/spi/util/Buffers.java",
"identifier": "Buffers",
"interfaces": "",
"methods": [
{
"class_method_signature": "Buffers.Buffers()",
"constructor": true,
"full_signature": "private Buffers()",
"... | {
"body": "public static byte[] toByteArray(final ByteBuffer buffer) {\n if (buffer == null) {\n return null;\n }\n\n final byte[] byteArray = new byte[buffer.remaining()];\n buffer.get(byteArray);\n return byteArray;\n }",
"class_method_signature": "Buffers.toByteAr... | {
"created": "10/14/2016 3:14:46 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 70921758,
"size": null,
"stargazer_count": null,
"stars": 144,
"updates": "2020-01-27T13:05:02+00:00",
"url": "https://github.com/eclipse/kapua"
... |
70921758_368 | {
"fields": [
{
"declarator": "RANDOM = RandomUtils.getInstance()",
"modifier": "private final static",
"original_string": "private final static Random RANDOM = RandomUtils.getInstance();",
"type": "Random",
"var_name": "RANDOM"
},
{
"declarator": "eid",
"modifier... | {
"body": "@Test\n public void getIdTest() {\n KapuaEid kapuaEid = new KapuaEid(eid);\n assertEquals(eid, kapuaEid.getId());\n }",
"class_method_signature": "KapuaEidTest.getIdTest()",
"constructor": false,
"full_signature": "@Test public void getIdTest()",
"identifier": "getIdTest",
"in... | {
"fields": [
{
"declarator": "serialVersionUID = 8998805462408705432L",
"modifier": "private static final",
"original_string": "private static final long serialVersionUID = 8998805462408705432L;",
"type": "long",
"var_name": "serialVersionUID"
},
{
"declarator": "eid",... | {
"body": "@Override\n public BigInteger getId() {\n return eid;\n }",
"class_method_signature": "KapuaEid.getId()",
"constructor": false,
"full_signature": "@Override public BigInteger getId()",
"identifier": "getId",
"invocations": [],
"modifiers": "@Override public",
"parameters": "()",
... | {
"created": "10/14/2016 3:14:46 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 70921758,
"size": null,
"stargazer_count": null,
"stars": 144,
"updates": "2020-01-27T13:05:02+00:00",
"url": "https://github.com/eclipse/kapua"
... |
70921758_485 | {
"fields": [
{
"declarator": "key",
"modifier": "",
"original_string": "SimpleSettingKey key;",
"type": "SimpleSettingKey",
"var_name": "key"
},
{
"declarator": "map",
"modifier": "",
"original_string": "Map<String, Object> map;",
"type": "Map<String,... | {
"body": "@Test(expected = NullPointerException.class)\n public void getIntNullTest() {\n abstractBaseKapuaSetting.getInt(null);\n }",
"class_method_signature": "AbstractBaseKapuaSettingTest.getIntNullTest()",
"constructor": false,
"full_signature": "@Test(expected = NullPointerException.class) pu... | {
"fields": [
{
"declarator": "systemPropertyHotSwap",
"modifier": "private",
"original_string": "private boolean systemPropertyHotSwap;",
"type": "boolean",
"var_name": "systemPropertyHotSwap"
},
{
"declarator": "config",
"modifier": "protected final",
"ori... | {
"body": "public int getInt(K key) {\n if (systemPropertyHotSwap) {\n String sysProp = System.getProperty(key.key());\n if (sysProp != null) {\n return PropertyConverter.toInteger(sysProp);\n }\n }\n return config.getInt(key.key());\n }",
"cla... | {
"created": "10/14/2016 3:14:46 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 70921758,
"size": null,
"stargazer_count": null,
"stars": 144,
"updates": "2020-01-27T13:05:02+00:00",
"url": "https://github.com/eclipse/kapua"
... |
70921758_190 | {
"fields": [],
"file": "commons/src/test/java/org/eclipse/kapua/commons/util/xml/XmlNamespaceFilterTest.java",
"identifier": "XmlNamespaceFilterTest",
"interfaces": "",
"superclass": "extends Assert"
} | {
"body": "@Test\n public void testStartDocument() throws Exception {\n XmlNamespaceFilter startDoc1 = new XmlNamespaceFilter(\"string\", true);\n XmlNamespaceFilter startDoc2 = new XmlNamespaceFilter(\"string\", false);\n startDoc1.startDocument();\n startDoc2.startDocument();\n }",... | {
"fields": [
{
"declarator": "usedNamespaceUri",
"modifier": "private",
"original_string": "private String usedNamespaceUri;",
"type": "String",
"var_name": "usedNamespaceUri"
},
{
"declarator": "addNamespace",
"modifier": "private",
"original_string": "pri... | {
"body": "@Override\n public void startDocument()\n throws SAXException {\n super.startDocument();\n if (addNamespace) {\n startControlledPrefixMapping();\n }\n }",
"class_method_signature": "XmlNamespaceFilter.startDocument()",
"constructor": false,
"full_signa... | {
"created": "10/14/2016 3:14:46 PM +00:00",
"fork": "False",
"fork_count": null,
"is_fork": null,
"language": null,
"license": "licensed",
"repo_id": 70921758,
"size": null,
"stargazer_count": null,
"stars": 144,
"updates": "2020-01-27T13:05:02+00:00",
"url": "https://github.com/eclipse/kapua"
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.