Latent Semantic Indexing

Latent Semantic Indexing(LSI) is a common technique in natural language processing area. This article is about how LSI works by comparing the pure key-word-based search. What is LSI? Latent Semantic Indexing (LSI) is an indexing and retrieval method that uses a mathematical technique called Singular value decomposition (SVD) to identify patterns in the relationships between … Read more

Count Number of Statements in a Java Method By Using Eclipse JDT ASTParser

This tutorial belongs to Eclipse JDT Tutorial Series.

Given a method, we may want a count of the number of statements in the method (for ex: to gauge the complexity of the method). We can use eclipse JDT ASTParser to get this job done.

One approximate way to count the number of statements in a method is to count the number of lines ending with the semi-colon along with lines that contain the words “if/for/while/”.

Read more

Research in Software Engineering- Bug Report

Bug reports are artifacts that track the defects of software systems. In software maintenance research area, there has been a bunch of research work addressing problem of bug reports in recent years.

Bugzilla is one of the most popular bug reporting system. For the sake of its popularity and open-source feature, the data for research are largely provided by Bugzilla.

The diagram below shows the major categories of work in this area. The left-bottom corner is a sample bug report from Bugzilla.

Read more

OSGi Framework Architecture – Three Conceptual Layers

The OSGi(Open Services Gateway initiative) framework provides a dynamic modular architecture which has been used in many applications such as Eclipse Equinox, Apache Felix, etc. Understanding how OSGi framework works is useful for developing Eclipse plugins and many other molecularity applications. In this article, the high-level overview of the architecture is explained. OSGi framework architecture … Read more

Software Engineering Research Topics – Diagram of General Perspective

Diagram is (Sometimes) Worth Ten Thousand Words. During my research starting stage, I’m trying to get myself better understanding of state-of-the-art in software engineering area. The diagram below is first one of this series. It contains the basic research topics in software maintenance/evolution area of software engineering. To better understand on each small topic on … Read more

Java equals() and hashCode() Contract

The Java super class java.lang.Object defines two important methods: public boolean equals(Object obj) public int hashCode()public boolean equals(Object obj) public int hashCode() In this post, I will first show an example of a common mistake, and then explain how the equals() and hashCode() contract works. 1. A common mistake The common mistake is shown in … Read more

Java Design Pattern: Singleton

Singleton pattern is one of the most commonly used patterns in Java. It is used to control the number of objects created by preventing external instantiation and modification. This concept can be generalized to systems that operate more efficiently when only one object exists, or that restrict the instantiation to a certain number of objects, … Read more

Research in Software Engineering – Code Assistant/Recommendation

Here are some research about code assistant conducted in software engineering research area. Those topics are pretty common, and a lot of people have developed various kinds of tools. 1. Mining Subclassing Directives to improve Framework Reuse. Idea: reverse engineer from application-specific code, how-to-use documentation of a particular software artifact can be inferred from how … Read more

How to Build Your Own Java library?

Code reuse is one of the most important factors in software development. It is a VERY good idea to put frequently-used functions together and build a library for yourself. Whenever some method is used, just simply make a method invocation. For Java, it’s straightforward to manage such a library. Here a simple example in Eclipse. The library will contain only one “add” method for demo purpose.

Step 1: Create a “Java Project” named as “MyMath”, and a simple “add” method under “Simple” class.

Package structure is as follows:

Read more

Enable lightbox effect for WordPress NextGen Gallery Plugin

The Lightbox effect in NextGen Gallery is actually not working. To enable lightbox effect, there is another plugin which works for NextGen Gallery – slimbox. Just search “slimbox”, and enable this plugin. Then enable lightbox effect for under NextGen Gallery options->effects. Also to use lighbox, it’s a good idea to resize image to 800*600 by … Read more