Skip to content

Commit 24005e4

Browse files
authored
Merge pull request #259 from se-sic/dev
Version 4.4 Merged-by: Thomas Bock <bockthom@cs.uni-saarland.de>
2 parents a0c3a52 + 49c0d2c commit 24005e4

36 files changed

+2656
-876
lines changed

.github/workflows/pull_request.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
## with this program; if not, write to the Free Software Foundation, Inc.,
1212
## 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
1313
##
14-
## Copyright 2023 by Maximilian Löffler <s8maloef@cs.uni-saarland.de>
14+
## Copyright 2023-2024 by Maximilian Löffler <s8maloef@cs.uni-saarland.de>
15+
## Copyright 2024 by Thomas Bock <bockthom@cs.uni-saarland.de>
1516
## All Rights Reserved.
1617

1718
name: Build Status
@@ -29,18 +30,18 @@ permissions:
2930
jobs:
3031
build:
3132
name: Build
32-
33+
3334
# change to 'runs-on: self-hosted' to run on self-hosted runners (https://docs.github.com/en/actions/using-jobs/choosing-the-runner-for-a-job)
3435
runs-on: ubuntu-latest
35-
36+
3637
strategy:
3738
fail-fast: false
3839
matrix:
39-
r-version: ['3.6', '4.0', '4.1', '4.2', 'latest']
40+
r-version: ['3.6', '4.0', '4.1', '4.2', '4.3', 'latest']
4041

4142
steps:
42-
- name: Checkout Repo
43-
uses: actions/checkout@v3
43+
- name: Checkout Repo
44+
uses: actions/checkout@v4
4445

4546
- name: Update system
4647
run: |
@@ -56,7 +57,7 @@ jobs:
5657
uses: r-lib/actions/setup-r@v2
5758
with:
5859
r-version: ${{ matrix.r-version }}
59-
60+
6061
- name: Install dependencies
6162
run: Rscript install.R
6263

NEWS.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,51 @@
22

33
# coronet – Changelog
44

