GithubHelp home page GithubHelp logo

Comments (2)

qw3ry avatar qw3ry commented on September 6, 2024

Can check a few values in the report, please:

  • Line 4 of the report should say something like #Clones: 8, as you imported 8 clones.
  • Around line 35, the recall for all functionalities is listed per clone type. It has the format <#detected> / <#total> = <recall>. Is it correct that both "#detected" and "recall" are 0 for all types?

from bigcloneeval.

stonecauldron avatar stonecauldron commented on September 6, 2024

Thank you for getting back to me.

Line 4 of the report does indeed say that 8 clones were successfully.

My problem comes from the fact that the recall in the report is equal to 0, despite some of the clones in sample/BinarySearch.java having been detected by my tool.

For example, the pair below was classified as a clone by my tool:

sample,BinarySearch.java,6,16,sample,BinarySearch.java,19,29

In code this pair corresponds to these two BinarySearch functions which are indeed clones:

public static int binarySearch1(int arr[], int key, int imin, int imax) {
		//Implementation: Recursive, primitive type
		if(imax < imin)
			return -1;
		int imid = (imin+imax)/2;
		if(arr[imid] > key)
			return binarySearch1(arr,key,imin,imid-1);
		else if (arr[imid] < key)
			return binarySearch1(arr,key,imid+1,imax);
		else
			return imid;

public static <T extends Comparable<T>> int binarySearch3(T[] arr, T key, int imin, int imax) {
		//Implementation: Recursive, comparable type
		if(imax < imin)
			return -1;
		int imid = (imin+imax)/2;
		if(arr[imid].compareTo(key) > 0)
			return binarySearch3(arr,key,imin,imid-1);
		else if (arr[imid].compareTo(key) < 0)
			return binarySearch3(arr,key,imid+1,imax);
		else
			return imid;
	}

from bigcloneeval.

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.