Upgrade to latest nodejs changes.

This change makes id_service.js compatible with the latest nodejs versions.

Signed-off-by: Matthias Dittrich <matthi.d@gmail.com>
Reviewed-by: Wolfgang Mauerer <wolfgang.mauerer@siemens.com>
Changes to make the files better standalone executable within pydev IDE (especially unit tests).

Use qualified imports instead of relative ones. This makes it clear which module we want to import.
Handle some special case when we are within a unit test.

Signed-off-by: Matthias Dittrich <matthi.d@gmail.com>
Reviewed-by: Wolfgang Mauerer <wolfgang.mauerer@siemens.com>
Fix of some typos in code comments.

This fixes some typos.

Signed-off-by: Matthias Dittrich <matthi.d@gmail.com>
Reviewed-by: Wolfgang Mauerer <wolfgang.mauerer@siemens.com>
Fixed typo bugs in code (noticed by pycharm).

Renamed undefined "logger" symbol to "log" and the undefined "reg_end" symbol to "rev_end".

Signed-off-by: Matthias Dittrich <matthi.d@gmail.com>
Reviewed-by: Wolfgang Mauerer <wolfgang.mauerer@siemens.com>
Add a _get_feature_lines function which calculates feature sets for all source code lines.

- The _get_feature_lines function calculates the feature sets in a similar way how _getFunctionsLines
  calculates the current functions for all source code lines.
- Added some fields to codeface/fileCommit.py to save those results.
- parse_feature_line function to parse a single line of cppstats output.
- Added FileDict class to encapsulate information about the features of a source code file.
- parse_feature_lines function to generate a FileDict instance from all lines of cppstats output.
- We expect cppstats to be in path and check that the executable works before starting the analysis.
- Update documentation.

Signed-off-by: Matthias Dittrich <matthi.d@gmail.com>
Reviewed-by: Wolfgang Mauerer <wolfgang.mauerer@siemens.com>
Add unit tests for the get_feature_lines functions.

Added unit tests for the get_feature_lines function to ensure that it can properly
work with the parsed data of the parse_feature_line function.

Signed-off-by: Matthias Dittrich <matthi.d@gmail.com>
Reviewed-by: Wolfgang Mauerer <wolfgang.mauerer@siemens.com>
Added some functions to calculate the collaboration between developers with feature instead of function blocks.

Added some functions similar to the proximity analysis functions, but for features.
- computeProximityLinks -> compute_feature_proximity_links_per_file (the per-file feature collaboration analysis).
- computeSnapshotCollaboration -> compute_snapshot_collaboration_features (compute the collaboration for a file snapshot).
- linesOfInterest -> lines_of_interest_features (fiter out not interesting lines (ie lines not relevant for the current snapshot).
- groupFuncLines -> group_feature_lines (we group feature instead of function blocks).
- computeCommitCollaboration was reused as produce the same abstract codeblocks for features.
- computeProximityLinks -> compute_feature_proximity_links (the project wide feature collaboration analysis).

Signed-off-by: Matthias Dittrich <matthi.d@gmail.com>
Reviewed-by: Wolfgang Mauerer <wolfgang.mauerer@siemens.com>
Integrate feature analysis by providing a CLI parameter.

This commit integrates the feature analysis added by the last commits.
Now the tagging configurations "feature" which is a project wide feature analysis and
"feature_file" for a per-file feature analysis are supported.
Additionally we introduce a --tagging parameter.
This parameter defaults to "default" which uses the tagging value from the configuration.
Sometimes you want to use the same configuration file but with different analysis methods, this could also be useful with CI later on.
Extracted LinkType class to an extra file so it can be used throughout the codebase (instead of magic strings).

Signed-off-by: Matthias Dittrich <matthi.d@gmail.com>
Reviewed-by: Wolfgang Mauerer <wolfgang.mauerer@siemens.com>
Fixed some undefined variable errors.

When link_type is not proximity or file the variables are not defined, but used later.

Signed-off-by: Matthias Dittrich <matthi.d@gmail.com>
Fix for LinkType.file.

When link_type is file we have no funcId entries and we default back to File_Level.

Signed-off-by: Matthias Dittrich <matthi.d@gmail.com>
Trace features and functions in the collaboration analysis.

We now support tracing commits, features and functions through the strengh of an relation.
This allows to include several new informations in the output.
Currently we output a new file 'adjacencyMatrix_max_weight.txt' which outputs the feature or
function with the most influence instead of the collaboration strength ('adjacencyMatrix.txt').
This would work for files as well but we have to change the 'File_Level' to something like '$filename' for the output to be usefull.

Signed-off-by: Matthias Dittrich <matthi.d@gmail.com>
Fill the commit_dependency table on a feature analysis pass.

When running a feature or feature_file analysis pass we generate entries in the commit_dependency table for each changed feature for each commit.

Signed-off-by: Matthias Dittrich <matthi.d@gmail.com>
Fix for the Signed-Off and Committer2Author analysis.

We need to use the new RelationWeight class to specify the weight on the edges.

Signed-off-by: Matthias Dittrich <matthi.d@gmail.com>
Fix in unit test suite.

It seems like a key name changed so it would not match anymore in the unit test.

Signed-off-by: Matthias Dittrich <matthi.d@gmail.com>
Disabled the unit tests.

As the unit tests do not run anyway I disabled them.
They should now be added back one by one and fixed in this process.

Signed-off-by: Matthias Dittrich <matthi.d@gmail.com>
Feature analysis edge cases, speedup and possibly incorrect data.

In the feature analysis it was possible to miss some early changes where one author would work alone on a set of lines.
Also the process can be made faster by calculating the feature groups for all commits.
Finally we handled some edge cases which are now required by the changed code.

Signed-off-by: Matthias Dittrich <matthi.d@gmail.com>
Extend dbmanager to support cluster queries by rangeId

We need this to be able to query all clusters within the integration test suite.

Signed-off-by: Matthias Dittrich <matthi.d@gmail.com>
Extend integration test suite to suppport to check for multiple ranges and subclasses from EndToEndTestSetup to ignore tables.

This way we can implement a setup where we do not run a mailing list analysis.
I will use this to implement the integrations tests for the feature and feature_file analysis.

Signed-off-by: Matthias Dittrich <matthi.d@gmail.com>
Disabled the current integration tests as they do not work.

They should be added one by one and making sure they work.

Signed-off-by: Matthias Dittrich <matthi.d@gmail.com>
Add git project for testing the feature analysis.

This adds an example project within the integration test suite to test the feature and feature_file analysis.
The project will be used by the next commit for testing purposes.

Signed-off-by: Matthias Dittrich <matthi.d@gmail.com>