5+
## 4.4
6+
7+
### Announcement
8+
9+
- Due to a bug in package `igraph` (https://github.com/igraph/rigraph/issues/1158), which is present in their versions 2.0.0 to 2.0.3, the functions `metrics.scale.freeness` and `metrics.is.scale.free` can currently not be used with these `igraph` versions. If you need to call any of these two functions, you either need to install `igraph` version 1.6.0 or wait until the bug in `igraph` is fixed in a future version of `igraph`.
10+
11+
### Added
12+
13+
- Add issue-based artifact-networks, in which issues form vertices connected by edges that represent issue references. If possible, disambiguate duplicate JIRA issue references that originate from [codeface-extraction](https://github.com/se-sic/codeface-extraction) (PR #244, PR #249, 98a93ee721a293410623aafe46890cfba9d81e72, 771bcc8d961d419b53a1e891e9dc536371f1143b, 368e79264adf5a5358c04518c94ad2e1c13e212b, fa3167c289c9785f3a5db03d9724848f1441a63d, 4646d581d5e1f63260692b396a8bd8f51b0da48fda, ed77bd726bf92e06c2fc9145a5847787a8d0588b)
14+
- Add a new `split.data.by.bins` function (not to be confused with a previously existing function that had the same name and was renamed in this context), which splits data based on given activity-based bins (PR #244, ece569ceaf557bb38cd0cfad437b69b30fe8a698, ed5feb214a123b605c9513262f187cfd72b9e1f4)
15+
- Add `get.bin.dates.from.ranges` function to convert date ranges into bins format (PR #249, a1842e9be46596321ee86860fd87d17a3c88f50f, 858b1812ebfc3194cc6a03c99f3ee7d161d1ca15)
16+
- Add the possibility to simplify edges of multiple-relation networks into a single edge at all instead of a single edge per relation (PR #250, PR #255, 2105ea89b5227e7c9fa78fea9de1977f2d9e8faa, a34b5bd50351b9ccf3cc45fc323cfa2e84d65ea0, 34516415fed599eba0cc7d3cc4a9acd6b26db252, 78f43514962d7651e6b7a1e80ee22ce012f32535, d310fdc38690f0d701cd32c92112c33f7fdde0ff, 58d77b01ecc6a237104a4e72ee5fb9025efeaaf2)
17+
- Add network simplification to showcase file (PR #255, dc32d44f9db7dfc3cc795ef5d6b86609d6c1936f)
18+
- Add tests for network simplification (PR #255, 338b06941eec1c9cfdb121e78ce0d9db6b75da19, 8a6f47bc115c10fbbe4eee21985d97aee5c9dc91, e01908c94eccc4dda5f2b3c0746b0eab0172dc07, 7b6848fb86f69db088ce6ef2bea8315ac94d48f9, 666d78444ffcb3bc8b36f2121284e4840176618e)
19+
- Add an `assert.sparse.matrices.equal` function to compare two sparse matrices for equality for testing purposes (PR #248, 9784cdf12d1497ee122e2ae73b768b8c334210d4, d9f1a8d90e00a634d7caeb5e7f8f262776496838)
20+
- Add tests for file `util-networks-misc.R` (#242, PR #248, PR #258, f3202a6f96723d11c170346556d036cf087521c8, 030574b9d0f3435db4032d0e195a3d407fb7244b, 380b02234275127297fcd508772c69db21c216de, 8b803c50d60fc593e4e527a08fd4c2068d801a48, 7335c3dd4d0302b024a66d18701d9800ed3fe806, 6b600df04bec1fe70c272604f274ec5309840e65, a53fab85358b223af43749a088ad02e9fbcb0a30, faf19fc369beb901b556ecb8c4fa0bf6f1bd6304)
21+
22+
### Changed/Improved
23+
24+
- Add input validation for the `bins` parameter in `split.data.time.based` and `split.data.by.bins` (PR #244, ed0a5302ea8c8934d7200b95be7ac1446305af07, 5e5ecbac44d07927b953ae9d4330a616f8224ba7)
25+
- Test for the presence and validity of the `bins` attribute on network-, and data-splits (PR #249, c064affcfff2eb170d8bdcb39d837a7ff62b2cbd, 93051ab848ec94de138b0513dac22f6da0d20885)
26+
- Simplify call chain-, and branching-routes in network-splitting functions and consequently set the `bins` attribute on every output network-split (while minimizing recalculations) (PR #249, #256, PR #257, a1842e9be46596321ee86860fd87d17a3c88f50f, 8695fbe7f21ccaa3ccd6d1016e754017d387b1fa)
27+
- Rename `split.data.by.bins` into `split.dataframe.by.bins` as this it what it does (PR #244, ed5feb214a123b605c9513262f187cfd72b9e1f4)
28+
- Throw an error in `split.data.time.based.by.timestamps` if no custom event timestamps are available in the ProjectData object (6305adcee7f18747141994b00bdd94641f95e86f)
29+
- Enhance testing data by adding `add_link` and `referenced_by` issue events, which connect issues to form edges in issue-based artifact-networks. This includes duplicate edge information in JIRA data as produced by [codeface-extraction](https://github.com/se-sic/codeface-extraction) (PR #244, 9f840c040d552e8639aa82c3dd537c189679b348, ea4fe8d3c84f948af6147cf0137e80181ebb7a1e, 6eb731102301b1af08f4affb40d1f8df94500e34)
30+
- Add a check for empty networks in the functions `metrics.scale.freeness` and `metrics.is.scale.free` and return `NA` if the network is empty (29418f2da38de8c39ec2a1fb3d445b63f320be40)
31+
- Enhance `get.author.names.from.network` and `get.author.names.from.data` to always have the same output format. Now it doesn't depend on the `global` flag anymore (PR #248, d87d32564156f13c83ebe3361c2b68e5d0ac16ac, ddbfe68d3e628e82f34e09b36fffe886646986c5)
32+
- Change `util-tensor.R` to correctly use the new output format of `get.author.names.from.network` (PR #248, 72b663ebf7169c0da5c687fe215529f3be0c08c5)
33+
- Throw an error in `convert.adjacency.matrix.list.to.array` if the function is called with wrong parameters (PR #248, ece2d38b4972745af3a83e06f32317a06465a345, 1a3e510df15f5fa4e920e9fce3e0e162c27cd6d1)
34+
- Rename `compare.networks` to `assert.networks.equal` to better match the purpose of the function (PR #248, d9f1a8d90e00a634d7caeb5e7f8f262776496838)
35+
- Explicitly add R version 4.3 to the CI test pipeline (9f346d5bc3cfc553f01e5e80f0bbe51e1dc2b53e)
36+
37+
### Fixed
38+
39+
- Reformat `event.info.1` column of issue data according to the <issue-%source-%id> format, if the content of the `event.info.1` field references another issue (PR #244, 62ff9d0f31adbefb3381936237dc4ab984e33acb)
40+
- Rename vertex attribute `IssueEvent` to `Issue` in multi-networks, to be consistent with bipartite-networks (PR #244, 26d7b7e9fd6d33d1c0a8a08f19c5c2e30346a3d9)
41+
- Fix an issue in activity-based splitting where elements close to the border of bins might be assigned to the wrong bin. The issue was caused by the usage of `split.data.time.based` inside `split.data.activity.based` to split data into the previously derived bins, when elements close to bin borders share the same timestamps. It is fixed by replacing `split.data.time.based` by `split.data.by.bins` (PR #244, ece569ceaf557bb38cd0cfad437b69b30fe8a698)
42+
- Remove the last range when using a sliding-window approach and the last range's elements are fully contained in the second last range (PR #244, 48ef4fa685adf6e5d85281e5b90a8ed8f6aeb197, 943228fbc91eed6854dacafa7075441e58b22675)
43+
- Fix broken error logging in `metrics.smallworldness` (03e06881f06abf30d44b69d7988873f20b95232d)
44+
- Fix `get.expanded.adjacency` to work if the provided author list does not contain all authors from the network and add a warning when that happens since it causes some authors from the network to be lost in the resulting matrix (PR #248, ff59017e114b10812dcfb1704a19e01fc1586a13)
45+
- Fix `get.expanded.adjacency.matrices` to have correct names for the columns and rows (PR #248, PR #258, e72eff864a1cb1a4aecd430e450d4a6a5044fdf2, a53fab85358b223af43749a088ad02e9fbcb0a30)
46+
- Fix `get.expanded.adjacency.cumulated` so that it works if `weighted` parameter is set to `FALSE` (PR #248, 2fb9a5d446653f6aee808cbfc87c2dafeb9a749a)
47+
- Fix multi-network construction to work with `igraph` version 2.0.1.1, which does not allow to add an empty list of vertices (PR #250, 5547896faa279f6adaae4b2b77c7ab9623ddf256)
48+
49+
550
## 4.3
651

752
### Added

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -632,7 +632,7 @@ Updates to the parameters can be done by calling `NetworkConf$update.variables(.
632632
* possible values: [*`"cochange"`*, `"callgraph"`, `"mail"`, `"issue"`]
633633
- `artifact.directed`
634634
* The directedness of edges in an artifact network
635-
* **Note**: This parameter does not take effect for now, as the `cochange` relation is always undirected, while the `callgraph` relation is always directed. For the other relations (`mail` and `issue`), we currently do not have data available to exhibit edge information.
635+
* **Note**: This parameter does only affect the `issue` relation, as the `cochange` relation is always undirected, while the `callgraph` relation is always directed. For the `mail`, we currently do not have data available to exhibit edge information.
636636
* [`TRUE`, *`FALSE`*]
637637
- `edge.attributes`
638638
* The list of edge-attribute names and information
@@ -654,6 +654,10 @@ Updates to the parameters can be done by calling `NetworkConf$update.variables(.
654654
- `simplify`
655655
* Perform edge contraction to retrieve a simplified network
656656
* [`TRUE`, *`FALSE`*]
657+
- `simplify.multiple.relations`
658+
* Whether the simplified network should contract edges of multiple relations into a single edge or not (if not, there will be one edge for each relation, resulting in possibly more than one edge between a pair of vertices)
659+
* **Note** This parameter does not take effect if ``simplify = FALSE``!
660+
* [`TRUE`, *`FALSE`*]
657661
- `skip.threshold`
658662
* The upper bound for total amount of edges to build for a subset of the data, i.e., not building any edges for the subset exceeding the limit
659663
* any positive integer

showcase.R

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,14 @@
1616
## Copyright 2017 by Christian Hechtl <hechtl@fim.uni-passau.de>
1717
## Copyright 2017 by Felix Prasse <prassefe@fim.uni-passau.de>
1818
## Copyright 2017-2018 by Thomas Bock <bockthom@fim.uni-passau.de>
19-
## Copyright 2020-2021 by Thomas Bock <bockthom@cs.uni-saarland.de>
19+
## Copyright 2020-2021, 2024 by Thomas Bock <bockthom@cs.uni-saarland.de>
2020
## Copyright 2018 by Jakob Kronawitter <kronawij@fim.uni-passau.de>
2121
## Copyright 2019 by Klara Schlueter <schluete@fim.uni-passau.de>
2222
## Copyright 2020 by Anselm Fehnker <anselm@muenster.de>
2323
## Copyright 2021 by Johannes Hostert <s8johost@stud.uni-saarland.de>
2424
## Copyright 2021 by Niklas Schneider <s8nlschn@stud.uni-saarland.de>
2525
## Copyright 2022 by Jonathan Baumann <joba00002@stud.uni-saarland.de>
26+
## Copyright 2024 by Maximilian Löffler <s8maloef@stud.uni-saarland.de>
2627
## All Rights Reserved.
2728

2829

@@ -218,7 +219,7 @@ cf.data = split.data.time.based(x.data, bins = mybins)
218219
## construct (author) networks from range data
219220
my.networks = lapply(cf.data, function(range.data) {
220221
y = NetworkBuilder$new(project.data = range.data, network.conf = net.conf)
221-
return (y$get.author.network())
222+
return(y$get.author.network())
222223
})
223224
## add commit-count vertex attributes
224225
sample = add.vertex.attribute.author.commit.count(my.networks, x.data, aggregation.level = "range")
@@ -361,6 +362,24 @@ g.motifs = motifs.count(network = g,
361362
remove.duplicates = TRUE, raw.data = FALSE)
362363

363364

365+
## / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /
366+
## Network simplification --------------------------------------------------
367+
368+
## construct sample network
369+
g = y$get.multi.network()
370+
g = igraph::delete_edges(g, c(5, 6))
371+
g = igraph::delete_vertices(g, c(2, 4, 5, 6, 7, 8))
372+
g = g + igraph::edges(c("Björn", "Olaf", "Björn", "Olaf"), type = TYPE.EDGES.INTRA, weight = 1,
373+
relation = "cochange", artifact.type = "Feature")
374+
375+
## merge edges between vertice pairs that stem from the same data source
376+
g.simplified = simplify.network(g)
377+
plot.network(g.simplified)
378+
379+
## merge all edges between vertice pairs
380+
g.simplified = simplify.network(g, simplify.multiple.relations = TRUE)
381+
plot.network(g.simplified)
382+
364383
## / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / / /
365384
## Plots -------------------------------------------------------------------
366385

tests/codeface-data/results/testing/test_feature/feature/issues-github.list

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,8 @@
55
3;"Error in construct.networks.from.list for openssl function networks";"[""issue"", ""bug""]";"closed";"[]";"2016-07-12 15:59:25";"2016-07-12 16:06:30";"[]";"add_link";"Karl";"karl@example.org";"2016-08-07 15:37:02";"930af63a030fb92e48eddff01f53284c3eeba80e";"""commit"""
66
3;"Error in construct.networks.from.list for openssl function networks";"[""issue"", ""bug""]";"closed";"[]";"2016-07-12 15:59:25";"2016-07-12 16:06:30";"[]";"referenced";"Karl";"karl@example.org";"2016-08-31 16:45:09";"";""""""
77
3;"Error in construct.networks.from.list for openssl function networks";"[""issue"", ""bug""]";"closed";"[]";"2016-07-12 15:59:25";"2016-07-12 16:06:30";"[]";"referenced";"Thomas";"thomas@example.org";"2016-10-05 16:45:09";"";""""""
8+
3;"Error in construct.networks.from.list for openssl function networks";"[""issue"", ""bug""]";"closed";"[]";"2016-07-12 15:59:25";"2016-07-12 16:06:30";"[]";"add_link";"Karl";"karl@example.org";"2016-08-07 15:37:02";"6";"""issue"""
9+
3;"Error in construct.networks.from.list for openssl function networks";"[""issue"", ""bug""]";"closed";"[]";"2016-07-12 15:59:25";"2016-07-12 16:06:30";"[]";"add_link";"Thomas";"thomas@example.org";"2016-08-07 15:30:00";"2";"""issue"""
810
6;"Distinguish directedness of networks and edge-construction algorithm";"[""issue"", ""bug"", ""enhancement""]";"open";"[]";"2016-07-12 14:30:13";"";"[]";"mentioned";"udo";"udo@example.org";"2016-07-12 15:30:02";"Thomas";"""thomas@example.org"""
911
6;"Distinguish directedness of networks and edge-construction algorithm";"[""issue"", ""bug"", ""enhancement""]";"open";"[]";"2016-07-12 14:30:13";"";"[]";"subscribed";"udo";"udo@example.org";"2016-07-12 15:30:02";"Thomas";"""thomas@example.org"""
1012
6;"Distinguish directedness of networks and edge-construction algorithm";"[""issue"", ""bug"", ""enhancement""]";"open";"[]";"2016-07-12 14:30:13";"";"[]";"commented";"Thomas";"thomas@example.org";"2016-07-12 16:03:59";"open";"[]"
@@ -15,6 +17,7 @@
1517
6;"Distinguish directedness of networks and edge-construction algorithm";"[""issue"", ""bug"", ""enhancement""]";"open";"[]";"2016-07-12 14:30:13";"";"[]";"subscribed";"Björn";"bjoern@example.org";"2016-12-07 15:30:02";"udo";"""udo@example.org"""
1618
6;"Distinguish directedness of networks and edge-construction algorithm";"[""issue"", ""bug"", ""enhancement""]";"open";"[]";"2016-07-12 14:30:13";"";"[]";"labeled";"Olaf";"olaf@example.org";"2017-05-23 12:31:34";"decided";""""""
1719
6;"Distinguish directedness of networks and edge-construction algorithm";"[""issue"", ""bug"", ""enhancement""]";"open";"[]";"2016-07-12 14:30:13";"";"[]";"commented";"Björn";"bjoern@example.org";"2017-05-23 12:32:39";"open";"[]"
20+
6;"Distinguish directedness of networks and edge-construction algorithm";"[""issue"", ""bug"", ""enhancement""]";"open";"[]";"2016-07-12 14:30:13";"";"[]";"referenced_by";"Karl";"karl@example.org";"2016-08-07 15:37:02";"3";"""issue"""
1821
"1";"Example pull request 1";"[""pull request""]";"reopened";"[]";"2016-07-14 13:37:00";"";"[]";"created";"Thomas";"thomas@example.org";"2016-07-12 15:59:25";"open";"[]"
1922
"1";"Example pull request 1";"[""pull request""]";"reopened";"[]";"2016-07-14 13:37:00";"";"[]";"commented";"Thomas";"thomas@example.org";"2016-07-12 15:59:25";"open";"[]"
2023
"1";"Example pull request 1";"[""pull request""]";"reopened";"[]";"2016-07-14 13:37:00";"";"[]";"state_updated";"Thomas";"thomas@example.org";"2016-07-12 15:59:59";"closed";"""open"""
@@ -25,6 +28,7 @@
2528
"2";"Example pull request 2";"[""pull request""]";"closed";"[]";"2016-07-12 14:59:25";"2016-07-12 16:04:59";"[]";"commented";"Björn";"bjoern@example.org";"2016-07-12 14:59:25";"open";"[]"
2629
"2";"Example pull request 2";"[""pull request""]";"closed";"[]";"2016-07-12 14:59:25";"2016-07-12 16:04:59";"[]";"merged";"Olaf";"olaf@example.org";"2016-07-12 16:04:59";"";""""""
2730
"2";"Example pull request 2";"[""pull request""]";"closed";"[]";"2016-07-12 14:59:25";"2016-07-12 16:04:59";"[]";"state_updated";"Olaf";"olaf@example.org";"2016-07-12 16:04:59";"closed";"""open"""
31+
"2";"Example pull request 2";"[""pull request""]";"closed";"[]";"2016-07-12 14:59:25";"2016-07-12 16:04:59";"[]";"referenced_by";"Thomas";"thomas@example.org";"2016-08-07 15:30:00";"3";"""issue"""
2832
"4";"Example pull request 4";"[""pull request"", ""enhancement""]";"open";"[]";"2016-07-12 16:02:02";"";"[]";"commit_added";"Björn";"bjoern@example.org";"2016-07-12 15:58:59";"72c8dd25d3dd6d18f46e2b26a5f5b1e2e8dc28d0";""""""
2933
"4";"Example pull request 4";"[""pull request"", ""enhancement""]";"open";"[]";"2016-07-12 16:02:02";"";"[]";"created";"Olaf";"olaf@example.org";"2016-07-12 16:02:02";"open";"[]"
3034
"4";"Example pull request 4";"[""pull request"", ""enhancement""]";"open";"[]";"2016-07-12 16:02:02";"";"[]";"commented";"Olaf";"olaf@example.org";"2016-07-12 16:02:02";"open";"[]"

0 commit comments

Comments
 (0)