C# Class SUnitExtractor, Swummary

Static class which provides methods to parse a SrcML MethodDefinition for s_units.
ファイルを表示 Open project: herbertkb/Swummary Class Usage Examples

Public Methods

Method Description
ExtractAll ( MethodDefinition methodDef ) : IEnumerable

Extracts all selected s_units from a method: ending, void-return, and same-action. TODO: add data-facilitating s_unit selection.

ExtractEnding ( MethodDefinition methodDef ) : IEnumerable

Extracts ending s_units from method. Ending s_units are statements that exit from the control of a method. These include explicit return statements and/or the last statement in a method.

ExtractSameAction ( MethodDefinition methodDef ) : IEnumerable

Extracts same-action s_units from a method. Same-actions s_units feature a method call which shares a symantic action with their method's name. For example, suppose a method named "LoadConfigFile" had a statement calling some "OpenFile()" method.

ExtractVoidReturn ( MethodDefinition methodDef ) : IEnumerable

Extracts void return s_units from a method. Void return s_units do not return a value or do not assign any value to a variable.

Method Details

ExtractAll() public static method

Extracts all selected s_units from a method: ending, void-return, and same-action. TODO: add data-facilitating s_unit selection.
public static ExtractAll ( MethodDefinition methodDef ) : IEnumerable
methodDef MethodDefinition The SrcML MethodDefinition from which to extract same action s_units.
return IEnumerable

ExtractEnding() public static method

Extracts ending s_units from method. Ending s_units are statements that exit from the control of a method. These include explicit return statements and/or the last statement in a method.
public static ExtractEnding ( MethodDefinition methodDef ) : IEnumerable
methodDef MethodDefinition The SrcML MethodDefinition from which to extract ending s_units.
return IEnumerable

ExtractSameAction() public static method

Extracts same-action s_units from a method. Same-actions s_units feature a method call which shares a symantic action with their method's name. For example, suppose a method named "LoadConfigFile" had a statement calling some "OpenFile()" method.
public static ExtractSameAction ( MethodDefinition methodDef ) : IEnumerable
methodDef MethodDefinition The SrcML MethodDefinition from which to extract same action s_units.
return IEnumerable

ExtractVoidReturn() public static method

Extracts void return s_units from a method. Void return s_units do not return a value or do not assign any value to a variable.
public static ExtractVoidReturn ( MethodDefinition methodDef ) : IEnumerable
methodDef MethodDefinition The SrcML MethodDefinition from which to extract void return s_units.
return IEnumerable