public class SequenceExtractor extends Object
Constructor and Description |
---|
SequenceExtractor() |
Modifier and Type | Method and Description |
---|---|
static String |
extractSequence(String snippet)
Extracts the sequence for a snippet.
|
static String |
extractSequence(String snippet,
boolean keepFunctionCallTypes,
boolean keepLiterals,
boolean keepBranches,
boolean outputTree,
boolean flattenOutput,
boolean addUniqueIDs)
Extracts the sequence for a snippet.
|
protected static String |
getASTofSnippet(String snippet)
Returns the Abstract Syntax Tree of a snippet.
|
protected static String |
getASTofSnippet(String snippet,
boolean keepNodeInfo)
Returns the Abstract Syntax Tree of a snippet.
|
protected static String getASTofSnippet(String snippet, boolean keepNodeInfo)
snippet
- the snippet given as a string.keepNodeInfo
- denotes if any added nodes should be kept in the AST.protected static String getASTofSnippet(String snippet)
snippet
- the snippet given as a string.public static String extractSequence(String snippet)
snippet
- the snippet of which the sequence is extracted.public static String extractSequence(String snippet, boolean keepFunctionCallTypes, boolean keepLiterals, boolean keepBranches, boolean outputTree, boolean flattenOutput, boolean addUniqueIDs)
snippet
- the snippet of which the sequence is extracted.keepFunctionCallTypes
- true
if call types should be kept, or false
otherwise.keepLiterals
- true
if literals (primitives) should be kept, or false
otherwise.keepBranches
- true
if all branches should be kept, or false
for the first branch.outputTree
- true
if the output should be a tree, or false
for output as a sequence.flattenOutput
- true
if the output should be flattened, or false
otherwise.Copyright © 2017. All rights reserved.