Coder Social home page Coder Social logo

pp1-dp's Introduction

PP1-DP

pp1-dp's People

Contributors

lifove avatar hguisel avatar

pp1-dp's Issues

Task4(5) find a best cutoff. as 80

public void testCLAMIWithApacheProjectToFindBestCutoffForPrecision() {

	// TASK5 TODO Use this method to find the best cutoff
	
	String bestCutoff = "80g";
	
	String[] args = {"-f","data/Apache.arff","-l","isDefective","-p", "TRUE", "-m", "-c", bestCutoff};

	CLAMI.main(args);
}

@Test
public void testCLAMIWithApacheProjectToFindBestCutoffForFmeasure() {
	
	// TASK6 TODO Use this method to find the best cutoff for f-measure
	
	String bestCutoff = "80";
	
	String[] args = {"-f","data/Apache.arff","-l","isDefective","-p", "TRUE", "-m", "-c", bestCutoff};

	CLAMI.main(args);
}

Task3 by using clami, analysis the arff

public void testCLAMIWithYourSelectedProject() {
	
	// TASK3: Conduct defect prediction by using CLAMI models
	// complete this test case for the generated arff files from Task 2
	
	String[] args = {"-f","data/PP1-DP.arff","-l","label","-p", "buggy", "-m"};
	
	CLAMI.main(args);
}

Task1 complete three method

private int computeNumOfMethodInvocations(JavaASTParser codeAST) {
	// TASK1 TODO codeAST에서 매소드 호출된 개수를 가져온다.
	return codeAST.getMethodInvocations().size();
}

private int computeNumOfForLoops(JavaASTParser codeAST) {
	// TASK1 TODO codeAST에서 for loop의 개수를 가져온다.
	return codeAST.getForStatements().size();
}

private int computeNumOfIfStatements(JavaASTParser codeAST) {
	// TASK1 TODO codeAST에서 if문의 개수를 가져온다.
	return codeAST.getIfStatements().size();
}

Task2 make a arff file.

public void testForTasks2() {
	// TASK2 TODO GitHub에서 작은 규모의 자바 프로젝트를 2개를 찾아, arff파일을 생성하시오. 파일이름은 [project이름].arff data디렉터리에 저장되게 하고
	// 생성이 된 후 commit/push해야 함.
	// 위 test main을 참고하여 실행하면 됨.
	String[] args = {"/Users/minseok/dropbox/project1/bigdata/Java", "data/Java.arff"}; // for mac users
	
	assertEquals(args.length,2);
	
	
	Main.main(args);
}

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.