https://github.com/aserg-ufmg/apidiff
A tool to identify breaking and non-breaking changes between two versions of a Java library
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (6.9%) to scientific vocabulary
Keywords
Repository
A tool to identify breaking and non-breaking changes between two versions of a Java library
Basic Info
Statistics
- Stars: 55
- Watchers: 6
- Forks: 19
- Open Issues: 1
- Releases: 1
Topics
Metadata Files
README.md
APIDiff
A tool to identify API breaking and non-breaking changes between two versions of a Java library. APIDiff analyses libraries hosted on the distributed version control system git.
Catalog
Breaking Changes are modifications performed in API elements such as types, methods, and fields that may break client applications:
| Element | Breaking Changes (BC) | | ------------- | ------------- | | Type | rename, move, move and rename, remove, lost visibility, add final modifier, remove static modifier, change in supertype, remove supertype | | Method | move, rename, remove, push down, inline, change in parameter list, change in exception list, change in return type, lost visibility, add final modifier, remove static modifier | | Field | remove, move, push down field, change in default value, change in type field, lost visibility, add final modifier |
Non-breaking Changes are modifications that do not break clients:
| Element | Non-breaking Changes (NBC) | | ------------- | ------------- | | Type | add, extract supertype, gain visibility, remove final modifier, add static modifier, add supertype, deprecated type| | Method | pull up, gain visibility, remove final modifier, add static modifier, deprecated method, add, extract| | Field | pull up, add, deprecated field, gain visibility, remove final modifier|
The refactorings catalog is reused from RefDiff.
Examples
- Detecting changes in version histories:
```java APIDiff diff = new APIDiff("bumptech/glide", "https://github.com/bumptech/glide.git"); diff.setPath("/home/projects/github");
Result result = diff.detectChangeAllHistory("master", Classifier.API); for(Change changeMethod : result.getChangeMethod()){ System.out.println("\n" + changeMethod.getCategory().getDisplayName() + " - " + changeMethod.getDescription()); } ``` * Detecting changes in specific commit:
```java APIDiff diff = new APIDiff("mockito/mockito", "https://github.com/mockito/mockito.git"); diff.setPath("/home/projects/github");
Result result = diff.detectChangeAtCommit("4ad5fdc14ca4b979155d10dcea0182c82380aefa", Classifier.API); for(Change changeMethod : result.getChangeMethod()){ System.out.println("\n" + changeMethod.getCategory().getDisplayName() + " - " + changeMethod.getDescription()); } ``` * Fetching new commits:
```java APIDiff diff = new APIDiff("bumptech/glide", "https://github.com/bumptech/glide.git"); diff.setPath("/home/projects/github");
Result result = diff.fetchAndDetectChange(Classifier.API); for(Change changeMethod : result.getChangeMethod()){ System.out.println("\n" + changeMethod.getCategory().getDisplayName() + " - " + changeMethod.getDescription()); } ```
- Writing a CSV file:
```java APIDiff diff = new APIDiff("mockito/mockito", "https://github.com/mockito/mockito.git"); diff.setPath("/home/projects/github"); Result result = diff.detectChangeAtCommit("4ad5fdc14ca4b979155d10dcea0182c82380aefa", Classifier.API);
List
- Filtering Packages according to their names:
```java Classifier.INTERNAL: Elements that are in packages with the term "internal".
Classifier.TEST: Elements that are in packages with the terms "test"|"tests", or is in source file "src/test", or ends with "test.java"|"tests.java".
Classifier.EXAMPLE: Elements that are in packages with the terms "example"|"examples"|"sample"|"samples"|"demo"|"demos"
Classifier.EXPERIMENTAL: Elements that are in packages with the term "experimental".
Classifier.NON_API: Internal, test, example or experimental elements.
Classifier.API: Elements that are not non-APIs. ```
Usage
APIDiff is available in the Maven Central Repository:
xml
<dependency>
<groupId>com.github.aserg-ufmg</groupId>
<artifactId>apidiff</artifactId>
<version>2.0.0</version>
</dependency>
Publications
Aline Brito, Laerte Xavier, Andre Hora, Marco Tulio Valente. APIDiff: Detecting API Breaking Changes. In 25th International Conference on Software Analysis, Evolution and Reengineering (SANER), Tool Track, pages 1-5, 2018.
Learn more about our research group at http://aserg.labsoft.dcc.ufmg.br/
Owner
- Name: Applied Software Engineering Research Group
- Login: aserg-ufmg
- Kind: organization
- Location: Belo Horizonte, Brazil
- Website: http://aserg.labsoft.dcc.ufmg.br
- Repositories: 32
- Profile: https://github.com/aserg-ufmg
Department of Computer Science, Federal University of Minas Gerais
GitHub Events
Total
- Issues event: 1
- Watch event: 3
Last Year
- Issues event: 1
- Watch event: 3
Committers
Last synced: 7 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Aline Brito | n****e@g****m | 173 |
| m-iriyam | 5****m | 1 |
| andrehora | a****a | 1 |
| Tasuku Nakagawa | 3****K | 1 |
| Nick Felker | f****r@g****m | 1 |
Committer Domains (Top 20 + Academic)
Issues and Pull Requests
Last synced: 7 months ago
All Time
- Total issues: 2
- Total pull requests: 9
- Average time to close issues: 23 days
- Average time to close pull requests: 4 days
- Total issue authors: 2
- Total pull request authors: 5
- Average comments per issue: 2.5
- Average comments per pull request: 0.33
- Merged pull requests: 8
- Bot issues: 0
- Bot pull requests: 1
Past Year
- Issues: 1
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 1
- Pull request authors: 0
- Average comments per issue: 0.0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- arakhia (1)
- safer-bot (1)
Pull Request Authors
- alinebrito (5)
- T45K (1)
- Fleker (1)
- dependabot[bot] (1)
- m-iriyam (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
- Total downloads: unknown
- Total dependent packages: 0
- Total dependent repositories: 1
- Total versions: 1
repo1.maven.org: com.github.aserg-ufmg:apidiff
A tool to identify API breaking and non-breaking changes between two versions of a Java library
- Homepage: https://github.com/aserg-ufmg/apidiff
- Documentation: https://appdoc.app/artifact/com.github.aserg-ufmg/apidiff/
- License: MIT License
-
Latest release: 2.0.0
published over 7 years ago
Rankings
Dependencies
- com.github.aserg-ufmg:refdiff-core 0.1.1
- com.jcabi:jcabi-github 0.29
- org.apache.maven.plugins:maven-compiler-plugin 3.6.1
- org.eclipse.birt.runtime:org.eclipse.core.jobs 3.6.1.v20141014-1248
- org.eclipse.birt.runtime:org.eclipse.core.resources 3.9.1.v20140825-1431
- org.eclipse.birt.runtime:org.eclipse.osgi 3.10.2.v20150203-1939
- org.eclipse.core:contenttype 3.4.200-v20140207-1251
- org.eclipse.core:runtime 3.10.0-v20140318-2214
- org.eclipse.equinox:common 3.6.200-v20130402-1505
- org.eclipse.equinox:preferences 3.5.200-v20140224-1527
- org.eclipse.jdt:org.eclipse.jdt.core 3.10.0
- org.eclipse.jgit:org.eclipse.jgit 4.6.0.201612231935-r
- org.slf4j:slf4j-api 1.7.5
- org.slf4j:slf4j-log4j12 1.7.5
- actions/checkout v2 composite
- rodrigo-brito/refactoring-aware-diff action composite