Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
23 changes: 8 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -225,30 +225,27 @@ The script basically works for the multiple versions of bug repository and each
### Install Java
All previous techniques are executed in Java Runtime Environment. If you have java in your computer, please skip this section.

> $ sudo apt-get install python-software-properties <br />
> $ sudo add-apt-repository ppa:webupd8team/java <br />
> $ sudo apt-get update <br />
> $ sudo apt-get install openjdk-8-jre-headless <br />
> $ sudo apt install openjdk-11-jre-headless <br />

### Install indri
- To execute BLUiR and AmaLgam, you need to install indri.
- Since there are compile problems, we chose indri-5.6 version.
- indri-5.15 can work.
- In the installing process, please memorize the path in the first line in the "make install" log. <br />
(In my case, /usr/local/bin. This is the installed path of indri)
- And then, Change Settings.txt file.
- Commands to install indri
> // Install g++ and make for indri <br />
> $ sudo add-apt-repository ppa:ubuntu-toolchain-r/test <br />
> $ sudo apt-get update <br />
> $ sudo apt-get install g++ <br />
> $ sudo apt-get install gcc-6 g++-6 <br />
> $ sudo apt-get install make <br />
> $ sudo apt-get install --reinstall zlibc zlib1g zlib1g-dev <br />
> <br />
> // download and install indri (If you faced an error in the compiling, please try with another version.)<br />
> $ wget https://downloads.sourceforge.net/project/lemur/lemur/indri-5.6/indri-5.6.tar.gz <br />
> $ tar -xzf indri-5.6.tar.gz <br />
> $ cd indri-5.6 <br />
> $ ./configure <br />
> $ wget https://downloads.sourceforge.net/project/lemur/files/lemur/indri-5.15/indri-5.15.tar.gz <br />
> $ tar -xzf indri-5.15.tar.gz <br />
> $ cd indri-5.15 <br />
> $ ./configure CC=gcc-6 CXX=g++-6<br />
> $ make <br />
> $ sudo make install <br />
> /usr/bin/install -c -m 755 -d /usr/local/bin <br />
Expand Down Expand Up @@ -299,11 +296,7 @@ So, If you want to load these techniques on Eclipse, please follow next sequence
- Make a 'techniques' folder into workplace of Eclipse. Then .metadata folder will be created in 'techniques' folder.
- On the 'Package Explorer' panel, Open context menu by clicking right mouse button.
- Select 'Import', Then a pop-up windows will be placed.
- Except BLUiR project, choose 'General > Projects from Folder or Archive' item and click 'Next' button.
- Designate project folder in 'techniques' and click 'Finish' button.
- Then, the project will be loaded and be shown in the Package Explorer.
- BLUiR is made as Maven project. So, You should import with 'Maven > Existing Maven Project'. And then, just choose project folder. You don't need to change any other options.
- Especially BLIA project, need to add library JUnit.
- All techniques are made as Maven project. So, You should import with 'Maven > Existing Maven Project'. And then, just choose project folder. You don't need to change any other options.



9 changes: 0 additions & 9 deletions techniques/AmaLgam/.classpath

This file was deleted.

17 changes: 0 additions & 17 deletions techniques/AmaLgam/.project

This file was deleted.

