diff --git a/gradle.properties b/gradle.properties index 01a1a40f..a38854d7 100644 --- a/gradle.properties +++ b/gradle.properties @@ -6,7 +6,7 @@ jgVersion=0.5.3 neo4jDriverVersion=4.2.0 khttpVersion=1.0.0 jacksonVersion=2.12.0 -shiftleftVersion=1.3.62 +shiftleftVersion=1.3.67 sootVersion=4.2.1 lz4Version=1.7.1 diff --git a/plume/src/main/kotlin/io/github/plume/oss/Extractor.kt b/plume/src/main/kotlin/io/github/plume/oss/Extractor.kt index c70f667c..60a47c7f 100644 --- a/plume/src/main/kotlin/io/github/plume/oss/Extractor.kt +++ b/plume/src/main/kotlin/io/github/plume/oss/Extractor.kt @@ -327,7 +327,7 @@ class Extractor(val driver: IDriver) { } // Connect type decls to their modifiers obtainModifiersFromTypeDeclVert(t).forEachIndexed { i, m -> - driver.addEdge(t, NewModifierBuilder().modifiertype(m).order(i + 1), AST) + driver.addEdge(t, NewModifierBuilder().modifierType(m).order(i + 1), AST) } } } @@ -397,7 +397,7 @@ class Extractor(val driver: IDriver) { val typeDecl = buildTypeDeclaration(cls.type, false) driver.addEdge(typeDecl, file, SOURCE_FILE) determineModifiers(cls.modifiers) - .mapIndexed { i, m -> NewModifierBuilder().modifiertype(m).order(i + 1) } + .mapIndexed { i, m -> NewModifierBuilder().modifierType(m).order(i + 1) } .forEach { driver.addEdge(typeDecl, it, AST) } addSootToPlumeAssociation(cls, typeDecl) cls.fields.forEachIndexed { i, field -> diff --git a/plume/src/main/kotlin/io/github/plume/oss/domain/mappers/VertexMapper.kt b/plume/src/main/kotlin/io/github/plume/oss/domain/mappers/VertexMapper.kt index cce225fb..07fd8042 100644 --- a/plume/src/main/kotlin/io/github/plume/oss/domain/mappers/VertexMapper.kt +++ b/plume/src/main/kotlin/io/github/plume/oss/domain/mappers/VertexMapper.kt @@ -59,49 +59,49 @@ object VertexMapper { .order(map["ORDER"] as Int) .id(map["id"] as Long) Method.Label() -> NewMethodBuilder() - .astparentfullname(map["AST_PARENT_FULL_NAME"] as String) - .astparenttype(map["AST_PARENT_TYPE"] as String) + .astParentFullName(map["AST_PARENT_FULL_NAME"] as String) + .astParentType(map["AST_PARENT_TYPE"] as String) .name(map["NAME"] as String) .code(map["CODE"] as String) - .fullname(map["FULL_NAME"] as String) + .fullName(map["FULL_NAME"] as String) .signature(map["SIGNATURE"] as String) - .linenumber(Option.apply(map["LINE_NUMBER"] as Int)) - .columnnumber(Option.apply(map["COLUMN_NUMBER"] as Int)) + .lineNumber(Option.apply(map["LINE_NUMBER"] as Int)) + .columnNumber(Option.apply(map["COLUMN_NUMBER"] as Int)) .order(map["ORDER"] as Int) .id(map["id"] as Long) MethodParameterIn.Label() -> NewMethodParameterInBuilder() .code(map["CODE"] as String) .name(map["NAME"] as String) - .evaluationstrategy(map["EVALUATION_STRATEGY"] as String) - .typefullname(map["TYPE_FULL_NAME"] as String) - .linenumber(Option.apply(map["LINE_NUMBER"] as Int)) - .columnnumber(Option.apply(map["COLUMN_NUMBER"] as Int)) + .evaluationStrategy(map["EVALUATION_STRATEGY"] as String) + .typeFullName(map["TYPE_FULL_NAME"] as String) + .lineNumber(Option.apply(map["LINE_NUMBER"] as Int)) + .columnNumber(Option.apply(map["COLUMN_NUMBER"] as Int)) .order(map["ORDER"] as Int) .id(map["id"] as Long) MethodReturn.Label() -> NewMethodReturnBuilder() .code(map["CODE"] as String) - .evaluationstrategy(map["EVALUATION_STRATEGY"] as String) - .typefullname(map["TYPE_FULL_NAME"] as String) - .linenumber(Option.apply(map["LINE_NUMBER"] as Int)) - .columnnumber(Option.apply(map["COLUMN_NUMBER"] as Int)) + .evaluationStrategy(map["EVALUATION_STRATEGY"] as String) + .typeFullName(map["TYPE_FULL_NAME"] as String) + .lineNumber(Option.apply(map["LINE_NUMBER"] as Int)) + .columnNumber(Option.apply(map["COLUMN_NUMBER"] as Int)) .order(map["ORDER"] as Int) .id(map["id"] as Long) Modifier.Label() -> NewModifierBuilder() - .modifiertype(map["MODIFIER_TYPE"] as String) + .modifierType(map["MODIFIER_TYPE"] as String) .order(map["ORDER"] as Int) .id(map["id"] as Long) Type.Label() -> NewTypeBuilder() .name(map["NAME"] as String) - .fullname(map["FULL_NAME"] as String) - .typedeclfullname(map["TYPE_DECL_FULL_NAME"] as String) + .fullName(map["FULL_NAME"] as String) + .typeDeclFullName(map["TYPE_DECL_FULL_NAME"] as String) .id(map["id"] as Long) TypeDecl.Label() -> NewTypeDeclBuilder() - .astparentfullname(map["AST_PARENT_FULL_NAME"] as String) - .astparenttype(map["AST_PARENT_TYPE"] as String) + .astParentFullName(map["AST_PARENT_FULL_NAME"] as String) + .astParentType(map["AST_PARENT_TYPE"] as String) .name(map["NAME"] as String) - .fullname(map["FULL_NAME"] as String) + .fullName(map["FULL_NAME"] as String) .order(map["ORDER"] as Int) - .isexternal(map["IS_EXTERNAL"] as Boolean) + .isExternal(map["IS_EXTERNAL"] as Boolean) .id(map["id"] as Long) TypeParameter.Label() -> NewTypeParameterBuilder() .name(map["NAME"] as String) @@ -111,37 +111,37 @@ object VertexMapper { .order(map["ORDER"] as Int) .id(map["id"] as Long) Member.Label() -> NewMemberBuilder() - .typefullname(map["TYPE_FULL_NAME"] as String) + .typeFullName(map["TYPE_FULL_NAME"] as String) .code(map["CODE"] as String) .name(map["NAME"] as String) .order(map["ORDER"] as Int) .id(map["id"] as Long) NamespaceBlock.Label() -> NewNamespaceBlockBuilder() - .fullname(map["FULL_NAME"] as String) + .fullName(map["FULL_NAME"] as String) .filename(map["FILENAME"] as String) .name(map["NAME"] as String) .order(map["ORDER"] as Int) .id(map["id"] as Long) Literal.Label() -> NewLiteralBuilder() - .typefullname(map["TYPE_FULL_NAME"] as String) + .typeFullName(map["TYPE_FULL_NAME"] as String) .code(map["CODE"] as String) .order(map["ORDER"] as Int) - .linenumber(Option.apply(map["LINE_NUMBER"] as Int)) - .columnnumber(Option.apply(map["COLUMN_NUMBER"] as Int)) - .argumentindex(map["ARGUMENT_INDEX"] as Int) + .lineNumber(Option.apply(map["LINE_NUMBER"] as Int)) + .columnNumber(Option.apply(map["COLUMN_NUMBER"] as Int)) + .argumentIndex(map["ARGUMENT_INDEX"] as Int) .id(map["id"] as Long) Call.Label() -> NewCallBuilder() - .typefullname(map["TYPE_FULL_NAME"] as String) + .typeFullName(map["TYPE_FULL_NAME"] as String) .code(map["CODE"] as String) .name(map["NAME"] as String) .order(map["ORDER"] as Int) - .linenumber(Option.apply(map["LINE_NUMBER"] as Int)) - .columnnumber(Option.apply(map["COLUMN_NUMBER"] as Int)) - .argumentindex(map["ARGUMENT_INDEX"] as Int) + .lineNumber(Option.apply(map["LINE_NUMBER"] as Int)) + .columnNumber(Option.apply(map["COLUMN_NUMBER"] as Int)) + .argumentIndex(map["ARGUMENT_INDEX"] as Int) .signature(map["SIGNATURE"] as String) - .dispatchtype(map["DISPATCH_TYPE"] as String) - .methodfullname(map["METHOD_FULL_NAME"] as String) - .dynamictypehintfullname( + .dispatchType(map["DISPATCH_TYPE"] as String) + .methodFullName(map["METHOD_FULL_NAME"] as String) + .dynamicTypeHintFullName( when (map["DYNAMIC_TYPE_HINT_FULL_NAME"]) { is String -> createScalaList(map["DYNAMIC_TYPE_HINT_FULL_NAME"] as String) is `$colon$colon`<*> -> createScalaList((map["DYNAMIC_TYPE_HINT_FULL_NAME"] as `$colon$colon`<*>).head() as String) @@ -150,57 +150,57 @@ object VertexMapper { ) .id(map["id"] as Long) Local.Label() -> NewLocalBuilder() - .typefullname(map["TYPE_FULL_NAME"] as String) + .typeFullName(map["TYPE_FULL_NAME"] as String) .code(map["CODE"] as String) .name(map["NAME"] as String) .order(map["ORDER"] as Int) - .linenumber(Option.apply(map["LINE_NUMBER"] as Int)) - .columnnumber(Option.apply(map["COLUMN_NUMBER"] as Int)) + .lineNumber(Option.apply(map["LINE_NUMBER"] as Int)) + .columnNumber(Option.apply(map["COLUMN_NUMBER"] as Int)) .id(map["id"] as Long) Identifier.Label() -> NewIdentifierBuilder() - .typefullname(map["TYPE_FULL_NAME"] as String) + .typeFullName(map["TYPE_FULL_NAME"] as String) .code(map["CODE"] as String) .name(map["NAME"] as String) .order(map["ORDER"] as Int) - .linenumber(Option.apply(map["LINE_NUMBER"] as Int)) - .columnnumber(Option.apply(map["COLUMN_NUMBER"] as Int)) - .argumentindex(map["ARGUMENT_INDEX"] as Int) + .lineNumber(Option.apply(map["LINE_NUMBER"] as Int)) + .columnNumber(Option.apply(map["COLUMN_NUMBER"] as Int)) + .argumentIndex(map["ARGUMENT_INDEX"] as Int) .id(map["id"] as Long) FieldIdentifier.Label() -> NewFieldIdentifierBuilder() - .canonicalname(map["CANONICAL_NAME"] as String) + .canonicalName(map["CANONICAL_NAME"] as String) .code(map["CODE"] as String) .order(map["ORDER"] as Int) - .linenumber(Option.apply(map["LINE_NUMBER"] as Int)) - .columnnumber(Option.apply(map["COLUMN_NUMBER"] as Int)) - .argumentindex(map["ARGUMENT_INDEX"] as Int) + .lineNumber(Option.apply(map["LINE_NUMBER"] as Int)) + .columnNumber(Option.apply(map["COLUMN_NUMBER"] as Int)) + .argumentIndex(map["ARGUMENT_INDEX"] as Int) .id(map["id"] as Long) Return.Label() -> NewReturnBuilder() .code(map["CODE"] as String) .order(map["ORDER"] as Int) - .linenumber(Option.apply(map["LINE_NUMBER"] as Int)) - .columnnumber(Option.apply(map["COLUMN_NUMBER"] as Int)) - .argumentindex(map["ARGUMENT_INDEX"] as Int) + .lineNumber(Option.apply(map["LINE_NUMBER"] as Int)) + .columnNumber(Option.apply(map["COLUMN_NUMBER"] as Int)) + .argumentIndex(map["ARGUMENT_INDEX"] as Int) .id(map["id"] as Long) Block.Label() -> NewBlockBuilder() - .typefullname(map["TYPE_FULL_NAME"] as String) + .typeFullName(map["TYPE_FULL_NAME"] as String) .code(map["CODE"] as String) .order(map["ORDER"] as Int) - .linenumber(Option.apply(map["LINE_NUMBER"] as Int)) - .columnnumber(Option.apply(map["COLUMN_NUMBER"] as Int)) - .argumentindex(map["ARGUMENT_INDEX"] as Int) + .lineNumber(Option.apply(map["LINE_NUMBER"] as Int)) + .columnNumber(Option.apply(map["COLUMN_NUMBER"] as Int)) + .argumentIndex(map["ARGUMENT_INDEX"] as Int) .id(map["id"] as Long) MethodRef.Label() -> NewMethodRefBuilder() .code(map["CODE"] as String) .order(map["ORDER"] as Int) - .methodfullname(map["METHOD_FULL_NAME"] as String) - .methodinstfullname(Option.apply(map["METHOD_INST_FULL_NAME"] as String)) - .linenumber(Option.apply(map["LINE_NUMBER"] as Int)) - .columnnumber(Option.apply(map["COLUMN_NUMBER"] as Int)) - .argumentindex(map["ARGUMENT_INDEX"] as Int) + .methodFullName(map["METHOD_FULL_NAME"] as String) + .methodInstFullName(Option.apply(map["METHOD_INST_FULL_NAME"] as String)) + .lineNumber(Option.apply(map["LINE_NUMBER"] as Int)) + .columnNumber(Option.apply(map["COLUMN_NUMBER"] as Int)) + .argumentIndex(map["ARGUMENT_INDEX"] as Int) .id(map["id"] as Long) TypeRef.Label() -> NewTypeRefBuilder() - .typefullname(map["TYPE_FULL_NAME"] as String) - .dynamictypehintfullname( + .typeFullName(map["TYPE_FULL_NAME"] as String) + .dynamicTypeHintFullName( when (map["DYNAMIC_TYPE_HINT_FULL_NAME"]) { is String -> createScalaList(map["DYNAMIC_TYPE_HINT_FULL_NAME"] as String) is `$colon$colon`<*> -> createScalaList((map["DYNAMIC_TYPE_HINT_FULL_NAME"] as `$colon$colon`<*>).head() as String) @@ -209,32 +209,32 @@ object VertexMapper { ) .code(map["CODE"] as String) .order(map["ORDER"] as Int) - .linenumber(Option.apply(map["LINE_NUMBER"] as Int)) - .columnnumber(Option.apply(map["COLUMN_NUMBER"] as Int)) - .argumentindex(map["ARGUMENT_INDEX"] as Int) + .lineNumber(Option.apply(map["LINE_NUMBER"] as Int)) + .columnNumber(Option.apply(map["COLUMN_NUMBER"] as Int)) + .argumentIndex(map["ARGUMENT_INDEX"] as Int) .id(map["id"] as Long) JumpTarget.Label() -> NewJumpTargetBuilder() .code(map["CODE"] as String) .order(map["ORDER"] as Int) - .linenumber(Option.apply(map["LINE_NUMBER"] as Int)) - .columnnumber(Option.apply(map["COLUMN_NUMBER"] as Int)) - .argumentindex(map["ARGUMENT_INDEX"] as Int) + .lineNumber(Option.apply(map["LINE_NUMBER"] as Int)) + .columnNumber(Option.apply(map["COLUMN_NUMBER"] as Int)) + .argumentIndex(map["ARGUMENT_INDEX"] as Int) .name(map["NAME"] as String) .id(map["id"] as Long) ControlStructure.Label() -> NewControlStructureBuilder() .code(map["CODE"] as String) .order(map["ORDER"] as Int) - .linenumber(Option.apply(map["LINE_NUMBER"] as Int)) - .columnnumber(Option.apply(map["COLUMN_NUMBER"] as Int)) - .argumentindex(map["ARGUMENT_INDEX"] as Int) + .lineNumber(Option.apply(map["LINE_NUMBER"] as Int)) + .columnNumber(Option.apply(map["COLUMN_NUMBER"] as Int)) + .argumentIndex(map["ARGUMENT_INDEX"] as Int) .id(map["id"] as Long) else -> NewUnknownBuilder() .code(map["CODE"] as String) .order(map["ORDER"] as Int) - .argumentindex(map["ARGUMENT_INDEX"] as Int) - .typefullname(map["TYPE_FULL_NAME"] as String) - .linenumber(Option.apply(map["LINE_NUMBER"] as Int)) - .columnnumber(Option.apply(map["COLUMN_NUMBER"] as Int)) + .argumentIndex(map["ARGUMENT_INDEX"] as Int) + .typeFullName(map["TYPE_FULL_NAME"] as String) + .lineNumber(Option.apply(map["LINE_NUMBER"] as Int)) + .columnNumber(Option.apply(map["COLUMN_NUMBER"] as Int)) .id(map["id"] as Long) } } diff --git a/plume/src/main/kotlin/io/github/plume/oss/graph/ASTBuilder.kt b/plume/src/main/kotlin/io/github/plume/oss/graph/ASTBuilder.kt index 97d90d60..8a503507 100644 --- a/plume/src/main/kotlin/io/github/plume/oss/graph/ASTBuilder.kt +++ b/plume/src/main/kotlin/io/github/plume/oss/graph/ASTBuilder.kt @@ -141,13 +141,13 @@ class ASTBuilder(private val driver: IDriver) : IGraphBuilder { .signature(unit.methodRef.signature) .code("${unit.methodRef.name}(${unit.args.joinToString()})") .order(childIdx) - .dynamictypehintfullname(createScalaList(unit.methodRef.returnType.toQuotedString())) - .linenumber(Option.apply(currentLine)) - .columnnumber(Option.apply(currentCol)) - .methodfullname(unit.methodRef.toString().removeSurrounding("<", ">")) - .argumentindex(childIdx) - .dispatchtype(if (unit.methodRef.isStatic) STATIC_DISPATCH else DYNAMIC_DISPATCH) - .typefullname(unit.type.toString()) + .dynamicTypeHintFullName(createScalaList(unit.methodRef.returnType.toQuotedString())) + .lineNumber(Option.apply(currentLine)) + .columnNumber(Option.apply(currentCol)) + .methodFullName(unit.methodRef.toString().removeSurrounding("<", ">")) + .argumentIndex(childIdx) + .dispatchType(if (unit.methodRef.isStatic) STATIC_DISPATCH else DYNAMIC_DISPATCH) + .typeFullName(unit.type.toString()) val callVertices = mutableListOf(callVertex) // Create vertices for arguments unit.args.forEachIndexed { i, arg -> @@ -189,19 +189,19 @@ class ASTBuilder(private val driver: IDriver) : IGraphBuilder { private fun projectTableSwitch(unit: TableSwitchStmt, childIdx: Int): NewControlStructureBuilder { val switchVertex = NewControlStructureBuilder() .code(ExtractorConst.TABLE_SWITCH) - .linenumber(Option.apply(currentLine)) - .columnnumber(Option.apply(currentCol)) + .lineNumber(Option.apply(currentLine)) + .columnNumber(Option.apply(currentCol)) .order(childIdx) - .argumentindex(childIdx) + .argumentIndex(childIdx) projectSwitchDefault(unit, switchVertex) // Handle case jumps unit.targets.forEachIndexed { i, tgt -> if (unit.defaultTarget != tgt) { val tgtV = NewJumpTargetBuilder() .name("CASE $i") - .argumentindex(i) - .linenumber(Option.apply(tgt.javaSourceStartLineNumber)) - .columnnumber(Option.apply(tgt.javaSourceStartColumnNumber)) + .argumentIndex(i) + .lineNumber(Option.apply(tgt.javaSourceStartLineNumber)) + .columnNumber(Option.apply(tgt.javaSourceStartColumnNumber)) .code(tgt.toString()) .order(childIdx) runCatching { @@ -222,10 +222,10 @@ class ASTBuilder(private val driver: IDriver) : IGraphBuilder { private fun projectLookupSwitch(unit: LookupSwitchStmt, childIdx: Int): NewControlStructureBuilder { val switchVertex = NewControlStructureBuilder() .code(ExtractorConst.LOOKUP_ROOT) - .linenumber(Option.apply(unit.javaSourceStartLineNumber)) - .columnnumber(Option.apply(unit.javaSourceStartColumnNumber)) + .lineNumber(Option.apply(unit.javaSourceStartLineNumber)) + .columnNumber(Option.apply(unit.javaSourceStartColumnNumber)) .order(childIdx) - .argumentindex(childIdx) + .argumentIndex(childIdx) projectSwitchDefault(unit, switchVertex) // Handle case jumps for (i in 0 until unit.targetCount) { @@ -234,9 +234,9 @@ class ASTBuilder(private val driver: IDriver) : IGraphBuilder { val lookupValue = unit.getLookupValue(i) val tgtV = NewJumpTargetBuilder() .name("CASE $lookupValue") - .argumentindex(lookupValue) - .linenumber(Option.apply(tgt.javaSourceStartLineNumber)) - .columnnumber(Option.apply(tgt.javaSourceStartColumnNumber)) + .argumentIndex(lookupValue) + .lineNumber(Option.apply(tgt.javaSourceStartLineNumber)) + .columnNumber(Option.apply(tgt.javaSourceStartColumnNumber)) .code(tgt.toString()) .order(childIdx) runCatching { @@ -261,9 +261,9 @@ class ASTBuilder(private val driver: IDriver) : IGraphBuilder { unit.defaultTarget.let { val tgtV = NewJumpTargetBuilder() .name("DEFAULT") - .argumentindex(totalTgts + 2) - .linenumber(Option.apply(it.javaSourceStartLineNumber)) - .columnnumber(Option.apply(it.javaSourceStartColumnNumber)) + .argumentIndex(totalTgts + 2) + .lineNumber(Option.apply(it.javaSourceStartLineNumber)) + .columnNumber(Option.apply(it.javaSourceStartColumnNumber)) .code(it.toString()) .order(totalTgts + 2) runCatching { @@ -285,17 +285,17 @@ class ASTBuilder(private val driver: IDriver) : IGraphBuilder { val condBody: NewJumpTargetBuilder = if (it == unit.target) { NewJumpTargetBuilder() .name(FALSE_TARGET) - .argumentindex(0) - .linenumber(Option.apply(it.javaSourceStartLineNumber)) - .columnnumber(Option.apply(it.javaSourceStartColumnNumber)) + .argumentIndex(0) + .lineNumber(Option.apply(it.javaSourceStartLineNumber)) + .columnNumber(Option.apply(it.javaSourceStartColumnNumber)) .code("ELSE_BODY") .order(childIdx) } else { NewJumpTargetBuilder() .name(TRUE_TARGET) - .argumentindex(1) - .linenumber(Option.apply(it.javaSourceStartLineNumber)) - .columnnumber(Option.apply(it.javaSourceStartColumnNumber)) + .argumentIndex(1) + .lineNumber(Option.apply(it.javaSourceStartLineNumber)) + .columnNumber(Option.apply(it.javaSourceStartColumnNumber)) .code("IF_BODY") .order(childIdx) } @@ -316,10 +316,10 @@ class ASTBuilder(private val driver: IDriver) : IGraphBuilder { private fun projectIfRootAndCondition(unit: IfStmt, childIdx: Int): NewControlStructureBuilder { val ifRootVertex = NewControlStructureBuilder() .code(ExtractorConst.IF_ROOT) - .linenumber(Option.apply(unit.javaSourceStartLineNumber)) - .columnnumber(Option.apply(unit.javaSourceStartColumnNumber)) + .lineNumber(Option.apply(unit.javaSourceStartLineNumber)) + .columnNumber(Option.apply(unit.javaSourceStartColumnNumber)) .order(childIdx) - .argumentindex(childIdx) + .argumentIndex(childIdx) driver.addVertex(ifRootVertex) val condition = unit.condition as ConditionExpr val conditionExpr = projectFlippedConditionalExpr(condition) @@ -344,14 +344,14 @@ class ASTBuilder(private val driver: IDriver) : IGraphBuilder { .name(ASSIGN) .code("=") .signature("${leftOp.type} = ${rightOp.type}") - .methodfullname("=") - .dispatchtype(STATIC_DISPATCH) - .dynamictypehintfullname(createScalaList(unit.rightOp.type.toQuotedString())) + .methodFullName("=") + .dispatchType(STATIC_DISPATCH) + .dynamicTypeHintFullName(createScalaList(unit.rightOp.type.toQuotedString())) .order(childIdx) - .argumentindex(childIdx) - .typefullname(leftOp.type.toQuotedString()) - .linenumber(Option.apply(unit.javaSourceStartLineNumber)) - .columnnumber(Option.apply(unit.javaSourceStartColumnNumber)) + .argumentIndex(childIdx) + .typeFullName(leftOp.type.toQuotedString()) + .lineNumber(Option.apply(unit.javaSourceStartLineNumber)) + .columnNumber(Option.apply(unit.javaSourceStartColumnNumber)) when (leftOp) { is Local -> SootToPlumeUtil.createIdentifierVertex(leftOp, currentLine, currentCol, 0).apply { addSootToPlumeAssociation(leftOp, this) @@ -409,14 +409,14 @@ class ASTBuilder(private val driver: IDriver) : IGraphBuilder { .name(binOpExpr) .code(expr.symbol.trim()) .signature("${expr.op1.type.toQuotedString()}${expr.symbol}${expr.op2.type.toQuotedString()}") - .methodfullname(expr.symbol.trim()) - .dispatchtype(STATIC_DISPATCH) - .dynamictypehintfullname(createScalaList(expr.op2.type.toQuotedString())) + .methodFullName(expr.symbol.trim()) + .dispatchType(STATIC_DISPATCH) + .dynamicTypeHintFullName(createScalaList(expr.op2.type.toQuotedString())) .order(childIdx) - .argumentindex(childIdx) - .typefullname(expr.type.toQuotedString()) - .linenumber(Option.apply(currentLine)) - .columnnumber(Option.apply(currentCol)) + .argumentIndex(childIdx) + .typeFullName(expr.type.toQuotedString()) + .lineNumber(Option.apply(currentLine)) + .columnNumber(Option.apply(currentCol)) .apply { binopVertices.add(this) } projectOp(expr.op1, 0)?.let { runCatching { @@ -445,14 +445,14 @@ class ASTBuilder(private val driver: IDriver) : IGraphBuilder { .name(operator) .code(symbol) .signature("${expr.op1.type} $symbol ${expr.op2.type}") - .methodfullname(symbol) - .dispatchtype(STATIC_DISPATCH) + .methodFullName(symbol) + .dispatchType(STATIC_DISPATCH) .order(3) - .argumentindex(3) // under an if-condition, the condition child will be after the two paths - .typefullname(expr.type.toQuotedString()) - .linenumber(Option.apply(currentLine)) - .columnnumber(Option.apply(currentCol)) - .dynamictypehintfullname(createScalaList(expr.op2.type.toQuotedString())) + .argumentIndex(3) // under an if-condition, the condition child will be after the two paths + .typeFullName(expr.type.toQuotedString()) + .lineNumber(Option.apply(currentLine)) + .columnNumber(Option.apply(currentCol)) + .dynamicTypeHintFullName(createScalaList(expr.op2.type.toQuotedString())) .apply { conditionVertices.add(this) } projectOp(expr.op1, 1)?.let { runCatching { @@ -478,14 +478,14 @@ class ASTBuilder(private val driver: IDriver) : IGraphBuilder { .name(CAST) .code("(${expr.castType.toQuotedString()})") .signature("(${expr.castType.toQuotedString()}) ${expr.op.type.toQuotedString()}") - .methodfullname("(${expr.castType.toQuotedString()})") - .dispatchtype(STATIC_DISPATCH) - .dynamictypehintfullname(createScalaList(expr.op.type.toQuotedString())) + .methodFullName("(${expr.castType.toQuotedString()})") + .dispatchType(STATIC_DISPATCH) + .dynamicTypeHintFullName(createScalaList(expr.op.type.toQuotedString())) .order(childIdx) - .argumentindex(childIdx) - .typefullname(expr.type.toQuotedString()) - .linenumber(Option.apply(currentLine)) - .columnnumber(Option.apply(currentCol)) + .argumentIndex(childIdx) + .typeFullName(expr.type.toQuotedString()) + .lineNumber(Option.apply(currentLine)) + .columnNumber(Option.apply(currentCol)) .apply { castVertices.add(this) } projectOp(expr.op, 1)?.let { runCatching { @@ -527,12 +527,12 @@ class ASTBuilder(private val driver: IDriver) : IGraphBuilder { private fun createNewArrayExpr(expr: NewArrayExpr, childIdx: Int = 0): NewTypeRefBuilder { val newArrayExprVertices = mutableListOf() val typeRef = NewTypeRefBuilder() - .typefullname(expr.type.toQuotedString()) + .typeFullName(expr.type.toQuotedString()) .code(expr.toString()) - .argumentindex(childIdx) + .argumentIndex(childIdx) .order(childIdx) - .linenumber(Option.apply(currentLine)) - .columnnumber(Option.apply(currentCol)) + .lineNumber(Option.apply(currentLine)) + .columnNumber(Option.apply(currentCol)) .apply { addSootToPlumeAssociation(expr, this) } NewArrayInitializerBuilder() .order(childIdx) @@ -549,9 +549,9 @@ class ASTBuilder(private val driver: IDriver) : IGraphBuilder { private fun projectReturnVertex(ret: ReturnStmt, childIdx: Int): NewReturnBuilder { val retV = NewReturnBuilder() .code(ret.toString()) - .argumentindex(childIdx) - .linenumber(Option.apply(ret.javaSourceStartLineNumber)) - .columnnumber(Option.apply(ret.javaSourceStartColumnNumber)) + .argumentIndex(childIdx) + .lineNumber(Option.apply(ret.javaSourceStartLineNumber)) + .columnNumber(Option.apply(ret.javaSourceStartColumnNumber)) .order(childIdx) projectOp(ret.op, childIdx + 1)?.let { driver.addEdge(retV, it, AST) } runCatching { @@ -567,9 +567,9 @@ class ASTBuilder(private val driver: IDriver) : IGraphBuilder { private fun projectReturnVertex(ret: ReturnVoidStmt, childIdx: Int): NewReturnBuilder { val retV = NewReturnBuilder() .code(ret.toString()) - .argumentindex(childIdx) - .linenumber(Option.apply(ret.javaSourceStartLineNumber)) - .columnnumber(Option.apply(ret.javaSourceStartColumnNumber)) + .argumentIndex(childIdx) + .lineNumber(Option.apply(ret.javaSourceStartLineNumber)) + .columnNumber(Option.apply(ret.javaSourceStartColumnNumber)) .order(childIdx) runCatching { driver.addEdge( diff --git a/plume/src/main/kotlin/io/github/plume/oss/util/SootToPlumeUtil.kt b/plume/src/main/kotlin/io/github/plume/oss/util/SootToPlumeUtil.kt index bf530434..78ddb6c1 100644 --- a/plume/src/main/kotlin/io/github/plume/oss/util/SootToPlumeUtil.kt +++ b/plume/src/main/kotlin/io/github/plume/oss/util/SootToPlumeUtil.kt @@ -47,7 +47,7 @@ object SootToPlumeUtil { NewMemberBuilder() .name(field.name) .code(field.declaration) - .typefullname(field.type.toQuotedString()) + .typeFullName(field.type.toQuotedString()) .order(childIdx) /** @@ -65,10 +65,10 @@ object SootToPlumeUtil { NewMethodParameterInBuilder() .name(local.name) .code("${local.type} ${local.name}") - .evaluationstrategy(determineEvaluationStrategy(local.type.toString(), isMethodReturn = false)) - .typefullname(local.type.toString()) - .linenumber(Option.apply(currentLine)) - .columnnumber(Option.apply(currentCol)) + .evaluationStrategy(determineEvaluationStrategy(local.type.toString(), isMethodReturn = false)) + .typeFullName(local.type.toString()) + .lineNumber(Option.apply(currentLine)) + .columnNumber(Option.apply(currentCol)) .order(childIdx) /** @@ -81,9 +81,9 @@ object SootToPlumeUtil { NewLocalBuilder() .name(local.name) .code("${local.type} ${local.name}") - .typefullname(local.type.toString()) - .linenumber(Option.apply(currentLine)) - .columnnumber(Option.apply(currentCol)) + .typeFullName(local.type.toString()) + .lineNumber(Option.apply(currentLine)) + .columnNumber(Option.apply(currentCol)) .order(childIdx) /** @@ -101,31 +101,31 @@ object SootToPlumeUtil { // Method vertex val mtdVertex = NewMethodBuilder() .name(mtd.name) - .fullname("${mtd.declaringClass}.${mtd.name}") + .fullName("${mtd.declaringClass}.${mtd.name}") .filename(sootClassToFileName(mtd.declaringClass)) .signature(mtd.subSignature) .code(mtd.declaration) - .linenumber(Option.apply(currentLine)) - .columnnumber(Option.apply(currentCol)) + .lineNumber(Option.apply(currentLine)) + .columnNumber(Option.apply(currentCol)) .order(childIdx++) - .astparentfullname("${mtd.declaringClass}") - .astparenttype("TYPE_DECL") + .astParentFullName("${mtd.declaringClass}") + .astParentType("TYPE_DECL") addSootToPlumeAssociation(mtd, mtdVertex) // Store method vertex NewBlockBuilder() - .typefullname(mtd.returnType.toQuotedString()) + .typeFullName(mtd.returnType.toQuotedString()) .code(ExtractorConst.ENTRYPOINT) .order(childIdx++) - .argumentindex(0) - .linenumber(Option.apply(currentLine)) - .columnnumber(Option.apply(currentCol)) + .argumentIndex(0) + .lineNumber(Option.apply(currentLine)) + .columnNumber(Option.apply(currentCol)) .apply { driver.addEdge(mtdVertex, this, AST); addSootToPlumeAssociation(mtd, this) } // Store return type projectMethodReturnVertex(mtd.returnType, currentLine, currentCol, childIdx++) .apply { driver.addEdge(mtdVertex, this, AST); addSootToPlumeAssociation(mtd, this) } // Modifier vertices determineModifiers(mtd.modifiers, mtd.name) - .map { NewModifierBuilder().modifiertype(it).order(childIdx++) } + .map { NewModifierBuilder().modifierType(it).order(childIdx++) } .forEach { driver.addEdge(mtdVertex, it, AST) } return mtdVertex } @@ -156,7 +156,7 @@ object SootToPlumeUtil { buildClassStructure(cls, driver) val typeDecl = buildTypeDeclaration(cls.type) determineModifiers(cls.modifiers) - .mapIndexed { i, m -> NewModifierBuilder().modifiertype(m).order(i + 1) } + .mapIndexed { i, m -> NewModifierBuilder().modifierType(m).order(i + 1) } .forEach { driver.addEdge(typeDecl, it, AST) } addSootToPlumeAssociation(cls, typeDecl) cls.fields.forEachIndexed { i, field -> @@ -182,10 +182,10 @@ object SootToPlumeUtil { NewMethodParameterInBuilder() .code("$type param$i") .name("param$i") - .evaluationstrategy(determineEvaluationStrategy(type.toString(), isMethodReturn = false)) - .typefullname(type.toString()) - .linenumber(Option.apply(mtd.javaSourceStartLineNumber)) - .columnnumber(Option.apply(mtd.javaSourceStartColumnNumber)) + .evaluationStrategy(determineEvaluationStrategy(type.toString(), isMethodReturn = false)) + .typeFullName(type.toString()) + .lineNumber(Option.apply(mtd.javaSourceStartLineNumber)) + .columnNumber(Option.apply(mtd.javaSourceStartColumnNumber)) .order(childIdx++) .apply { driver.addEdge(mtdVertex, this, AST); addSootToPlumeAssociation(mtd, this) } } @@ -193,10 +193,10 @@ object SootToPlumeUtil { val entryPoint = Extractor.getSootAssociation(mtd)?.filterIsInstance()?.firstOrNull() val mtdReturn = Extractor.getSootAssociation(mtd)?.filterIsInstance()?.firstOrNull() NewReturnBuilder() - .linenumber(Option.apply(currentLine)) - .columnnumber(Option.apply(currentCol)) + .lineNumber(Option.apply(currentLine)) + .columnNumber(Option.apply(currentCol)) .order(childIdx++) - .argumentindex(initialChildIdx) + .argumentIndex(initialChildIdx) .code("return ${mtd.returnType.toQuotedString()}") .apply { driver.addEdge(entryPoint!!, this, CFG) @@ -206,12 +206,12 @@ object SootToPlumeUtil { fun createNewExpr(expr: NewExpr, currentLine: Int, currentCol: Int, childIdx: Int): NewTypeRefBuilder { return NewTypeRefBuilder() - .typefullname(expr.baseType.toQuotedString()) + .typeFullName(expr.baseType.toQuotedString()) .code(expr.toString()) - .argumentindex(childIdx) + .argumentIndex(childIdx) .order(childIdx) - .linenumber(Option.apply(currentLine)) - .columnnumber(Option.apply(currentCol)) + .lineNumber(Option.apply(currentLine)) + .columnNumber(Option.apply(currentCol)) .apply { addSootToPlumeAssociation(expr, this) } } @@ -286,7 +286,7 @@ object SootToPlumeUtil { prevNamespaceBlock = maybePrevNamespaceBlock ?: NewNamespaceBlockBuilder() .name(namespaceList[0]) - .fullname(namespaceList[0]) + .fullName(namespaceList[0]) .filename(filename) .order(1) if (namespaceList.size == 1) return prevNamespaceBlock @@ -305,7 +305,7 @@ object SootToPlumeUtil { }?.let { mapToVertex(it) } as NewNamespaceBlockBuilder? currNamespaceBlock = maybeCurrNamespaceBlock ?: NewNamespaceBlockBuilder() .name(namespaceList[i]) - .fullname(namespaceBuilder.toString()) + .fullName(namespaceBuilder.toString()) .filename(filename) .order(order) if (currNamespaceBlock != null) { @@ -340,12 +340,12 @@ object SootToPlumeUtil { return NewTypeDeclBuilder() .name(shortName) - .fullname(type.toQuotedString()) + .fullName(type.toQuotedString()) .filename(filename) - .astparentfullname(parentType) - .astparenttype("NAMESPACE_BLOCK") + .astParentFullName(parentType) + .astParentType("NAMESPACE_BLOCK") .order(if (isExternal) -1 else 1) - .isexternal(isExternal) + .isExternal(isExternal) .apply { addSootToPlumeAssociation(type, this) } } @@ -387,10 +387,10 @@ object SootToPlumeUtil { ): NewMethodReturnBuilder = NewMethodReturnBuilder() .code(type.toQuotedString()) - .evaluationstrategy(determineEvaluationStrategy(type.toQuotedString(), true)) - .typefullname(type.toQuotedString()) - .linenumber(Option.apply(currentLine)) - .columnnumber(Option.apply(currentCol)) + .evaluationStrategy(determineEvaluationStrategy(type.toQuotedString(), true)) + .typeFullName(type.toQuotedString()) + .lineNumber(Option.apply(currentLine)) + .columnNumber(Option.apply(currentCol)) .order(childIdx) /** @@ -405,10 +405,10 @@ object SootToPlumeUtil { NewLiteralBuilder() .code(constant.toString()) .order(childIdx) - .argumentindex(childIdx) - .typefullname(constant.type.toQuotedString()) - .linenumber(Option.apply(currentLine)) - .columnnumber(Option.apply(currentCol)) + .argumentIndex(childIdx) + .typeFullName(constant.type.toQuotedString()) + .lineNumber(Option.apply(currentLine)) + .columnNumber(Option.apply(currentCol)) /** * Creates a [NewIdentifier] from a [Value]. @@ -423,10 +423,10 @@ object SootToPlumeUtil { .code(local.toString()) .name(local.toString()) .order(childIdx) - .argumentindex(childIdx) - .typefullname(local.type.toQuotedString()) - .linenumber(Option.apply(currentLine)) - .columnnumber(Option.apply(currentCol)) + .argumentIndex(childIdx) + .typeFullName(local.type.toQuotedString()) + .lineNumber(Option.apply(currentLine)) + .columnNumber(Option.apply(currentCol)) /** * Creates a [NewIdentifier] from an [ArrayRef]. @@ -441,10 +441,10 @@ object SootToPlumeUtil { .code(arrRef.toString()) .name(arrRef.toString()) .order(childIdx) - .argumentindex(arrRef.index.toString().toIntOrNull() ?: childIdx) - .typefullname(arrRef.type.toQuotedString()) - .linenumber(Option.apply(currentLine)) - .columnnumber(Option.apply(currentCol)) + .argumentIndex(arrRef.index.toString().toIntOrNull() ?: childIdx) + .typeFullName(arrRef.type.toQuotedString()) + .lineNumber(Option.apply(currentLine)) + .columnNumber(Option.apply(currentCol)) /** * Creates a [NewFieldIdentifier] from a [FieldRef]. @@ -456,11 +456,11 @@ object SootToPlumeUtil { childIdx: Int = 0 ): NewFieldIdentifierBuilder = NewFieldIdentifierBuilder() - .canonicalname(field.field.signature) + .canonicalName(field.field.signature) .code(field.field.declaration) - .argumentindex(childIdx) - .linenumber(Option.apply(currentLine)) - .columnnumber(Option.apply(currentCol)) + .argumentIndex(childIdx) + .lineNumber(Option.apply(currentLine)) + .columnNumber(Option.apply(currentCol)) .order(childIdx) fun createScalaList(vararg item: T): scala.collection.immutable.List { diff --git a/plume/src/test/kotlin/io/github/plume/oss/TestDomainResources.kt b/plume/src/test/kotlin/io/github/plume/oss/TestDomainResources.kt index c2e24e84..b5697737 100644 --- a/plume/src/test/kotlin/io/github/plume/oss/TestDomainResources.kt +++ b/plume/src/test/kotlin/io/github/plume/oss/TestDomainResources.kt @@ -29,114 +29,114 @@ class TestDomainResources { val vertices = listOf( NewArrayInitializerBuilder().order(INT_1), NewBindingBuilder().name(STRING_1).signature(STRING_2), - NewBlockBuilder().typefullname(STRING_1).code(STRING_1).order(INT_1).argumentindex(INT_1) - .linenumber(Option.apply(INT_1)).columnnumber(Option.apply(INT_1)), - NewCallBuilder().methodfullname(STRING_1).argumentindex(INT_1).dispatchtype(DISPATCH_1) - .typefullname(STRING_1) - .dynamictypehintfullname(createScalaList(STRING_1)) - .name(STRING_1).signature(STRING_1).code(STRING_1).order(INT_1).linenumber(Option.apply(INT_1)) - .columnnumber(Option.apply(INT_1)), - NewControlStructureBuilder().code(STRING_1).linenumber(Option.apply(INT_1)) - .columnnumber(Option.apply(INT_1)).order(INT_1).argumentindex(INT_1), - NewFieldIdentifierBuilder().canonicalname(STRING_1).code(STRING_1).argumentindex(INT_1).order(INT_1) - .linenumber(Option.apply(INT_1)).columnnumber(Option.apply(INT_1)), + NewBlockBuilder().typeFullName(STRING_1).code(STRING_1).order(INT_1).argumentIndex(INT_1) + .lineNumber(Option.apply(INT_1)).columnNumber(Option.apply(INT_1)), + NewCallBuilder().methodFullName(STRING_1).argumentIndex(INT_1).dispatchType(DISPATCH_1) + .typeFullName(STRING_1) + .dynamicTypeHintFullName(createScalaList(STRING_1)) + .name(STRING_1).signature(STRING_1).code(STRING_1).order(INT_1).lineNumber(Option.apply(INT_1)) + .columnNumber(Option.apply(INT_1)), + NewControlStructureBuilder().code(STRING_1).lineNumber(Option.apply(INT_1)) + .columnNumber(Option.apply(INT_1)).order(INT_1).argumentIndex(INT_1), + NewFieldIdentifierBuilder().canonicalName(STRING_1).code(STRING_1).argumentIndex(INT_1).order(INT_1) + .lineNumber(Option.apply(INT_1)).columnNumber(Option.apply(INT_1)), NewFileBuilder().name(STRING_1).hash(Option.apply(STRING_2)).order(INT_1), - NewIdentifierBuilder().name(STRING_1).typefullname(STRING_1).code(STRING_1).order(INT_1) - .argumentindex(INT_1).linenumber(Option.apply(INT_1)).columnnumber(Option.apply(INT_1)), - NewJumpTargetBuilder().name(STRING_1).argumentindex(INT_1).code(STRING_1).order(INT_1) - .linenumber(Option.apply(INT_1)).columnnumber(Option.apply(INT_1)), - NewLiteralBuilder().typefullname(STRING_1).code(STRING_1).order(INT_1).argumentindex(INT_1) - .linenumber(Option.apply(INT_1)).columnnumber(Option.apply(INT_1)), - NewLocalBuilder().code(STRING_1).typefullname(STRING_1).name(STRING_1).order(INT_1) - .linenumber(Option.apply(INT_1)).columnnumber(Option.apply(INT_1)), - NewMemberBuilder().code(STRING_1).name(STRING_1).typefullname(STRING_1).order(INT_1), + NewIdentifierBuilder().name(STRING_1).typeFullName(STRING_1).code(STRING_1).order(INT_1) + .argumentIndex(INT_1).lineNumber(Option.apply(INT_1)).columnNumber(Option.apply(INT_1)), + NewJumpTargetBuilder().name(STRING_1).argumentIndex(INT_1).code(STRING_1).order(INT_1) + .lineNumber(Option.apply(INT_1)).columnNumber(Option.apply(INT_1)), + NewLiteralBuilder().typeFullName(STRING_1).code(STRING_1).order(INT_1).argumentIndex(INT_1) + .lineNumber(Option.apply(INT_1)).columnNumber(Option.apply(INT_1)), + NewLocalBuilder().code(STRING_1).typeFullName(STRING_1).name(STRING_1).order(INT_1) + .lineNumber(Option.apply(INT_1)).columnNumber(Option.apply(INT_1)), + NewMemberBuilder().code(STRING_1).name(STRING_1).typeFullName(STRING_1).order(INT_1), NewMetaDataBuilder().language(STRING_1).version(STRING_1), - NewMethodParameterInBuilder().code(STRING_1).evaluationstrategy(EVAL_1).typefullname(STRING_1) - .name(STRING_1).order(INT_1).linenumber(Option.apply(INT_1)).columnnumber(Option.apply(INT_1)), - NewMethodRefBuilder().methodinstfullname(Option.apply(STRING_1)).methodfullname(STRING_1).code(STRING_1) - .order(INT_1).argumentindex(INT_1).linenumber(Option.apply(INT_1)).columnnumber(Option.apply(INT_1)), - NewMethodReturnBuilder().typefullname(STRING_1).evaluationstrategy(EVAL_1).code(STRING_1) - .order(INT_1).linenumber(Option.apply(INT_1)).columnnumber(Option.apply(INT_1)), - NewMethodBuilder().name(STRING_1).fullname(STRING_1).signature(STRING_1).code(STRING_1).order(INT_1) - .linenumber(Option.apply(INT_1)).columnnumber(Option.apply(INT_1)), - NewModifierBuilder().modifiertype(MOD_1).order(INT_1), - NewNamespaceBlockBuilder().name(STRING_1).fullname(STRING_1).order(INT_1).filename(STRING_1), - NewReturnBuilder().order(INT_1).argumentindex(INT_1).code(STRING_1).linenumber(Option.apply(INT_1)) - .columnnumber(Option.apply(INT_1)), + NewMethodParameterInBuilder().code(STRING_1).evaluationStrategy(EVAL_1).typeFullName(STRING_1) + .name(STRING_1).order(INT_1).lineNumber(Option.apply(INT_1)).columnNumber(Option.apply(INT_1)), + NewMethodRefBuilder().methodInstFullName(Option.apply(STRING_1)).methodFullName(STRING_1).code(STRING_1) + .order(INT_1).argumentIndex(INT_1).lineNumber(Option.apply(INT_1)).columnNumber(Option.apply(INT_1)), + NewMethodReturnBuilder().typeFullName(STRING_1).evaluationStrategy(EVAL_1).code(STRING_1) + .order(INT_1).lineNumber(Option.apply(INT_1)).columnNumber(Option.apply(INT_1)), + NewMethodBuilder().name(STRING_1).fullName(STRING_1).signature(STRING_1).code(STRING_1).order(INT_1) + .lineNumber(Option.apply(INT_1)).columnNumber(Option.apply(INT_1)), + NewModifierBuilder().modifierType(MOD_1).order(INT_1), + NewNamespaceBlockBuilder().name(STRING_1).fullName(STRING_1).order(INT_1).filename(STRING_1), + NewReturnBuilder().order(INT_1).argumentIndex(INT_1).code(STRING_1).lineNumber(Option.apply(INT_1)) + .columnNumber(Option.apply(INT_1)), NewTypeArgumentBuilder().order(INT_1), - NewTypeDeclBuilder().name(STRING_1).fullname(STRING_1).order(INT_1).isexternal(BOOL_1), + NewTypeDeclBuilder().name(STRING_1).fullName(STRING_1).order(INT_1).isExternal(BOOL_1), NewTypeParameterBuilder().name(STRING_1).order(INT_1), - NewTypeRefBuilder().typefullname(STRING_1) - .dynamictypehintfullname(createScalaList(STRING_1)) - .code(STRING_1).argumentindex(INT_1).order(INT_1).linenumber(Option.apply(INT_1)) - .columnnumber(Option.apply(INT_1)), - NewTypeBuilder().name(STRING_1).fullname(STRING_1).typedeclfullname(STRING_1), - NewUnknownBuilder().typefullname(STRING_1).code(STRING_1).order(INT_1).argumentindex(INT_1) - .linenumber(Option.apply(INT_1)).columnnumber(Option.apply(INT_1)) + NewTypeRefBuilder().typeFullName(STRING_1) + .dynamicTypeHintFullName(createScalaList(STRING_1)) + .code(STRING_1).argumentIndex(INT_1).order(INT_1).lineNumber(Option.apply(INT_1)) + .columnNumber(Option.apply(INT_1)), + NewTypeBuilder().name(STRING_1).fullName(STRING_1).typeDeclFullName(STRING_1), + NewUnknownBuilder().typeFullName(STRING_1).code(STRING_1).order(INT_1).argumentIndex(INT_1) + .lineNumber(Option.apply(INT_1)).columnNumber(Option.apply(INT_1)) ) val methodVertex: NewMethodBuilder = - NewMethodBuilder().code(STRING_1).name(STRING_1).fullname(STRING_1).order(INT_1) - .linenumber(Option.apply(INT_1)).columnnumber(Option.apply(INT_1)).signature(STRING_2).filename(STRING_1) - .astparentfullname(STRING_1).astparenttype(STRING_2) + NewMethodBuilder().code(STRING_1).name(STRING_1).fullName(STRING_1).order(INT_1) + .lineNumber(Option.apply(INT_1)).columnNumber(Option.apply(INT_1)).signature(STRING_2).filename(STRING_1) + .astParentFullName(STRING_1).astParentType(STRING_2) val mtdParamInVertex: NewMethodParameterInBuilder = - NewMethodParameterInBuilder().code(STRING_1).evaluationstrategy(EVAL_1).typefullname(STRING_1) - .name(STRING_1).order(INT_1).linenumber(Option.apply(INT_1)).columnnumber(Option.apply(INT_1)) + NewMethodParameterInBuilder().code(STRING_1).evaluationStrategy(EVAL_1).typeFullName(STRING_1) + .name(STRING_1).order(INT_1).lineNumber(Option.apply(INT_1)).columnNumber(Option.apply(INT_1)) val blockVertex: NewBlockBuilder = - NewBlockBuilder().typefullname(STRING_1).code(STRING_1).order(INT_1).argumentindex(INT_1) - .linenumber(Option.apply(INT_1)).columnnumber(Option.apply(INT_1)) + NewBlockBuilder().typeFullName(STRING_1).code(STRING_1).order(INT_1).argumentIndex(INT_1) + .lineNumber(Option.apply(INT_1)).columnNumber(Option.apply(INT_1)) val callVertex: NewCallBuilder = - NewCallBuilder().methodfullname(STRING_1).argumentindex(INT_1).dispatchtype(DISPATCH_1) - .typefullname(STRING_1) - .dynamictypehintfullname(createScalaList(STRING_1)) - .name(STRING_1).signature(STRING_1).code(STRING_1).order(INT_1).linenumber(Option.apply(INT_1)) - .columnnumber(Option.apply(INT_1)) + NewCallBuilder().methodFullName(STRING_1).argumentIndex(INT_1).dispatchType(DISPATCH_1) + .typeFullName(STRING_1) + .dynamicTypeHintFullName(createScalaList(STRING_1)) + .name(STRING_1).signature(STRING_1).code(STRING_1).order(INT_1).lineNumber(Option.apply(INT_1)) + .columnNumber(Option.apply(INT_1)) val localVertex: NewLocalBuilder = - NewLocalBuilder().code(STRING_1).typefullname(STRING_1).name(STRING_1).order(INT_1) - .linenumber(Option.apply(INT_1)).columnnumber(Option.apply(INT_1)) + NewLocalBuilder().code(STRING_1).typeFullName(STRING_1).name(STRING_1).order(INT_1) + .lineNumber(Option.apply(INT_1)).columnNumber(Option.apply(INT_1)) val identifierVertex: NewIdentifierBuilder = - NewIdentifierBuilder().name(STRING_1).typefullname(STRING_1).code(STRING_1).order(INT_1) - .argumentindex(INT_1).linenumber(Option.apply(INT_1)).columnnumber(Option.apply(INT_1)) - val typeDeclVertex: NewTypeDeclBuilder = NewTypeDeclBuilder().name(STRING_1).fullname(STRING_1).order(INT_1) - .astparentfullname(STRING_1).astparenttype(STRING_2) + NewIdentifierBuilder().name(STRING_1).typeFullName(STRING_1).code(STRING_1).order(INT_1) + .argumentIndex(INT_1).lineNumber(Option.apply(INT_1)).columnNumber(Option.apply(INT_1)) + val typeDeclVertex: NewTypeDeclBuilder = NewTypeDeclBuilder().name(STRING_1).fullName(STRING_1).order(INT_1) + .astParentFullName(STRING_1).astParentType(STRING_2) val literalVertex: NewLiteralBuilder = - NewLiteralBuilder().typefullname(STRING_1).code(STRING_1).order(INT_1).argumentindex(INT_1) - .linenumber(Option.apply(INT_1)).columnnumber(Option.apply(INT_1)) + NewLiteralBuilder().typeFullName(STRING_1).code(STRING_1).order(INT_1).argumentIndex(INT_1) + .lineNumber(Option.apply(INT_1)).columnNumber(Option.apply(INT_1)) val returnVertex: NewReturnBuilder = - NewReturnBuilder().order(INT_1).argumentindex(INT_1).code(STRING_1).linenumber(Option.apply(INT_1)) - .columnnumber(Option.apply(INT_1)) + NewReturnBuilder().order(INT_1).argumentIndex(INT_1).code(STRING_1).lineNumber(Option.apply(INT_1)) + .columnNumber(Option.apply(INT_1)) val mtdRtnVertex: NewMethodReturnBuilder = - NewMethodReturnBuilder().typefullname(STRING_1).evaluationstrategy(EVAL_1).code(STRING_1) - .order(INT_1).linenumber(Option.apply(INT_1)).columnnumber(Option.apply(INT_1)) + NewMethodReturnBuilder().typeFullName(STRING_1).evaluationStrategy(EVAL_1).code(STRING_1) + .order(INT_1).lineNumber(Option.apply(INT_1)).columnNumber(Option.apply(INT_1)) val fileVertex: NewFileBuilder = NewFileBuilder().name(STRING_1).hash(Option.apply(STRING_2)).order(INT_1) val namespaceBlockVertex1: NewNamespaceBlockBuilder = - NewNamespaceBlockBuilder().name(STRING_1).fullname(STRING_1).order(INT_1).filename(STRING_1) + NewNamespaceBlockBuilder().name(STRING_1).fullName(STRING_1).order(INT_1).filename(STRING_1) val namespaceBlockVertex2: NewNamespaceBlockBuilder = - NewNamespaceBlockBuilder().name(STRING_2).fullname(STRING_2).order(INT_1).filename(STRING_2) + NewNamespaceBlockBuilder().name(STRING_2).fullName(STRING_2).order(INT_1).filename(STRING_2) val metaDataVertex: NewMetaDataBuilder = NewMetaDataBuilder().language(STRING_1).version(STRING_2) val controlStructureVertex: NewControlStructureBuilder = - NewControlStructureBuilder().code(STRING_1).linenumber(Option.apply(INT_1)) - .columnnumber(Option.apply(INT_1)).order(INT_1).argumentindex(INT_1) + NewControlStructureBuilder().code(STRING_1).lineNumber(Option.apply(INT_1)) + .columnNumber(Option.apply(INT_1)).order(INT_1).argumentIndex(INT_1) val jumpTargetVertex: NewJumpTargetBuilder = - NewJumpTargetBuilder().name(STRING_1).argumentindex(INT_1).code(STRING_1).order(INT_1) - .linenumber(Option.apply(INT_1)).columnnumber(Option.apply(INT_1)) + NewJumpTargetBuilder().name(STRING_1).argumentIndex(INT_1).code(STRING_1).order(INT_1) + .lineNumber(Option.apply(INT_1)).columnNumber(Option.apply(INT_1)) val bindingVertex: NewBindingBuilder = NewBindingBuilder().name(STRING_1).signature(STRING_2) val typeArgumentVertex: NewTypeArgumentBuilder = NewTypeArgumentBuilder().order(INT_1) val typeParameterVertex: NewTypeParameterBuilder = NewTypeParameterBuilder().name(STRING_1).order(INT_1) val fldIdentVertex: NewFieldIdentifierBuilder = - NewFieldIdentifierBuilder().canonicalname(STRING_1).code(STRING_1).argumentindex(INT_1).order(INT_1) - .linenumber(Option.apply(INT_1)).columnnumber(Option.apply(INT_1)) + NewFieldIdentifierBuilder().canonicalName(STRING_1).code(STRING_1).argumentIndex(INT_1).order(INT_1) + .lineNumber(Option.apply(INT_1)).columnNumber(Option.apply(INT_1)) val methodRefVertex: NewMethodRefBuilder = - NewMethodRefBuilder().methodinstfullname(Option.apply(STRING_1)).methodfullname(STRING_1).code(STRING_1) - .order(INT_1).argumentindex(INT_1).linenumber(Option.apply(INT_1)).columnnumber(Option.apply(INT_1)) - val typeRefVertex: NewTypeRefBuilder = NewTypeRefBuilder().typefullname(STRING_1) - .dynamictypehintfullname(createScalaList(STRING_1)) - .code(STRING_1).argumentindex(INT_1).order(INT_1).linenumber(Option.apply(INT_1)) - .columnnumber(Option.apply(INT_1)) + NewMethodRefBuilder().methodInstFullName(Option.apply(STRING_1)).methodFullName(STRING_1).code(STRING_1) + .order(INT_1).argumentIndex(INT_1).lineNumber(Option.apply(INT_1)).columnNumber(Option.apply(INT_1)) + val typeRefVertex: NewTypeRefBuilder = NewTypeRefBuilder().typeFullName(STRING_1) + .dynamicTypeHintFullName(createScalaList(STRING_1)) + .code(STRING_1).argumentIndex(INT_1).order(INT_1).lineNumber(Option.apply(INT_1)) + .columnNumber(Option.apply(INT_1)) val unknownVertex: NewUnknownBuilder = - NewUnknownBuilder().typefullname(STRING_1).code(STRING_1).order(INT_1).argumentindex(INT_1) - .linenumber(Option.apply(INT_1)).columnnumber(Option.apply(INT_1)) - val modifierVertex: NewModifierBuilder = NewModifierBuilder().modifiertype(MOD_1).order(INT_1) + NewUnknownBuilder().typeFullName(STRING_1).code(STRING_1).order(INT_1).argumentIndex(INT_1) + .lineNumber(Option.apply(INT_1)).columnNumber(Option.apply(INT_1)) + val modifierVertex: NewModifierBuilder = NewModifierBuilder().modifierType(MOD_1).order(INT_1) val simpleCpgVertices = listOf( methodVertex, diff --git a/plume/src/test/kotlin/io/github/plume/oss/drivers/JanusGraphDriverIntTest.kt b/plume/src/test/kotlin/io/github/plume/oss/drivers/JanusGraphDriverIntTest.kt index 7b32f07d..7c013c13 100644 --- a/plume/src/test/kotlin/io/github/plume/oss/drivers/JanusGraphDriverIntTest.kt +++ b/plume/src/test/kotlin/io/github/plume/oss/drivers/JanusGraphDriverIntTest.kt @@ -108,10 +108,10 @@ class JanusGraphDriverIntTest { @Test fun findFieldIdentifierVertex() { - val v1 = NewFieldIdentifierBuilder().canonicalname(STRING_1).code(STRING_2).argumentindex(INT_1) - .order(INT_1).linenumber(Option.apply(INT_1)).columnnumber(Option.apply(INT_1)) - val v2 = NewFieldIdentifierBuilder().canonicalname(STRING_2).code(STRING_1).argumentindex(INT_1) - .order(INT_1).linenumber(Option.apply(INT_1)).columnnumber(Option.apply(INT_1)) + val v1 = NewFieldIdentifierBuilder().canonicalName(STRING_1).code(STRING_2).argumentIndex(INT_1) + .order(INT_1).lineNumber(Option.apply(INT_1)).columnNumber(Option.apply(INT_1)) + val v2 = NewFieldIdentifierBuilder().canonicalName(STRING_2).code(STRING_1).argumentIndex(INT_1) + .order(INT_1).lineNumber(Option.apply(INT_1)).columnNumber(Option.apply(INT_1)) assertFalse(driver.exists(v1)) assertFalse(driver.exists(v2)) driver.addVertex(v1) @@ -138,12 +138,12 @@ class JanusGraphDriverIntTest { @Test fun findMethodRefVertex() { - val v1 = NewMethodRefBuilder().methodinstfullname(Option.apply(STRING_1)).methodfullname(STRING_2) - .code(STRING_1).order(INT_1).argumentindex(INT_1).linenumber(Option.apply(INT_1)) - .columnnumber(Option.apply(INT_1)) - val v2 = NewMethodRefBuilder().methodinstfullname(Option.apply(STRING_2)).methodfullname(STRING_1) - .code(STRING_1).order(INT_1).argumentindex(INT_1).linenumber(Option.apply(INT_1)) - .columnnumber(Option.apply(INT_1)) + val v1 = NewMethodRefBuilder().methodInstFullName(Option.apply(STRING_1)).methodFullName(STRING_2) + .code(STRING_1).order(INT_1).argumentIndex(INT_1).lineNumber(Option.apply(INT_1)) + .columnNumber(Option.apply(INT_1)) + val v2 = NewMethodRefBuilder().methodInstFullName(Option.apply(STRING_2)).methodFullName(STRING_1) + .code(STRING_1).order(INT_1).argumentIndex(INT_1).lineNumber(Option.apply(INT_1)) + .columnNumber(Option.apply(INT_1)) assertFalse(driver.exists(v1)) assertFalse(driver.exists(v2)) driver.addVertex(v1) @@ -156,8 +156,8 @@ class JanusGraphDriverIntTest { @Test fun findTypeVertex() { - val v1 = NewTypeBuilder().name(STRING_1).fullname(STRING_2).typedeclfullname(STRING_2) - val v2 = NewTypeBuilder().name(STRING_2).fullname(STRING_1).typedeclfullname(STRING_2) + val v1 = NewTypeBuilder().name(STRING_1).fullName(STRING_2).typeDeclFullName(STRING_2) + val v2 = NewTypeBuilder().name(STRING_2).fullName(STRING_1).typeDeclFullName(STRING_2) assertFalse(driver.exists(v1)) assertFalse(driver.exists(v2)) driver.addVertex(v1) @@ -170,14 +170,14 @@ class JanusGraphDriverIntTest { @Test fun findTypeRefVertex() { - val v1 = NewTypeRefBuilder().typefullname(STRING_1).dynamictypehintfullname( + val v1 = NewTypeRefBuilder().typeFullName(STRING_1).dynamicTypeHintFullName( SootToPlumeUtil.createScalaList(STRING_2) - ).code(STRING_1).argumentindex(INT_1).order(INT_1).linenumber(Option.apply(INT_1)) - .columnnumber(Option.apply(INT_1)) - val v2 = NewTypeRefBuilder().typefullname(STRING_2).dynamictypehintfullname( + ).code(STRING_1).argumentIndex(INT_1).order(INT_1).lineNumber(Option.apply(INT_1)) + .columnNumber(Option.apply(INT_1)) + val v2 = NewTypeRefBuilder().typeFullName(STRING_2).dynamicTypeHintFullName( SootToPlumeUtil.createScalaList(STRING_1) - ).code(STRING_1).argumentindex(INT_1).order(INT_1).linenumber(Option.apply(INT_1)) - .columnnumber(Option.apply(INT_1)) + ).code(STRING_1).argumentIndex(INT_1).order(INT_1).lineNumber(Option.apply(INT_1)) + .columnNumber(Option.apply(INT_1)) assertFalse(driver.exists(v1)) assertFalse(driver.exists(v2)) driver.addVertex(v1) @@ -190,10 +190,10 @@ class JanusGraphDriverIntTest { @Test fun findUnknownVertex() { - val v1 = NewUnknownBuilder().typefullname(STRING_1).code(STRING_2).order(INT_1).argumentindex(INT_1) - .linenumber(Option.apply(INT_1)).columnnumber(Option.apply(INT_1)) - val v2 = NewUnknownBuilder().typefullname(STRING_2).code(STRING_1).order(INT_1).argumentindex(INT_1) - .linenumber(Option.apply(INT_1)).columnnumber(Option.apply(INT_1)) + val v1 = NewUnknownBuilder().typeFullName(STRING_1).code(STRING_2).order(INT_1).argumentIndex(INT_1) + .lineNumber(Option.apply(INT_1)).columnNumber(Option.apply(INT_1)) + val v2 = NewUnknownBuilder().typeFullName(STRING_2).code(STRING_1).order(INT_1).argumentIndex(INT_1) + .lineNumber(Option.apply(INT_1)).columnNumber(Option.apply(INT_1)) assertFalse(driver.exists(v1)) assertFalse(driver.exists(v2)) driver.addVertex(v1) diff --git a/plume/src/test/kotlin/io/github/plume/oss/drivers/Neo4jDriverIntTest.kt b/plume/src/test/kotlin/io/github/plume/oss/drivers/Neo4jDriverIntTest.kt index 78f0c39a..543894f6 100644 --- a/plume/src/test/kotlin/io/github/plume/oss/drivers/Neo4jDriverIntTest.kt +++ b/plume/src/test/kotlin/io/github/plume/oss/drivers/Neo4jDriverIntTest.kt @@ -110,10 +110,10 @@ class Neo4jDriverIntTest { @Test fun findFieldIdentifierVertex() { - val v1 = NewFieldIdentifierBuilder().canonicalname(STRING_1).code(STRING_2).argumentindex(INT_1) - .order(INT_1).linenumber(Option.apply(INT_1)).columnnumber(Option.apply(INT_1)) - val v2 = NewFieldIdentifierBuilder().canonicalname(STRING_2).code(STRING_1).argumentindex(INT_1) - .order(INT_1).linenumber(Option.apply(INT_1)).columnnumber(Option.apply(INT_1)) + val v1 = NewFieldIdentifierBuilder().canonicalName(STRING_1).code(STRING_2).argumentIndex(INT_1) + .order(INT_1).lineNumber(Option.apply(INT_1)).columnNumber(Option.apply(INT_1)) + val v2 = NewFieldIdentifierBuilder().canonicalName(STRING_2).code(STRING_1).argumentIndex(INT_1) + .order(INT_1).lineNumber(Option.apply(INT_1)).columnNumber(Option.apply(INT_1)) assertFalse(driver.exists(v1)) assertFalse(driver.exists(v2)) driver.addVertex(v1) @@ -140,12 +140,12 @@ class Neo4jDriverIntTest { @Test fun findMethodRefVertex() { - val v1 = NewMethodRefBuilder().methodinstfullname(Option.apply(STRING_1)).methodfullname(STRING_2) - .code(STRING_1).order(INT_1).argumentindex(INT_1).linenumber(Option.apply(INT_1)) - .columnnumber(Option.apply(INT_1)) - val v2 = NewMethodRefBuilder().methodinstfullname(Option.apply(STRING_2)).methodfullname(STRING_1) - .code(STRING_1).order(INT_1).argumentindex(INT_1).linenumber(Option.apply(INT_1)) - .columnnumber(Option.apply(INT_1)) + val v1 = NewMethodRefBuilder().methodInstFullName(Option.apply(STRING_1)).methodFullName(STRING_2) + .code(STRING_1).order(INT_1).argumentIndex(INT_1).lineNumber(Option.apply(INT_1)) + .columnNumber(Option.apply(INT_1)) + val v2 = NewMethodRefBuilder().methodInstFullName(Option.apply(STRING_2)).methodFullName(STRING_1) + .code(STRING_1).order(INT_1).argumentIndex(INT_1).lineNumber(Option.apply(INT_1)) + .columnNumber(Option.apply(INT_1)) assertFalse(driver.exists(v1)) assertFalse(driver.exists(v2)) driver.addVertex(v1) @@ -158,8 +158,8 @@ class Neo4jDriverIntTest { @Test fun findTypeVertex() { - val v1 = NewTypeBuilder().name(STRING_1).fullname(STRING_2).typedeclfullname(STRING_2) - val v2 = NewTypeBuilder().name(STRING_2).fullname(STRING_1).typedeclfullname(STRING_2) + val v1 = NewTypeBuilder().name(STRING_1).fullName(STRING_2).typeDeclFullName(STRING_2) + val v2 = NewTypeBuilder().name(STRING_2).fullName(STRING_1).typeDeclFullName(STRING_2) assertFalse(driver.exists(v1)) assertFalse(driver.exists(v2)) driver.addVertex(v1) @@ -172,14 +172,14 @@ class Neo4jDriverIntTest { @Test fun findTypeRefVertex() { - val v1 = NewTypeRefBuilder().typefullname(STRING_1).dynamictypehintfullname( + val v1 = NewTypeRefBuilder().typeFullName(STRING_1).dynamicTypeHintFullName( SootToPlumeUtil.createScalaList(STRING_2) - ).code(STRING_1).argumentindex(INT_1).order(INT_1).linenumber(Option.apply(INT_1)) - .columnnumber(Option.apply(INT_1)) - val v2 = NewTypeRefBuilder().typefullname(STRING_2).dynamictypehintfullname( + ).code(STRING_1).argumentIndex(INT_1).order(INT_1).lineNumber(Option.apply(INT_1)) + .columnNumber(Option.apply(INT_1)) + val v2 = NewTypeRefBuilder().typeFullName(STRING_2).dynamicTypeHintFullName( SootToPlumeUtil.createScalaList(STRING_1) - ).code(STRING_1).argumentindex(INT_1).order(INT_1).linenumber(Option.apply(INT_1)) - .columnnumber(Option.apply(INT_1)) + ).code(STRING_1).argumentIndex(INT_1).order(INT_1).lineNumber(Option.apply(INT_1)) + .columnNumber(Option.apply(INT_1)) assertFalse(driver.exists(v1)) assertFalse(driver.exists(v2)) driver.addVertex(v1) @@ -192,10 +192,10 @@ class Neo4jDriverIntTest { @Test fun findUnknownVertex() { - val v1 = NewUnknownBuilder().typefullname(STRING_1).code(STRING_2).order(INT_1).argumentindex(INT_1) - .linenumber(Option.apply(INT_1)).columnnumber(Option.apply(INT_1)) - val v2 = NewUnknownBuilder().typefullname(STRING_2).code(STRING_1).order(INT_1).argumentindex(INT_1) - .linenumber(Option.apply(INT_1)).columnnumber(Option.apply(INT_1)) + val v1 = NewUnknownBuilder().typeFullName(STRING_1).code(STRING_2).order(INT_1).argumentIndex(INT_1) + .lineNumber(Option.apply(INT_1)).columnNumber(Option.apply(INT_1)) + val v2 = NewUnknownBuilder().typeFullName(STRING_2).code(STRING_1).order(INT_1).argumentIndex(INT_1) + .lineNumber(Option.apply(INT_1)).columnNumber(Option.apply(INT_1)) assertFalse(driver.exists(v1)) assertFalse(driver.exists(v2)) driver.addVertex(v1) diff --git a/plume/src/test/kotlin/io/github/plume/oss/drivers/NeptuneDriverIntTest.kt b/plume/src/test/kotlin/io/github/plume/oss/drivers/NeptuneDriverIntTest.kt index 1fe54d30..f2da6d3c 100644 --- a/plume/src/test/kotlin/io/github/plume/oss/drivers/NeptuneDriverIntTest.kt +++ b/plume/src/test/kotlin/io/github/plume/oss/drivers/NeptuneDriverIntTest.kt @@ -105,10 +105,10 @@ class NeptuneDriverIntTest { @Test fun findFieldIdentifierVertex() { - val v1 = NewFieldIdentifierBuilder().canonicalname(STRING_1).code(STRING_2).argumentindex(INT_1) - .order(INT_1).linenumber(Option.apply(INT_1)).columnnumber(Option.apply(INT_1)) - val v2 = NewFieldIdentifierBuilder().canonicalname(STRING_2).code(STRING_1).argumentindex(INT_1) - .order(INT_1).linenumber(Option.apply(INT_1)).columnnumber(Option.apply(INT_1)) + val v1 = NewFieldIdentifierBuilder().canonicalName(STRING_1).code(STRING_2).argumentIndex(INT_1) + .order(INT_1).lineNumber(Option.apply(INT_1)).columnNumber(Option.apply(INT_1)) + val v2 = NewFieldIdentifierBuilder().canonicalName(STRING_2).code(STRING_1).argumentIndex(INT_1) + .order(INT_1).lineNumber(Option.apply(INT_1)).columnNumber(Option.apply(INT_1)) assertFalse(driver.exists(v1)) assertFalse(driver.exists(v2)) driver.addVertex(v1) @@ -135,12 +135,12 @@ class NeptuneDriverIntTest { @Test fun findMethodRefVertex() { - val v1 = NewMethodRefBuilder().methodinstfullname(Option.apply(STRING_1)).methodfullname(STRING_2) - .code(STRING_1).order(INT_1).argumentindex(INT_1).linenumber(Option.apply(INT_1)) - .columnnumber(Option.apply(INT_1)) - val v2 = NewMethodRefBuilder().methodinstfullname(Option.apply(STRING_2)).methodfullname(STRING_1) - .code(STRING_1).order(INT_1).argumentindex(INT_1).linenumber(Option.apply(INT_1)) - .columnnumber(Option.apply(INT_1)) + val v1 = NewMethodRefBuilder().methodInstFullName(Option.apply(STRING_1)).methodFullName(STRING_2) + .code(STRING_1).order(INT_1).argumentIndex(INT_1).lineNumber(Option.apply(INT_1)) + .columnNumber(Option.apply(INT_1)) + val v2 = NewMethodRefBuilder().methodInstFullName(Option.apply(STRING_2)).methodFullName(STRING_1) + .code(STRING_1).order(INT_1).argumentIndex(INT_1).lineNumber(Option.apply(INT_1)) + .columnNumber(Option.apply(INT_1)) assertFalse(driver.exists(v1)) assertFalse(driver.exists(v2)) driver.addVertex(v1) @@ -153,8 +153,8 @@ class NeptuneDriverIntTest { @Test fun findTypeVertex() { - val v1 = NewTypeBuilder().name(STRING_1).fullname(STRING_2).typedeclfullname(STRING_2) - val v2 = NewTypeBuilder().name(STRING_2).fullname(STRING_1).typedeclfullname(STRING_2) + val v1 = NewTypeBuilder().name(STRING_1).fullName(STRING_2).typeDeclFullName(STRING_2) + val v2 = NewTypeBuilder().name(STRING_2).fullName(STRING_1).typeDeclFullName(STRING_2) assertFalse(driver.exists(v1)) assertFalse(driver.exists(v2)) driver.addVertex(v1) @@ -167,14 +167,14 @@ class NeptuneDriverIntTest { @Test fun findTypeRefVertex() { - val v1 = NewTypeRefBuilder().typefullname(STRING_1).dynamictypehintfullname( + val v1 = NewTypeRefBuilder().typeFullName(STRING_1).dynamicTypeHintFullName( SootToPlumeUtil.createScalaList(STRING_2) - ).code(STRING_1).argumentindex(INT_1).order(INT_1).linenumber(Option.apply(INT_1)) - .columnnumber(Option.apply(INT_1)) - val v2 = NewTypeRefBuilder().typefullname(STRING_2).dynamictypehintfullname( + ).code(STRING_1).argumentIndex(INT_1).order(INT_1).lineNumber(Option.apply(INT_1)) + .columnNumber(Option.apply(INT_1)) + val v2 = NewTypeRefBuilder().typeFullName(STRING_2).dynamicTypeHintFullName( SootToPlumeUtil.createScalaList(STRING_1) - ).code(STRING_1).argumentindex(INT_1).order(INT_1).linenumber(Option.apply(INT_1)) - .columnnumber(Option.apply(INT_1)) + ).code(STRING_1).argumentIndex(INT_1).order(INT_1).lineNumber(Option.apply(INT_1)) + .columnNumber(Option.apply(INT_1)) assertFalse(driver.exists(v1)) assertFalse(driver.exists(v2)) driver.addVertex(v1) @@ -187,10 +187,10 @@ class NeptuneDriverIntTest { @Test fun findUnknownVertex() { - val v1 = NewUnknownBuilder().typefullname(STRING_1).code(STRING_2).order(INT_1).argumentindex(INT_1) - .linenumber(Option.apply(INT_1)).columnnumber(Option.apply(INT_1)) - val v2 = NewUnknownBuilder().typefullname(STRING_2).code(STRING_1).order(INT_1).argumentindex(INT_1) - .linenumber(Option.apply(INT_1)).columnnumber(Option.apply(INT_1)) + val v1 = NewUnknownBuilder().typeFullName(STRING_1).code(STRING_2).order(INT_1).argumentIndex(INT_1) + .lineNumber(Option.apply(INT_1)).columnNumber(Option.apply(INT_1)) + val v2 = NewUnknownBuilder().typeFullName(STRING_2).code(STRING_1).order(INT_1).argumentIndex(INT_1) + .lineNumber(Option.apply(INT_1)).columnNumber(Option.apply(INT_1)) assertFalse(driver.exists(v1)) assertFalse(driver.exists(v2)) driver.addVertex(v1) diff --git a/plume/src/test/kotlin/io/github/plume/oss/drivers/OverflowDbDriverIntTest.kt b/plume/src/test/kotlin/io/github/plume/oss/drivers/OverflowDbDriverIntTest.kt index d874f83f..db58bb8d 100644 --- a/plume/src/test/kotlin/io/github/plume/oss/drivers/OverflowDbDriverIntTest.kt +++ b/plume/src/test/kotlin/io/github/plume/oss/drivers/OverflowDbDriverIntTest.kt @@ -117,10 +117,10 @@ class OverflowDbDriverIntTest { @Test fun findFieldIdentifierVertex() { - val v1 = NewFieldIdentifierBuilder().canonicalname(STRING_1).code(STRING_2).argumentindex(INT_1) - .order(INT_1).linenumber(Option.apply(INT_1)).columnnumber(Option.apply(INT_1)) - val v2 = NewFieldIdentifierBuilder().canonicalname(STRING_2).code(STRING_1).argumentindex(INT_1) - .order(INT_1).linenumber(Option.apply(INT_1)).columnnumber(Option.apply(INT_1)) + val v1 = NewFieldIdentifierBuilder().canonicalName(STRING_1).code(STRING_2).argumentIndex(INT_1) + .order(INT_1).lineNumber(Option.apply(INT_1)).columnNumber(Option.apply(INT_1)) + val v2 = NewFieldIdentifierBuilder().canonicalName(STRING_2).code(STRING_1).argumentIndex(INT_1) + .order(INT_1).lineNumber(Option.apply(INT_1)).columnNumber(Option.apply(INT_1)) assertFalse(driver.exists(v1)) assertFalse(driver.exists(v2)) driver.addVertex(v1) @@ -147,12 +147,12 @@ class OverflowDbDriverIntTest { @Test fun findMethodRefVertex() { - val v1 = NewMethodRefBuilder().methodinstfullname(Option.apply(STRING_1)).methodfullname(STRING_2) - .code(STRING_1).order(INT_1).argumentindex(INT_1).linenumber(Option.apply(INT_1)) - .columnnumber(Option.apply(INT_1)) - val v2 = NewMethodRefBuilder().methodinstfullname(Option.apply(STRING_2)).methodfullname(STRING_1) - .code(STRING_1).order(INT_1).argumentindex(INT_1).linenumber(Option.apply(INT_1)) - .columnnumber(Option.apply(INT_1)) + val v1 = NewMethodRefBuilder().methodInstFullName(Option.apply(STRING_1)).methodFullName(STRING_2) + .code(STRING_1).order(INT_1).argumentIndex(INT_1).lineNumber(Option.apply(INT_1)) + .columnNumber(Option.apply(INT_1)) + val v2 = NewMethodRefBuilder().methodInstFullName(Option.apply(STRING_2)).methodFullName(STRING_1) + .code(STRING_1).order(INT_1).argumentIndex(INT_1).lineNumber(Option.apply(INT_1)) + .columnNumber(Option.apply(INT_1)) assertFalse(driver.exists(v1)) assertFalse(driver.exists(v2)) driver.addVertex(v1) @@ -165,8 +165,8 @@ class OverflowDbDriverIntTest { @Test fun findTypeVertex() { - val v1 = NewTypeBuilder().name(STRING_1).fullname(STRING_2).typedeclfullname(STRING_2) - val v2 = NewTypeBuilder().name(STRING_2).fullname(STRING_1).typedeclfullname(STRING_2) + val v1 = NewTypeBuilder().name(STRING_1).fullName(STRING_2).typeDeclFullName(STRING_2) + val v2 = NewTypeBuilder().name(STRING_2).fullName(STRING_1).typeDeclFullName(STRING_2) assertFalse(driver.exists(v1)) assertFalse(driver.exists(v2)) driver.addVertex(v1) @@ -179,14 +179,14 @@ class OverflowDbDriverIntTest { @Test fun findTypeRefVertex() { - val v1 = NewTypeRefBuilder().typefullname(STRING_1).dynamictypehintfullname( + val v1 = NewTypeRefBuilder().typeFullName(STRING_1).dynamicTypeHintFullName( SootToPlumeUtil.createScalaList(STRING_2) - ).code(STRING_1).argumentindex(INT_1).order(INT_1).linenumber(Option.apply(INT_1)) - .columnnumber(Option.apply(INT_1)) - val v2 = NewTypeRefBuilder().typefullname(STRING_2).dynamictypehintfullname( + ).code(STRING_1).argumentIndex(INT_1).order(INT_1).lineNumber(Option.apply(INT_1)) + .columnNumber(Option.apply(INT_1)) + val v2 = NewTypeRefBuilder().typeFullName(STRING_2).dynamicTypeHintFullName( SootToPlumeUtil.createScalaList(STRING_1) - ).code(STRING_1).argumentindex(INT_1).order(INT_1).linenumber(Option.apply(INT_1)) - .columnnumber(Option.apply(INT_1)) + ).code(STRING_1).argumentIndex(INT_1).order(INT_1).lineNumber(Option.apply(INT_1)) + .columnNumber(Option.apply(INT_1)) assertFalse(driver.exists(v1)) assertFalse(driver.exists(v2)) driver.addVertex(v1) @@ -199,10 +199,10 @@ class OverflowDbDriverIntTest { @Test fun findUnknownVertex() { - val v1 = NewUnknownBuilder().typefullname(STRING_1).code(STRING_2).order(INT_1).argumentindex(INT_1) - .linenumber(Option.apply(INT_1)).columnnumber(Option.apply(INT_1)) - val v2 = NewUnknownBuilder().typefullname(STRING_2).code(STRING_1).order(INT_1).argumentindex(INT_1) - .linenumber(Option.apply(INT_1)).columnnumber(Option.apply(INT_1)) + val v1 = NewUnknownBuilder().typeFullName(STRING_1).code(STRING_2).order(INT_1).argumentIndex(INT_1) + .lineNumber(Option.apply(INT_1)).columnNumber(Option.apply(INT_1)) + val v2 = NewUnknownBuilder().typeFullName(STRING_2).code(STRING_1).order(INT_1).argumentIndex(INT_1) + .lineNumber(Option.apply(INT_1)).columnNumber(Option.apply(INT_1)) assertFalse(driver.exists(v1)) assertFalse(driver.exists(v2)) driver.addVertex(v1) diff --git a/plume/src/test/kotlin/io/github/plume/oss/drivers/TigerGraphDriverIntTest.kt b/plume/src/test/kotlin/io/github/plume/oss/drivers/TigerGraphDriverIntTest.kt index 67f50907..31affc8a 100644 --- a/plume/src/test/kotlin/io/github/plume/oss/drivers/TigerGraphDriverIntTest.kt +++ b/plume/src/test/kotlin/io/github/plume/oss/drivers/TigerGraphDriverIntTest.kt @@ -106,10 +106,10 @@ class TigerGraphDriverIntTest { @Test fun findFieldIdentifierVertex() { - val v1 = NewFieldIdentifierBuilder().canonicalname(STRING_1).code(STRING_2).argumentindex(INT_1) - .order(INT_1).linenumber(Option.apply(INT_1)).columnnumber(Option.apply(INT_1)) - val v2 = NewFieldIdentifierBuilder().canonicalname(STRING_2).code(STRING_1).argumentindex(INT_1) - .order(INT_1).linenumber(Option.apply(INT_1)).columnnumber(Option.apply(INT_1)) + val v1 = NewFieldIdentifierBuilder().canonicalName(STRING_1).code(STRING_2).argumentIndex(INT_1) + .order(INT_1).lineNumber(Option.apply(INT_1)).columnNumber(Option.apply(INT_1)) + val v2 = NewFieldIdentifierBuilder().canonicalName(STRING_2).code(STRING_1).argumentIndex(INT_1) + .order(INT_1).lineNumber(Option.apply(INT_1)).columnNumber(Option.apply(INT_1)) assertFalse(driver.exists(v1)) assertFalse(driver.exists(v2)) driver.addVertex(v1) @@ -136,12 +136,12 @@ class TigerGraphDriverIntTest { @Test fun findMethodRefVertex() { - val v1 = NewMethodRefBuilder().methodinstfullname(Option.apply(STRING_1)).methodfullname(STRING_2) - .code(STRING_1).order(INT_1).argumentindex(INT_1).linenumber(Option.apply(INT_1)) - .columnnumber(Option.apply(INT_1)) - val v2 = NewMethodRefBuilder().methodinstfullname(Option.apply(STRING_2)).methodfullname(STRING_1) - .code(STRING_1).order(INT_1).argumentindex(INT_1).linenumber(Option.apply(INT_1)) - .columnnumber(Option.apply(INT_1)) + val v1 = NewMethodRefBuilder().methodInstFullName(Option.apply(STRING_1)).methodFullName(STRING_2) + .code(STRING_1).order(INT_1).argumentIndex(INT_1).lineNumber(Option.apply(INT_1)) + .columnNumber(Option.apply(INT_1)) + val v2 = NewMethodRefBuilder().methodInstFullName(Option.apply(STRING_2)).methodFullName(STRING_1) + .code(STRING_1).order(INT_1).argumentIndex(INT_1).lineNumber(Option.apply(INT_1)) + .columnNumber(Option.apply(INT_1)) assertFalse(driver.exists(v1)) assertFalse(driver.exists(v2)) driver.addVertex(v1) @@ -154,8 +154,8 @@ class TigerGraphDriverIntTest { @Test fun findTypeVertex() { - val v1 = NewTypeBuilder().name(STRING_1).fullname(STRING_2).typedeclfullname(STRING_2) - val v2 = NewTypeBuilder().name(STRING_2).fullname(STRING_1).typedeclfullname(STRING_2) + val v1 = NewTypeBuilder().name(STRING_1).fullName(STRING_2).typeDeclFullName(STRING_2) + val v2 = NewTypeBuilder().name(STRING_2).fullName(STRING_1).typeDeclFullName(STRING_2) assertFalse(driver.exists(v1)) assertFalse(driver.exists(v2)) driver.addVertex(v1) @@ -168,14 +168,14 @@ class TigerGraphDriverIntTest { @Test fun findTypeRefVertex() { - val v1 = NewTypeRefBuilder().typefullname(STRING_1).dynamictypehintfullname( + val v1 = NewTypeRefBuilder().typeFullName(STRING_1).dynamicTypeHintFullName( SootToPlumeUtil.createScalaList(STRING_2) - ).code(STRING_1).argumentindex(INT_1).order(INT_1).linenumber(Option.apply(INT_1)) - .columnnumber(Option.apply(INT_1)) - val v2 = NewTypeRefBuilder().typefullname(STRING_2).dynamictypehintfullname( + ).code(STRING_1).argumentIndex(INT_1).order(INT_1).lineNumber(Option.apply(INT_1)) + .columnNumber(Option.apply(INT_1)) + val v2 = NewTypeRefBuilder().typeFullName(STRING_2).dynamicTypeHintFullName( SootToPlumeUtil.createScalaList(STRING_1) - ).code(STRING_1).argumentindex(INT_1).order(INT_1).linenumber(Option.apply(INT_1)) - .columnnumber(Option.apply(INT_1)) + ).code(STRING_1).argumentIndex(INT_1).order(INT_1).lineNumber(Option.apply(INT_1)) + .columnNumber(Option.apply(INT_1)) assertFalse(driver.exists(v1)) assertFalse(driver.exists(v2)) driver.addVertex(v1) @@ -188,10 +188,10 @@ class TigerGraphDriverIntTest { @Test fun findUnknownVertex() { - val v1 = NewUnknownBuilder().typefullname(STRING_1).code(STRING_2).order(INT_1).argumentindex(INT_1) - .linenumber(Option.apply(INT_1)).columnnumber(Option.apply(INT_1)) - val v2 = NewUnknownBuilder().typefullname(STRING_2).code(STRING_1).order(INT_1).argumentindex(INT_1) - .linenumber(Option.apply(INT_1)).columnnumber(Option.apply(INT_1)) + val v1 = NewUnknownBuilder().typeFullName(STRING_1).code(STRING_2).order(INT_1).argumentIndex(INT_1) + .lineNumber(Option.apply(INT_1)).columnNumber(Option.apply(INT_1)) + val v2 = NewUnknownBuilder().typeFullName(STRING_2).code(STRING_1).order(INT_1).argumentIndex(INT_1) + .lineNumber(Option.apply(INT_1)).columnNumber(Option.apply(INT_1)) assertFalse(driver.exists(v1)) assertFalse(driver.exists(v2)) driver.addVertex(v1) diff --git a/plume/src/test/kotlin/io/github/plume/oss/drivers/TinkerGraphDriverIntTest.kt b/plume/src/test/kotlin/io/github/plume/oss/drivers/TinkerGraphDriverIntTest.kt index cd295a14..e365b72c 100644 --- a/plume/src/test/kotlin/io/github/plume/oss/drivers/TinkerGraphDriverIntTest.kt +++ b/plume/src/test/kotlin/io/github/plume/oss/drivers/TinkerGraphDriverIntTest.kt @@ -118,10 +118,10 @@ class TinkerGraphDriverIntTest { @Test fun findFieldIdentifierVertex() { - val v1 = NewFieldIdentifierBuilder().canonicalname(STRING_1).code(STRING_2).argumentindex(INT_1) - .order(INT_1).linenumber(Option.apply(INT_1)).columnnumber(Option.apply(INT_1)) - val v2 = NewFieldIdentifierBuilder().canonicalname(STRING_2).code(STRING_1).argumentindex(INT_1) - .order(INT_1).linenumber(Option.apply(INT_1)).columnnumber(Option.apply(INT_1)) + val v1 = NewFieldIdentifierBuilder().canonicalName(STRING_1).code(STRING_2).argumentIndex(INT_1) + .order(INT_1).lineNumber(Option.apply(INT_1)).columnNumber(Option.apply(INT_1)) + val v2 = NewFieldIdentifierBuilder().canonicalName(STRING_2).code(STRING_1).argumentIndex(INT_1) + .order(INT_1).lineNumber(Option.apply(INT_1)).columnNumber(Option.apply(INT_1)) assertFalse(driver.exists(v1)) assertFalse(driver.exists(v2)) driver.addVertex(v1) @@ -148,12 +148,12 @@ class TinkerGraphDriverIntTest { @Test fun findMethodRefVertex() { - val v1 = NewMethodRefBuilder().methodinstfullname(Option.apply(STRING_1)).methodfullname(STRING_2) - .code(STRING_1).order(INT_1).argumentindex(INT_1).linenumber(Option.apply(INT_1)) - .columnnumber(Option.apply(INT_1)) - val v2 = NewMethodRefBuilder().methodinstfullname(Option.apply(STRING_2)).methodfullname(STRING_1) - .code(STRING_1).order(INT_1).argumentindex(INT_1).linenumber(Option.apply(INT_1)) - .columnnumber(Option.apply(INT_1)) + val v1 = NewMethodRefBuilder().methodInstFullName(Option.apply(STRING_1)).methodFullName(STRING_2) + .code(STRING_1).order(INT_1).argumentIndex(INT_1).lineNumber(Option.apply(INT_1)) + .columnNumber(Option.apply(INT_1)) + val v2 = NewMethodRefBuilder().methodInstFullName(Option.apply(STRING_2)).methodFullName(STRING_1) + .code(STRING_1).order(INT_1).argumentIndex(INT_1).lineNumber(Option.apply(INT_1)) + .columnNumber(Option.apply(INT_1)) assertFalse(driver.exists(v1)) assertFalse(driver.exists(v2)) driver.addVertex(v1) @@ -166,8 +166,8 @@ class TinkerGraphDriverIntTest { @Test fun findTypeVertex() { - val v1 = NewTypeBuilder().name(STRING_1).fullname(STRING_2).typedeclfullname(STRING_2) - val v2 = NewTypeBuilder().name(STRING_2).fullname(STRING_1).typedeclfullname(STRING_2) + val v1 = NewTypeBuilder().name(STRING_1).fullName(STRING_2).typeDeclFullName(STRING_2) + val v2 = NewTypeBuilder().name(STRING_2).fullName(STRING_1).typeDeclFullName(STRING_2) assertFalse(driver.exists(v1)) assertFalse(driver.exists(v2)) driver.addVertex(v1) @@ -180,14 +180,14 @@ class TinkerGraphDriverIntTest { @Test fun findTypeRefVertex() { - val v1 = NewTypeRefBuilder().typefullname(STRING_1).dynamictypehintfullname( + val v1 = NewTypeRefBuilder().typeFullName(STRING_1).dynamicTypeHintFullName( SootToPlumeUtil.createScalaList(STRING_2) - ).code(STRING_1).argumentindex(INT_1).order(INT_1).linenumber(Option.apply(INT_1)) - .columnnumber(Option.apply(INT_1)) - val v2 = NewTypeRefBuilder().typefullname(STRING_2).dynamictypehintfullname( + ).code(STRING_1).argumentIndex(INT_1).order(INT_1).lineNumber(Option.apply(INT_1)) + .columnNumber(Option.apply(INT_1)) + val v2 = NewTypeRefBuilder().typeFullName(STRING_2).dynamicTypeHintFullName( SootToPlumeUtil.createScalaList(STRING_1) - ).code(STRING_1).argumentindex(INT_1).order(INT_1).linenumber(Option.apply(INT_1)) - .columnnumber(Option.apply(INT_1)) + ).code(STRING_1).argumentIndex(INT_1).order(INT_1).lineNumber(Option.apply(INT_1)) + .columnNumber(Option.apply(INT_1)) assertFalse(driver.exists(v1)) assertFalse(driver.exists(v2)) driver.addVertex(v1) @@ -200,10 +200,10 @@ class TinkerGraphDriverIntTest { @Test fun findUnknownVertex() { - val v1 = NewUnknownBuilder().typefullname(STRING_1).code(STRING_2).order(INT_1).argumentindex(INT_1) - .linenumber(Option.apply(INT_1)).columnnumber(Option.apply(INT_1)) - val v2 = NewUnknownBuilder().typefullname(STRING_2).code(STRING_1).order(INT_1).argumentindex(INT_1) - .linenumber(Option.apply(INT_1)).columnnumber(Option.apply(INT_1)) + val v1 = NewUnknownBuilder().typeFullName(STRING_1).code(STRING_2).order(INT_1).argumentIndex(INT_1) + .lineNumber(Option.apply(INT_1)).columnNumber(Option.apply(INT_1)) + val v2 = NewUnknownBuilder().typeFullName(STRING_2).code(STRING_1).order(INT_1).argumentIndex(INT_1) + .lineNumber(Option.apply(INT_1)).columnNumber(Option.apply(INT_1)) assertFalse(driver.exists(v1)) assertFalse(driver.exists(v2)) driver.addVertex(v1) @@ -348,7 +348,7 @@ class TinkerGraphDriverIntTest { @DisplayName("Graph import/export from file tests") inner class ValidateGraphImportExportFromFiles { private val v1 = NewFileBuilder().name(STRING_1).hash(Option.apply(STRING_2)).order(INT_1) - private val v2 = NewNamespaceBlockBuilder().name(STRING_1).fullname(STRING_2).order(INT_1) + private val v2 = NewNamespaceBlockBuilder().name(STRING_1).fullName(STRING_2).order(INT_1) @BeforeEach fun setUp() { diff --git a/plume/src/test/resources/schema/jg_schema.groovy b/plume/src/test/resources/schema/jg_schema.groovy index 5eac10c2..9e44b093 100644 --- a/plume/src/test/resources/schema/jg_schema.groovy +++ b/plume/src/test/resources/schema/jg_schema.groovy @@ -42,6 +42,7 @@ mgmt.containsPropertyKey('AST_PARENT_FULL_NAME') ?: mgmt.makePropertyKey('AST_PA mgmt.containsPropertyKey('IS_EXTERNAL') ?: mgmt.makePropertyKey('IS_EXTERNAL').dataType(Boolean.class).cardinality(Cardinality.SINGLE).make() mgmt.containsPropertyKey('FILENAME') ?: mgmt.makePropertyKey('FILENAME').dataType(String.class).cardinality(Cardinality.SINGLE).make() mgmt.containsPropertyKey('SIGNATURE') ?: mgmt.makePropertyKey('SIGNATURE').dataType(String.class).cardinality(Cardinality.SINGLE).make() +mgmt.containsPropertyKey('CONTROL_STRUCTURE_TYPE') ?: mgmt.makePropertyKey('CONTROL_STRUCTURE_TYPE').dataType(String.class).cardinality(Cardinality.SINGLE).make() mgmt.containsPropertyKey('EVALUATION_STRATEGY') ?: mgmt.makePropertyKey('EVALUATION_STRATEGY').dataType(String.class).cardinality(Cardinality.SINGLE).make() mgmt.containsPropertyKey('NAME') ?: mgmt.makePropertyKey('NAME').dataType(String.class).cardinality(Cardinality.SINGLE).make() mgmt.containsPropertyKey('VERSION') ?: mgmt.makePropertyKey('VERSION').dataType(String.class).cardinality(Cardinality.SINGLE).make() diff --git a/plume/src/test/resources/schema/tg_schema.gsql b/plume/src/test/resources/schema/tg_schema.gsql index 150677a8..66a0baec 100644 --- a/plume/src/test/resources/schema/tg_schema.gsql +++ b/plume/src/test/resources/schema/tg_schema.gsql @@ -23,6 +23,7 @@ CREATE VERTEX CPG_VERT ( LINE_NUMBER INT DEFAULT -1, NAME STRING DEFAULT "null", FILENAME STRING DEFAULT "null", + CONTROL_STRUCTURE_TYPE STRING DEFAULT "null", FULL_NAME STRING DEFAULT "null", CANONICAL_NAME STRING DEFAULT "null", AST_ORDER INT DEFAULT -1,