Open

Java project using JDT. Analyse the Java source and find how many times a method is called

This project is ending in 3 days and has an average bid price of R1124 ZAR.

Get free quotes for a project like this
Employer working
Project Budget
R210 - R1750 ZAR
Total Bids
13
Project Description

You must have experience in Java, Eclipse, JDT

The project needs to be done in 4 hours. If you don't know JDT you won't be able to finish it in time

Budget is $20. No more. If you bid more you will be ignored

You will be paid a few days after submission. If you can't agree, don't bid

Method Call Counter (Java assignment help)

analyse Java source code so that you can count all the method calls in

[url removed, login to view] ([url removed, login to view]) (Java Development Kit). This zip file contains 7471 java files, 371k lines of code. Among all these java files,

for each class, count the method calls it received;

for each method, count the number of times this method is called;

For instance, when you see the following statement,

[url removed, login to view]();

The String class receives one more method call, and the toUpperCase() method is used one more time. The object 'aString' can be of any name, and you should not count the occurrence of variable names. You need to utilize the parsing result to infer that it is of type String. To avoid name conflict, you should use the complete package path in your program and in your report. For example, String should be written as "[url removed, login to view]", toUpperCase should be "[url removed, login to view]()".

Method

You need to parse the source code so that you can extract the relevant information. You can choose one of the existing Java parsers. One choice is

[url removed, login to view] JDTthat can generate an AST (abstract syntax tree). It won't suffice to manipilate the source code directly using tools such as regular expression. One reason is that there are commnets, which can be very complex and can contain code snippets. In addition, there are a few other cases you need to consider:

String[] toppings = {"cheese", "pepperoni", "black olives"};

int arrayLength = [url removed, login to view];

In the above example, length is an atrtibute instead of a method. So we will not count that as a method call.

String toppings = "cheese, pepperoni, black olives";

String[] tokens= [url removed, login to view]().split(",");

In the above example, toppings, i.e., the String class, received one method call. [url removed, login to view](), which is also a String, received another method call.

Submit one zipped file that contains the following files:

One pdf file of one page length, describing briefly the method you used, the challenges you encounter, and a table that lists the top 20 classes and top 20 methods. Use the following format to list these classes and methods.

class1 classcount1; method1 methodcount1

class2 classcount2; method2 methodcount2

...

class20 classcount20; method20 methodcount20

To partially verify your result, note that the most frequently used class is the String class. One thing you need to take care of is polymorphic methods. Please treat each polymorhic method as a distinct one (our preferred solution). For instance, there are many append methods, the counting of each append method in StringBuffer are given below.

[url removed, login to view](String) <> 1480

[url removed, login to view](char) <> 705

[url removed, login to view](int) <> 112

[url removed, login to view](Object) <> 38

[url removed, login to view](char[]intint) <> 32

[url removed, login to view](StringBuffer) <> 8

[url removed, login to view](long) <> 3

[url removed, login to view](char[]) <> 3

[url removed, login to view](float) <> 3

[url removed, login to view](CharSequenceintint) <> 3

[url removed, login to view](CharSequence) <> 2

[url removed, login to view](double) <> 1

[url removed, login to view](boolean) <> 1

Your source code. You can use a programming language of your choice, but the source code to be analysed is JDK, which is in Java. We will check code similarity, and plagiarism will not be tolerated.

Looking to make some money?

  • Set your budget and the timeframe
  • Outline your proposal
  • Get paid for your work

Hire Freelancers who also bid on this project

    • Forbes
    • The New York Times
    • Time
    • Wall Street Journal
    • Times Online