Binary file removed techniques/AmaLgam/bin/org/amalgam/AmaLgam.class
Binary file not shown.
Binary file removed techniques/AmaLgam/bin/org/amalgam/Core.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed techniques/AmaLgam/bin/org/amalgam/common/Weights.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed techniques/AmaLgam/bin/org/amalgam/models/Bug.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed techniques/AmaLgam/libs/commons-io-2.5.jar
Binary file not shown.
Binary file removed techniques/AmaLgam/libs/commons-math3-3.6.1.jar
Binary file not shown.
Binary file removed techniques/AmaLgam/libs/hjson-1.1.0.jar
Binary file not shown.
51 changes: 51 additions & 0 deletions techniques/AmaLgam/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>AmaLgam</groupId>
<artifactId>AmaLgam</artifactId>
<version>0.0.1-SNAPSHOT</version>
<build>
<sourceDirectory>src</sourceDirectory>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<release>11</release>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<version>3.1.1</version>
<configuration>
<finalName>AmaLgam</finalName>
<appendAssemblyId>false</appendAssemblyId>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
<archive>
<manifest>
<mainClass>org.amalgam.AmaLgam</mainClass>
</manifest>
</archive>
</configuration>
<executions>
<execution>
<id>make-assembly</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>
<version>2.6</version>
</dependency>
</dependencies>
</project>
54 changes: 27 additions & 27 deletions techniques/AmaLgam/src/org/amalgam/analysis/CodeRepository.java
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ public class CodeRepository {
public static ArrayList<CommitItem> commits = null;

/**
* ������
* ������
*/
public CodeRepository(){}

/**
* git repository�κ��� commit���� �ε�.
* git repository�κ��� commit���� �ε�.
*/
public boolean loadCommits(){

Expand Down Expand Up @@ -63,7 +63,7 @@ public boolean loadCommits(){
}

/**
* ������ �α������� �Ľ�
* ������ �α������� �Ľ�
* @param logFilePath
* @return
*/
Expand Down Expand Up @@ -103,7 +103,7 @@ public boolean parseGitLogFile(String logFilePath)


/**
* commit log ���Ϸ� ���� �� ���� commit item�� �о��.
* commit log ���Ϸ� ���� �� ���� commit item�� �о��.
* @param reader
* @param repo_path
* @return
Expand All @@ -124,10 +124,10 @@ private CommitItem getOneCommitLog(BufferedReader reader) throws IOException, Pa
break;
}

//����ó��
//����ó��
line = line.trim();
if (line.equals("")) continue; //������ ��� ������������.
if (line.compareTo(commit_split)==0) break; //�и��� ó�� (�����ϸ� �������� �Ѿ)
if (line.equals("")) continue; //������ ��� ������������.
if (line.compareTo(commit_split)==0) break; //�и��� ó�� (�����ϸ� �������� �Ѿ)


// get commit date
Expand Down Expand Up @@ -162,20 +162,20 @@ private CommitItem getOneCommitLog(BufferedReader reader) throws IOException, Pa
}
}

//���� ���� üũ.
//���� ���� üũ.
if (endFlag==true && item.hash == "") return null;

//���װ� �ƴ� ��쿡 �����ϵ��� ��.
//���װ� �ƴ� ��쿡 �����ϵ��� ��.
if (!isBug(item.comment)) item.hash = "";

return item;
}


/**
* �Էµ� comment�� bug������ ���� comment���� Ȯ��
* @param comment : �Է� comment
* @param regex : ���׸� �Ǵ��� ���Խ�.
* �Էµ� comment�� bug������ ���� comment���� Ȯ��
* @param comment : �Է� comment
* @param regex : ���׸� �Ǵ��� ���Խ�.
* @return
*/
private boolean isBug(String comment) {
Expand All @@ -188,9 +188,9 @@ private boolean isBug(String comment) {


/**
* �Էµ� ������ FullClassName����
* ���� ���� ������ packageName + FileName���� ����
* (���Ͽ� �Ѱ��� Ŭ������ �־�� �ǰٴµ�....)
* �Էµ� ������ FullClassName����
* ���� ���� ������ packageName + FileName���� ����
* (���Ͽ� �Ѱ��� Ŭ������ �־�� �ǰٴµ�....)
* Deprecated
* @param path
* @return
Expand Down Expand Up @@ -229,10 +229,10 @@ private static String getFullClassName(String path) {


/**
* ������ git �α� ���Ͽ��� ������ �����Ͽ�
* �� ���� Ŭ���� ���� ������ ��¥ ���� ����
* (�Ѱ��� logs���Ͽ� ���ؼ� ó�������ϵ��� ����. by Zeck)
* @param logFilePath �ε��� �����͸� ��� �ִ� �α�����
* ������ git �α� ���Ͽ��� ������ �����Ͽ�
* �� ���� Ŭ���� ���� ������ ��¥ ���� ����
* (�Ѱ��� logs���Ͽ� ���ؼ� ó�������ϵ��� ����. by Zeck)
* @param logFilePath �ε��� �����͸� ��� �ִ� �α�����
* @param bugs
* @return
* @throws IOException
Expand All @@ -252,7 +252,7 @@ public HashMap<Integer, HashSet<CommitItem>> loadFileCommitHistory() {
fullClassName = Utils.getUniqueClassName(item.files.get(j));
int fid = FileObjs.put(fullClassName);

if (!fileHistories.containsKey(fullClassName)) {
if (!fileHistories.containsKey(fid)) {
HashSet<CommitItem> histories = new HashSet<CommitItem>();
histories.add(item);

Expand All @@ -266,7 +266,7 @@ public HashMap<Integer, HashSet<CommitItem>> loadFileCommitHistory() {
}

/**
* Log������� commit Date ������ ����. (Hash, Date)
* Log������� commit Date ������ ����. (Hash, Date)
* @return
*/
public HashMap<String, Date> getCommitDates() {
Expand All @@ -278,23 +278,23 @@ public HashMap<String, Date> getCommitDates() {
}

/**
* commit log ������ �м��Ͽ� bugObjs�� commit date�� �Է�
* @param bugObjs : ��� bugs
* commit log ������ �м��Ͽ� bugObjs�� commit date�� �Է�
* @param bugObjs : ��� bugs
*/
public void getCommitDateOfBugObj(HashMap<String, Bug> bugObjs)
{
// ��� Ŀ�Կ� ���ؼ�
// ��� Ŀ�Կ� ���ؼ�
for (CommitItem item : commits)
{
// check if message contain the bugid
int count = 0;
int curIndex = 10000;
String currentBugid = null;

//��� ���׵��� ������� Ȯ��. (comment ������ bugID�� ���ԵǾ��ִ��� Ȯ��)
for (Bug bug : bugObjs.values()) //���׾��̵���� �������
//��� ���׵��� ������� Ȯ��. (comment ������ bugID�� ���ԵǾ��ִ��� Ȯ��)
for (Bug bug : bugObjs.values()) //���׾��̵���� �������
{
//�� Ŀ�Կ� ���� ���� ���̵� �����ϴ� ���, ���� �տ� ������ ���� ���̵� Ŀ���� ���׾��̵�� ����
//�� Ŀ�Կ� ���� ���� ���̵� �����ϴ� ���, ���� �տ� ������ ���� ���̵� Ŀ���� ���׾��̵�� ����
if (item.comment.contains(bug.ID + " ")) {
int index = item.comment.indexOf(bug.ID);
if (index < curIndex) {
Expand Down
26 changes: 0 additions & 26 deletions techniques/BLIA/.classpath

This file was deleted.

17 changes: 0 additions & 17 deletions techniques/BLIA/.project

This file was deleted.

1 change: 0 additions & 1 deletion techniques/BLIA/bin/edu/skku/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion techniques/BLIA/bin/edu/skku/selab/.gitignore

This file was deleted.

1 change: 0 additions & 1 deletion techniques/BLIA/bin/edu/skku/selab/blp/.gitignore

This file was deleted.

Binary file removed techniques/BLIA/bin/edu/skku/selab/blp/BLP.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed techniques/BLIA/bin/edu/skku/selab/blp/utils/Stem.class
Binary file not shown.
Binary file not shown.
Binary file removed techniques/BLIA/bin/edu/skku/selab/blp/utils/Util.class
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed techniques/BLIA/lib/args4j-2.0.6.jar
Binary file not shown.
Binary file removed techniques/BLIA/lib/commons-lang3-3.3.2.jar
Binary file not shown.
Binary file removed techniques/BLIA/lib/contenttype-3.2.0-v20060603.jar
Binary file not shown.
Binary file removed techniques/BLIA/lib/dom4j-1.6.1.jar
Binary file not shown.
Binary file removed techniques/BLIA/lib/h2-1.4.184.jar
Binary file not shown.
Binary file removed techniques/BLIA/lib/lucene-core-2.9.4.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading