Giter Club home page Giter Club logo

Comments (5)

pauloborba avatar pauloborba commented on August 22, 2024

@jvcoutinho it seems like we lost the filter that tries to match only elements of the same type. is that right @jvcoutinho?

from jfstmerge.

guilhermejccavalcanti avatar guilhermejccavalcanti commented on August 22, 2024

@jvcoutinho it seems like we lost the filter that tries to match only elements of the same type. is that right @jvcoutinho?

superimposition is matching properly (same name, same type), this is a issue only for the handler.

from jfstmerge.

jvcoutinho avatar jvcoutinho commented on August 22, 2024

That's weird, it's never happened to me. There are actually some filters in later steps, for example:
https://github.com/guilhermejccavalcanti/jFSTMerge/blob/b0f553b03e1c9eb6eb345af0754bf0526c81c860/src/main/java/br/ufpe/cin/mergers/handlers/MethodAndConstructorRenamingAndDeletionHandler.java#L178-L186

But this only constrains terminals to match methods, so I agree with you we could increase the robustness.
But since this method is the same as the one in #134, I suppose the problem is the same: the body ";" was marked as substring of the import statement's body. If it's body was empty (as it should be), this shouldn't be a problem.

from jfstmerge.

pauloborba avatar pauloborba commented on August 22, 2024

@jvcoutinho where should we add the check for trying to match only elements of the same type?

your second comment reinforces the need for improving the substring matching algorithm, right?

from jfstmerge.

guilhermejccavalcanti avatar guilhermejccavalcanti commented on August 22, 2024

That's weird, it's never happened to me. There are actually some filters in later steps, for example:

https://github.com/guilhermejccavalcanti/jFSTMerge/blob/b0f553b03e1c9eb6eb345af0754bf0526c81c860/src/main/java/br/ufpe/cin/mergers/handlers/MethodAndConstructorRenamingAndDeletionHandler.java#L178-L186

But this only constrains terminals to match methods, so I agree with you we could increase the robustness.
But since this method is the same as the one in #134, I suppose the problem is the same: the body ";" was marked as substring of the import statement's body. If it's body was empty (as it should be), this shouldn't be a problem.

@jvcoutinho the filter you mentioned only checks the left and right trees, as you can see below(the import came from the base, which is not filtered):

image

from jfstmerge.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.