<commit_before># Java Object Diff

An easy-to-use Framework to find and handle differences between Java objects.

## Getting Started

To learn how to use **Java Object Diff**, please have a look at the short [starter guide](https://github.com/SQiShER/java-object-diff/wiki/Getting-Started).

## Use Cases

**Java Object Diff** is currently used to…

* Generate Facebook-like activity streams
* Visualize the differences between two object versions
* Automatically resolve conflicts on concurrent database writes
* Detect and persist only properties that actually changed

Even though none one of the above solutions comes out-of-the-box, this framework made them very easy to realize.

## Feature List

* Generates a graph of your object, allowing you to build powerful visitors to extract and modify exactly what you want.
* Works with every kind of object, even those you can't modify.
* Can be configured entirely from the outside. No annotations needed. (Although they exist and make it much more convenient.)
* Properties can be grouped into categories, to easily compare or merge specific groups of properties.

## Note

Although I successfully use this framework in a rather complex project for quite a while now, I'm sure there are still many
edge cases, that I didn't even think about. Fortunately, the simple API makes it easy for you, to test it on your own set of
objects, to see if it works for you.

## Ways to Improve

* Performence has not been a hight priority so far, so there is still some room for improvement.
* Object comparison is very strict. Objects with different types cannot be compared, even when they share the same interface.
* It should be possible to apply the annotations to fields and not only to methods, to allow for some advanced merging techniques.
* It would be great to integrate a text-based diff algorithm for regular Strings.
* Documentation, documentation, documentation...

## Known Issues and

* Array handling is not implemented properly yet.
* Map keys are currently not compared via introspection and only used to identify map values.<commit_msg>Switched to Apache License 2.0<commit_after># Java Object Diff

An easy-to-use Framework to find and handle differences between Java objects.

## Getting Started

To learn how to use **Java Object Diff**, please have a look at the short [starter guide](https://github.com/SQiShER/java-object-diff/wiki/Getting-Started).

## Use Cases

**Java Object Diff** is currently used to...

* Generate Facebook-like activity streams
* Visualize the differences between two object versions
* Automatically resolve conflicts on concurrent database writes
* Detect and persist only properties that actually changed

Even though none one of the above solutions comes out-of-the-box, this framework made them very easy to realize.

## Feature List

* Generates a graph of your object, allowing you to build powerful visitors to extract and modify exactly what you want.
* Works with every kind of object, even those you can't modify.
* Can be configured entirely from the outside. No annotations needed. (Although they exist and make it much more convenient.)
* Properties can be grouped into categories, to easily compare or merge specific groups of properties.

## Note

Although I successfully use this framework in a rather complex project for quite a while now, I'm sure there are still many
edge cases, that I didn't even think about. Fortunately, the simple API makes it easy for you, to test it on your own set of
objects, to see if it works for you.

## Ways to Improve

* Performance has not been a hight priority so far, so there is still some room for improvement.
* Object comparison is very strict. Objects with different types cannot be compared, even when they share the same interface.
* It should be possible to apply the annotations to fields and not only to methods, to allow for some advanced merging techniques.
* It would be great to integrate a text-based diff algorithm for regular Strings.
* Some out-out-of-the-box Mergers would be nice (e.g. `LeftToRightMerger`, `NonConflictingMerger`, etc.)
* Could use more documentation and tests.

## Known Issues and

* Array handling is not implemented properly yet.
* Map keys are currently not compared via introspection and only used to identify map values.
{'fraction_non_alphanumeric': 0.05128800185657925, 'fraction_numerical': 0.0004641448131817127, 'mean_word_length': 4.401002506265664, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1905551', 'n_tokens_mistral': 1039, 'n_tokens_neox': 996, 'n_words': 642}