https://github.com/aserg-ufmg/apidiff

A tool to identify breaking and non-breaking changes between two versions of a Java library

https://github.com/aserg-ufmg/apidiff

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

api breaking-change hacktoberfest non-breaking-change tool
Last synced: 5 months ago · JSON representation

Repository

A tool to identify breaking and non-breaking changes between two versions of a Java library

Basic Info
  • Host: GitHub
  • Owner: aserg-ufmg
  • License: mit
  • Language: Java
  • Default Branch: master
  • Homepage:
  • Size: 496 KB
Statistics
  • Stars: 55
  • Watchers: 6
  • Forks: 19
  • Open Issues: 1
  • Releases: 1
Topics
api breaking-change hacktoberfest non-breaking-change tool
Created about 9 years ago · Last pushed over 2 years ago
Metadata Files
Readme License

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 listChanges = new ArrayList(); listChanges.add("Category;isDeprecated;containsJavadoc"); for(Change changeMethod : result.getChangeMethod()){ String change = changeMethod.getCategory().getDisplayName() + ";" + changeMethod.isDeprecated() + ";" + changeMethod.containsJavadoc() ; listChanges.add(change); } UtilFile.writeFile("output.csv", listChanges); ```

  • 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

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

All Time
  • Total Commits: 177
  • Total Committers: 5
  • Avg Commits per committer: 35.4
  • Development Distribution Score (DDS): 0.023
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email 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
dependencies (1)

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

  • Versions: 1
  • Dependent Packages: 0
  • Dependent Repositories: 1
Rankings
Dependent repos count: 20.8%
Stargazers count: 32.4%
Forks count: 32.7%
Average: 34.0%
Dependent packages count: 50.1%
Last synced: 6 months ago

Dependencies

pom.xml maven
  • 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
.github/workflows/workflow.yml actions
  • actions/checkout v2 composite
  • rodrigo-brito/refactoring-aware-diff action composite