org.kit.furia.fragment.soot
Class FragmentExtractorSoot
java.lang.Object
org.kit.furia.fragment.AbstractFragmentExtractor
org.kit.furia.fragment.soot.FragmentExtractorSoot
- All Implemented Interfaces:
- FragmentExtractor
public class FragmentExtractorSoot
- extends AbstractFragmentExtractor
- implements FragmentExtractor
FragmentExtractor takes a directory and loads SootFragmentBuilder objects for
each method found. From the SootFragmentBuilder object, fragments can be
extracted.
- Since:
- 0
- Author:
- Arnoldo Jose Muller Molina
Method Summary |
void |
extractMethodsFromDirectory(java.lang.String directory,
soot.util.cfgcmd.CFGGraphType graphtype,
int maxStructuresAllowed,
int minStructuresAllowed,
java.lang.String outputPath,
java.lang.String outputFile)
Extracts fragments from the given directory. |
void |
extractMethodsFromDirectory(java.lang.String directory,
int maxStructuresAllowed,
int minStructuresAllowed,
java.lang.String outputPath,
java.lang.String outputFile)
Extracts fragments from the given directory. |
BodyStealer |
stealBodiesFromDir(java.lang.String dir,
java.lang.String outputPath)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
defaultGraphType
public static final soot.util.cfgcmd.CFGGraphType defaultGraphType
FragmentExtractorSoot
public FragmentExtractorSoot()
extractMethodsFromDirectory
public void extractMethodsFromDirectory(java.lang.String directory,
int maxStructuresAllowed,
int minStructuresAllowed,
java.lang.String outputPath,
java.lang.String outputFile)
throws java.io.FileNotFoundException,
NoClassesFound,
java.io.IOException,
IRException,
FragmentParseException
- Description copied from interface:
FragmentExtractor
- Extracts fragments from the given directory.
Furia-chan's fragment file format is:
\t\n
where is a string representation of an integer
and is a string representation of a tree (for example: a(b,c))
- Specified by:
extractMethodsFromDirectory
in interface FragmentExtractor
- Parameters:
directory
- Directory from where we will extract fragments.maxStructuresAllowed
- Maximum nodes per tree.minStructuresAllowed
- Minimum nodes per tree.outputPath
- Output path where logs will be written.outputFile
- The file where the fragments will be stored.
- Throws:
java.io.FileNotFoundException
- If the input or output files cannot be found.
NoClassesFound
- If no classes were found.
java.io.IOException
- If an IO error occurs.
IRException
- If some other error occurs it will be wrapped on this exception.
FragmentParseException
- If a fragment is not generated properly, this exception will be thrown. For debugging purposes.
extractMethodsFromDirectory
public void extractMethodsFromDirectory(java.lang.String directory,
soot.util.cfgcmd.CFGGraphType graphtype,
int maxStructuresAllowed,
int minStructuresAllowed,
java.lang.String outputPath,
java.lang.String outputFile)
throws java.io.FileNotFoundException,
NoClassesFound,
java.io.IOException,
IRException,
FragmentParseException
- Extracts fragments from the given directory. Furia-chan's fragment file
format is: \t
- Parameters:
directory
- Directory from where we will extract fragmentsgraphtype
- The graph representation used to interpret the methodsmaxStructuresAllowed
- maximum nodes per treemin_structures_allowed
- minimum nodes per treeoutputPath
- Output path where logs will be writtenoutputFile
- The output fragment file that will be used
- Throws:
NoClassesFoundByStealer
java.io.FileNotFoundException
java.lang.Exception
NoClassesFound
java.io.IOException
IRException
FragmentParseException
stealBodiesFromDir
public BodyStealer stealBodiesFromDir(java.lang.String dir,
java.lang.String outputPath)
throws java.io.FileNotFoundException,
NoClassesFound
- Throws:
java.io.FileNotFoundException
NoClassesFound
Copyright © 2008 Arnoldo Jose Muller Molina. All Rights Reserved.