Skip to content

Commit 5b21317

Browse files
hanjuhuihanjuhui
hanjuhui
authored and
hanjuhui
committedAug 16, 2020
#28 refactoring main
1 parent f14e8b0 commit 5b21317

File tree

14 files changed

+279
-162
lines changed

14 files changed

+279
-162
lines changed
 
Binary file not shown.
+2-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
#Fri Jan 31 10:47:52 KST 2020
2-
gradle.version=6.1.1
1+
#Wed Aug 12 12:32:48 KST 2020
2+
gradle.version=6.5.1
-36 Bytes
Binary file not shown.

‎build/scripts/BugPatchCollector

+3-1
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ case "`uname`" in
8080
;;
8181
esac
8282

83-
CLASSPATH=$APP_HOME/lib/BugPatchCollector.jar:$APP_HOME/lib/commons-math3-3.6.1.jar:$APP_HOME/lib/gen.jdt-2.1.0.jar:$APP_HOME/lib/client-2.1.0.jar:$APP_HOME/lib/commons-csv-1.5.jar:$APP_HOME/lib/jsoup-1.11.3.jar:$APP_HOME/lib/super-csv-2.4.0.jar:$APP_HOME/lib/org.eclipse.jgit-5.6.0.201912101111-r.jar:$APP_HOME/lib/slf4j-api-1.7.25.jar:$APP_HOME/lib/commons-cli-1.4.jar:$APP_HOME/lib/commons-io-2.5.jar:$APP_HOME/lib/weka-dev-3.9.3.jar:$APP_HOME/lib/org.eclipse.jdt.core-3.16.0.jar:$APP_HOME/lib/commons-lang3-3.9.jar:$APP_HOME/lib/commons-collections4-4.4.jar:$APP_HOME/lib/reflections-0.9.11.jar:$APP_HOME/lib/core-2.1.0.jar:$APP_HOME/lib/simmetrics-core-3.2.3.jar:$APP_HOME/lib/guava-26.0-jre.jar:$APP_HOME/lib/jsch-0.1.55.jar:$APP_HOME/lib/jzlib-1.1.1.jar:$APP_HOME/lib/JavaEWAH-1.1.6.jar:$APP_HOME/lib/bcpg-jdk15on-1.64.jar:$APP_HOME/lib/bcpkix-jdk15on-1.64.jar:$APP_HOME/lib/bcprov-jdk15on-1.64.jar:$APP_HOME/lib/java-cup-11b-2015.03.26.jar:$APP_HOME/lib/java-cup-11b-runtime-2015.03.26.jar:$APP_HOME/lib/bounce-0.18.jar:$APP_HOME/lib/mtj-1.0.4.jar:$APP_HOME/lib/all-1.1.2.pom:$APP_HOME/lib/netlib-java-1.1.jar:$APP_HOME/lib/netlib-native_ref-osx-x86_64-1.1-natives.jar:$APP_HOME/lib/netlib-native_ref-linux-x86_64-1.1-natives.jar:$APP_HOME/lib/netlib-native_ref-linux-i686-1.1-natives.jar:$APP_HOME/lib/netlib-native_ref-win-x86_64-1.1-natives.jar:$APP_HOME/lib/netlib-native_ref-win-i686-1.1-natives.jar:$APP_HOME/lib/netlib-native_ref-linux-armhf-1.1-natives.jar:$APP_HOME/lib/native_ref-java-1.1.jar:$APP_HOME/lib/netlib-native_system-osx-x86_64-1.1-natives.jar:$APP_HOME/lib/netlib-native_system-linux-x86_64-1.1-natives.jar:$APP_HOME/lib/netlib-native_system-linux-i686-1.1-natives.jar:$APP_HOME/lib/netlib-native_system-linux-armhf-1.1-natives.jar:$APP_HOME/lib/netlib-native_system-win-x86_64-1.1-natives.jar:$APP_HOME/lib/netlib-native_system-win-i686-1.1-natives.jar:$APP_HOME/lib/native_system-java-1.1.jar:$APP_HOME/lib/core-1.1.2.jar:$APP_HOME/lib/arpack_combined_all-0.1.jar:$APP_HOME/lib/org.eclipse.core.resources-3.13.600.jar:$APP_HOME/lib/org.eclipse.text-3.10.0.jar:$APP_HOME/lib/org.eclipse.core.expressions-3.6.600.jar:$APP_HOME/lib/org.eclipse.core.runtime-3.17.0.jar:$APP_HOME/lib/org.eclipse.core.filesystem-1.7.600.jar:$APP_HOME/lib/jsr305-3.0.2.jar:$APP_HOME/lib/checker-qual-2.5.2.jar:$APP_HOME/lib/error_prone_annotations-2.1.3.jar:$APP_HOME/lib/j2objc-annotations-1.1.jar:$APP_HOME/lib/animal-sniffer-annotations-1.14.jar:$APP_HOME/lib/trove4j-3.0.3.jar:$APP_HOME/lib/gson-2.8.2.jar:$APP_HOME/lib/jgrapht-core-1.0.1.jar:$APP_HOME/lib/javassist-3.21.0-GA.jar:$APP_HOME/lib/org.eclipse.osgi-3.15.100.jar:$APP_HOME/lib/org.eclipse.core.jobs-3.10.600.jar:$APP_HOME/lib/org.eclipse.core.contenttype-3.7.500.jar:$APP_HOME/lib/org.eclipse.equinox.app-1.4.300.jar:$APP_HOME/lib/org.eclipse.equinox.registry-3.8.600.jar:$APP_HOME/lib/org.eclipse.equinox.preferences-3.7.600.jar:$APP_HOME/lib/org.eclipse.core.commands-3.9.600.jar:$APP_HOME/lib/org.eclipse.equinox.common-3.10.600.jar:$APP_HOME/lib/commons-codec-1.10.jar:$APP_HOME/lib/jniloader-1.1.jar
83+
CLASSPATH=$APP_HOME/lib/BugPatchCollector.jar:$APP_HOME/lib/commons-math3-3.6.1.jar:$APP_HOME/lib/gen.jdt-2.1.0.jar:$APP_HOME/lib/client-2.1.0.jar:$APP_HOME/lib/commons-csv-1.5.jar:$APP_HOME/lib/jsoup-1.11.3.jar:$APP_HOME/lib/super-csv-2.4.0.jar:$APP_HOME/lib/org.eclipse.jgit-5.6.0.201912101111-r.jar:$APP_HOME/lib/slf4j-api-1.7.25.jar:$APP_HOME/lib/commons-cli-1.4.jar:$APP_HOME/lib/commons-io-2.5.jar:$APP_HOME/lib/weka-dev-3.9.3.jar:$APP_HOME/lib/org.eclipse.jdt.core-3.16.0.jar:$APP_HOME/lib/commons-lang3-3.9.jar:$APP_HOME/lib/commons-collections4-4.4.jar:$APP_HOME/lib/reflections-0.9.11.jar:$APP_HOME/lib/core-2.1.0.jar:$APP_HOME/lib/simmetrics-core-3.2.3.jar:$APP_HOME/lib/guava-26.0-jre.jar:$APP_HOME/lib/jsch-0.1.55.jar:$APP_HOME/lib/jzlib-1.1.1.jar:$APP_HOME/lib/JavaEWAH-1.1.6.jar:$APP_HOME/lib/bcpg-jdk15on-1.64.jar:$APP_HOME/lib/bcpkix-jdk15on-1.64.jar:$APP_HOME/lib/bcprov-jdk15on-1.64.jar:$APP_HOME/lib/java-cup-11b-2015.03.26.jar:$APP_HOME/lib/java-cup-11b-runtime-2015.03.26.jar:$APP_HOME/lib/bounce-0.18.jar:$APP_HOME/lib/mtj-1.0.4.jar:$APP_HOME/lib/all-1.1.2.pom:$APP_HOME/lib/netlib-java-1.1.jar:$APP_HOME/lib/netlib-native_ref-osx-x86_64-1.1-natives.jar:$APP_HOME/lib/netlib-native_ref-linux-x86_64-1.1-natives.jar:$APP_HOME/lib/netlib-native_ref-linux-i686-1.1-natives.jar:$APP_HOME/lib/netlib-native_ref-win-x86_64-1.1-natives.jar:$APP_HOME/lib/netlib-native_ref-win-i686-1.1-natives.jar:$APP_HOME/lib/netlib-native_ref-linux-armhf-1.1-natives.jar:$APP_HOME/lib/native_ref-java-1.1.jar:$APP_HOME/lib/netlib-native_system-osx-x86_64-1.1-natives.jar:$APP_HOME/lib/netlib-native_system-linux-x86_64-1.1-natives.jar:$APP_HOME/lib/netlib-native_system-linux-i686-1.1-natives.jar:$APP_HOME/lib/netlib-native_system-linux-armhf-1.1-natives.jar:$APP_HOME/lib/netlib-native_system-win-x86_64-1.1-natives.jar:$APP_HOME/lib/netlib-native_system-win-i686-1.1-natives.jar:$APP_HOME/lib/native_system-java-1.1.jar:$APP_HOME/lib/core-1.1.2.jar:$APP_HOME/lib/arpack_combined_all-0.1.jar:$APP_HOME/lib/org.eclipse.core.resources-3.13.700.jar:$APP_HOME/lib/org.eclipse.text-3.10.200.jar:$APP_HOME/lib/org.eclipse.core.expressions-3.6.800.jar:$APP_HOME/lib/org.eclipse.core.runtime-3.18.0.jar:$APP_HOME/lib/org.eclipse.core.filesystem-1.7.700.jar:$APP_HOME/lib/jsr305-3.0.2.jar:$APP_HOME/lib/checker-qual-2.5.2.jar:$APP_HOME/lib/error_prone_annotations-2.1.3.jar:$APP_HOME/lib/j2objc-annotations-1.1.jar:$APP_HOME/lib/animal-sniffer-annotations-1.14.jar:$APP_HOME/lib/trove4j-3.0.3.jar:$APP_HOME/lib/gson-2.8.2.jar:$APP_HOME/lib/jgrapht-core-1.0.1.jar:$APP_HOME/lib/javassist-3.21.0-GA.jar:$APP_HOME/lib/org.eclipse.osgi-3.15.300.jar:$APP_HOME/lib/org.eclipse.core.jobs-3.10.800.jar:$APP_HOME/lib/org.eclipse.core.contenttype-3.7.700.jar:$APP_HOME/lib/org.eclipse.equinox.app-1.4.500.jar:$APP_HOME/lib/org.eclipse.equinox.registry-3.8.800.jar:$APP_HOME/lib/org.eclipse.equinox.preferences-3.8.0.jar:$APP_HOME/lib/org.eclipse.core.commands-3.9.700.jar:$APP_HOME/lib/org.eclipse.equinox.common-3.12.0.jar:$APP_HOME/lib/commons-codec-1.10.jar:$APP_HOME/lib/jniloader-1.1.jar
84+
8485

8586
# Determine the Java command to use to start the JVM.
8687
if [ -n "$JAVA_HOME" ] ; then
@@ -129,6 +130,7 @@ fi
129130
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
130131
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
131132
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
133+
132134
JAVACMD=`cygpath --unix "$JAVACMD"`
133135

134136
# We build the pattern for arguments to be converted via cygpath

‎build/scripts/BugPatchCollector.bat

+5-1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ if "%DIRNAME%" == "" set DIRNAME=.
2929
set APP_BASE_NAME=%~n0
3030
set APP_HOME=%DIRNAME%..
3131

32+
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
33+
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
34+
3235
@rem Add default JVM options here. You can also use JAVA_OPTS and BUG_PATCH_COLLECTOR_OPTS to pass JVM options to this script.
3336
set DEFAULT_JVM_OPTS=
3437

@@ -79,7 +82,8 @@ set CMD_LINE_ARGS=%*
7982
:execute
8083
@rem Setup the command line
8184

82-
set CLASSPATH=%APP_HOME%\lib\BugPatchCollector.jar;%APP_HOME%\lib\commons-math3-3.6.1.jar;%APP_HOME%\lib\gen.jdt-2.1.0.jar;%APP_HOME%\lib\client-2.1.0.jar;%APP_HOME%\lib\commons-csv-1.5.jar;%APP_HOME%\lib\jsoup-1.11.3.jar;%APP_HOME%\lib\super-csv-2.4.0.jar;%APP_HOME%\lib\org.eclipse.jgit-5.6.0.201912101111-r.jar;%APP_HOME%\lib\slf4j-api-1.7.25.jar;%APP_HOME%\lib\commons-cli-1.4.jar;%APP_HOME%\lib\commons-io-2.5.jar;%APP_HOME%\lib\weka-dev-3.9.3.jar;%APP_HOME%\lib\org.eclipse.jdt.core-3.16.0.jar;%APP_HOME%\lib\commons-lang3-3.9.jar;%APP_HOME%\lib\commons-collections4-4.4.jar;%APP_HOME%\lib\reflections-0.9.11.jar;%APP_HOME%\lib\core-2.1.0.jar;%APP_HOME%\lib\simmetrics-core-3.2.3.jar;%APP_HOME%\lib\guava-26.0-jre.jar;%APP_HOME%\lib\jsch-0.1.55.jar;%APP_HOME%\lib\jzlib-1.1.1.jar;%APP_HOME%\lib\JavaEWAH-1.1.6.jar;%APP_HOME%\lib\bcpg-jdk15on-1.64.jar;%APP_HOME%\lib\bcpkix-jdk15on-1.64.jar;%APP_HOME%\lib\bcprov-jdk15on-1.64.jar;%APP_HOME%\lib\java-cup-11b-2015.03.26.jar;%APP_HOME%\lib\java-cup-11b-runtime-2015.03.26.jar;%APP_HOME%\lib\bounce-0.18.jar;%APP_HOME%\lib\mtj-1.0.4.jar;%APP_HOME%\lib\all-1.1.2.pom;%APP_HOME%\lib\netlib-java-1.1.jar;%APP_HOME%\lib\netlib-native_ref-osx-x86_64-1.1-natives.jar;%APP_HOME%\lib\netlib-native_ref-linux-x86_64-1.1-natives.jar;%APP_HOME%\lib\netlib-native_ref-linux-i686-1.1-natives.jar;%APP_HOME%\lib\netlib-native_ref-win-x86_64-1.1-natives.jar;%APP_HOME%\lib\netlib-native_ref-win-i686-1.1-natives.jar;%APP_HOME%\lib\netlib-native_ref-linux-armhf-1.1-natives.jar;%APP_HOME%\lib\native_ref-java-1.1.jar;%APP_HOME%\lib\netlib-native_system-osx-x86_64-1.1-natives.jar;%APP_HOME%\lib\netlib-native_system-linux-x86_64-1.1-natives.jar;%APP_HOME%\lib\netlib-native_system-linux-i686-1.1-natives.jar;%APP_HOME%\lib\netlib-native_system-linux-armhf-1.1-natives.jar;%APP_HOME%\lib\netlib-native_system-win-x86_64-1.1-natives.jar;%APP_HOME%\lib\netlib-native_system-win-i686-1.1-natives.jar;%APP_HOME%\lib\native_system-java-1.1.jar;%APP_HOME%\lib\core-1.1.2.jar;%APP_HOME%\lib\arpack_combined_all-0.1.jar;%APP_HOME%\lib\org.eclipse.core.resources-3.13.600.jar;%APP_HOME%\lib\org.eclipse.text-3.10.0.jar;%APP_HOME%\lib\org.eclipse.core.expressions-3.6.600.jar;%APP_HOME%\lib\org.eclipse.core.runtime-3.17.0.jar;%APP_HOME%\lib\org.eclipse.core.filesystem-1.7.600.jar;%APP_HOME%\lib\jsr305-3.0.2.jar;%APP_HOME%\lib\checker-qual-2.5.2.jar;%APP_HOME%\lib\error_prone_annotations-2.1.3.jar;%APP_HOME%\lib\j2objc-annotations-1.1.jar;%APP_HOME%\lib\animal-sniffer-annotations-1.14.jar;%APP_HOME%\lib\trove4j-3.0.3.jar;%APP_HOME%\lib\gson-2.8.2.jar;%APP_HOME%\lib\jgrapht-core-1.0.1.jar;%APP_HOME%\lib\javassist-3.21.0-GA.jar;%APP_HOME%\lib\org.eclipse.osgi-3.15.100.jar;%APP_HOME%\lib\org.eclipse.core.jobs-3.10.600.jar;%APP_HOME%\lib\org.eclipse.core.contenttype-3.7.500.jar;%APP_HOME%\lib\org.eclipse.equinox.app-1.4.300.jar;%APP_HOME%\lib\org.eclipse.equinox.registry-3.8.600.jar;%APP_HOME%\lib\org.eclipse.equinox.preferences-3.7.600.jar;%APP_HOME%\lib\org.eclipse.core.commands-3.9.600.jar;%APP_HOME%\lib\org.eclipse.equinox.common-3.10.600.jar;%APP_HOME%\lib\commons-codec-1.10.jar;%APP_HOME%\lib\jniloader-1.1.jar
85+
set CLASSPATH=%APP_HOME%\lib\BugPatchCollector.jar;%APP_HOME%\lib\commons-math3-3.6.1.jar;%APP_HOME%\lib\gen.jdt-2.1.0.jar;%APP_HOME%\lib\client-2.1.0.jar;%APP_HOME%\lib\commons-csv-1.5.jar;%APP_HOME%\lib\jsoup-1.11.3.jar;%APP_HOME%\lib\super-csv-2.4.0.jar;%APP_HOME%\lib\org.eclipse.jgit-5.6.0.201912101111-r.jar;%APP_HOME%\lib\slf4j-api-1.7.25.jar;%APP_HOME%\lib\commons-cli-1.4.jar;%APP_HOME%\lib\commons-io-2.5.jar;%APP_HOME%\lib\weka-dev-3.9.3.jar;%APP_HOME%\lib\org.eclipse.jdt.core-3.16.0.jar;%APP_HOME%\lib\commons-lang3-3.9.jar;%APP_HOME%\lib\commons-collections4-4.4.jar;%APP_HOME%\lib\reflections-0.9.11.jar;%APP_HOME%\lib\core-2.1.0.jar;%APP_HOME%\lib\simmetrics-core-3.2.3.jar;%APP_HOME%\lib\guava-26.0-jre.jar;%APP_HOME%\lib\jsch-0.1.55.jar;%APP_HOME%\lib\jzlib-1.1.1.jar;%APP_HOME%\lib\JavaEWAH-1.1.6.jar;%APP_HOME%\lib\bcpg-jdk15on-1.64.jar;%APP_HOME%\lib\bcpkix-jdk15on-1.64.jar;%APP_HOME%\lib\bcprov-jdk15on-1.64.jar;%APP_HOME%\lib\java-cup-11b-2015.03.26.jar;%APP_HOME%\lib\java-cup-11b-runtime-2015.03.26.jar;%APP_HOME%\lib\bounce-0.18.jar;%APP_HOME%\lib\mtj-1.0.4.jar;%APP_HOME%\lib\all-1.1.2.pom;%APP_HOME%\lib\netlib-java-1.1.jar;%APP_HOME%\lib\netlib-native_ref-osx-x86_64-1.1-natives.jar;%APP_HOME%\lib\netlib-native_ref-linux-x86_64-1.1-natives.jar;%APP_HOME%\lib\netlib-native_ref-linux-i686-1.1-natives.jar;%APP_HOME%\lib\netlib-native_ref-win-x86_64-1.1-natives.jar;%APP_HOME%\lib\netlib-native_ref-win-i686-1.1-natives.jar;%APP_HOME%\lib\netlib-native_ref-linux-armhf-1.1-natives.jar;%APP_HOME%\lib\native_ref-java-1.1.jar;%APP_HOME%\lib\netlib-native_system-osx-x86_64-1.1-natives.jar;%APP_HOME%\lib\netlib-native_system-linux-x86_64-1.1-natives.jar;%APP_HOME%\lib\netlib-native_system-linux-i686-1.1-natives.jar;%APP_HOME%\lib\netlib-native_system-linux-armhf-1.1-natives.jar;%APP_HOME%\lib\netlib-native_system-win-x86_64-1.1-natives.jar;%APP_HOME%\lib\netlib-native_system-win-i686-1.1-natives.jar;%APP_HOME%\lib\native_system-java-1.1.jar;%APP_HOME%\lib\core-1.1.2.jar;%APP_HOME%\lib\arpack_combined_all-0.1.jar;%APP_HOME%\lib\org.eclipse.core.resources-3.13.700.jar;%APP_HOME%\lib\org.eclipse.text-3.10.200.jar;%APP_HOME%\lib\org.eclipse.core.expressions-3.6.800.jar;%APP_HOME%\lib\org.eclipse.core.runtime-3.18.0.jar;%APP_HOME%\lib\org.eclipse.core.filesystem-1.7.700.jar;%APP_HOME%\lib\jsr305-3.0.2.jar;%APP_HOME%\lib\checker-qual-2.5.2.jar;%APP_HOME%\lib\error_prone_annotations-2.1.3.jar;%APP_HOME%\lib\j2objc-annotations-1.1.jar;%APP_HOME%\lib\animal-sniffer-annotations-1.14.jar;%APP_HOME%\lib\trove4j-3.0.3.jar;%APP_HOME%\lib\gson-2.8.2.jar;%APP_HOME%\lib\jgrapht-core-1.0.1.jar;%APP_HOME%\lib\javassist-3.21.0-GA.jar;%APP_HOME%\lib\org.eclipse.osgi-3.15.300.jar;%APP_HOME%\lib\org.eclipse.core.jobs-3.10.800.jar;%APP_HOME%\lib\org.eclipse.core.contenttype-3.7.700.jar;%APP_HOME%\lib\org.eclipse.equinox.app-1.4.500.jar;%APP_HOME%\lib\org.eclipse.equinox.registry-3.8.800.jar;%APP_HOME%\lib\org.eclipse.equinox.preferences-3.8.0.jar;%APP_HOME%\lib\org.eclipse.core.commands-3.9.700.jar;%APP_HOME%\lib\org.eclipse.equinox.common-3.12.0.jar;%APP_HOME%\lib\commons-codec-1.10.jar;%APP_HOME%\lib\jniloader-1.1.jar
86+
8387

8488
@rem Execute BugPatchCollector
8589
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %BUG_PATCH_COLLECTOR_OPTS% -classpath "%CLASSPATH%" edu.handong.csee.isel.Main %CMD_LINE_ARGS%
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5.1-bin.zip
44
zipStoreBase=GRADLE_USER_HOME
55
zipStorePath=wrapper/dists

‎settings.gradle

+1
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@
88
*/
99

1010
rootProject.name = 'BugPatchCollector'
11+
include ':progressfragment'

‎src/main/java/edu/handong/csee/isel/Main.java

+85-55
Original file line numberDiff line numberDiff line change
@@ -58,102 +58,132 @@ public static void main(String[] args)
5858

5959
// 3. collect Bug-Fix-Commit
6060
List<String> bfcList = null;
61-
List<String> bicList = null;
61+
List<String> bicList = null;//메트릭스에서 쓰임.
62+
MetricCollector metricCollector = null;
6263
BFCCollector bfcCollector = null;
63-
64-
switch (input.referecneType) {
65-
case JIRA:
66-
bfcCollector = new BFCJiraCollector();
67-
bfcCollector.setJiraURL(input.jiraURL);
68-
bfcCollector.setJiraProjectKey(input.jiraProjectKey);
69-
bfcCollector.setOutPath(input.outPath);
70-
bfcList = bfcCollector.collectFrom(commitList);
71-
72-
break;
73-
74-
case GITHUB:
75-
bfcCollector = new BFCGitHubCollector();
76-
bfcCollector.setGitHubURL(input.gitURL);
77-
bfcCollector.setGitHubLabel(input.label);
78-
bfcList = bfcCollector.collectFrom(commitList);
79-
80-
break;
81-
82-
case KEYWORD:
83-
bfcCollector = new BFCKeywordCollector();
84-
bfcList = bfcCollector.collectFrom(commitList);
85-
86-
break;
87-
88-
case BICCSV:
89-
File BIC = new File(input.BICpath);
90-
if (!BIC.isFile()) {
91-
System.out.println("There is no BIC file");
92-
System.exit(1);
93-
}
94-
bicList = Utils.readBICCsvFile(input.BICpath);
95-
96-
break;
97-
}
98-
99-
// 4. Patch, BIC, Metric
10064
List<CSVInfo> csvInfoLst = null;
10165

102-
PatchCollector patchCollector = null;
103-
BICCollector bicCollector = null;
104-
MetricCollector metricCollector = null;
66+
10567

106-
switch (input.mode) {
107-
case PATCH:
108-
patchCollector = new CPatchCollector(input);
68+
69+
switch (input.taskType) {
70+
case Patch:
71+
bfcList=Making_bfcCollector(input,bfcList,commitList,bfcCollector);
72+
73+
PatchCollector patchCollector = new CPatchCollector(input);
10974
patchCollector.setBFC(bfcList);
11075
csvInfoLst = patchCollector.collectFrom(commitList);
76+
77+
Print_CSV(input, csvInfoLst);
11178

11279
break;
80+
11381
case BIC:
114-
bicCollector = new CBICCollector(input);
82+
bfcList=Making_bfcCollector(input,bfcList,commitList,bfcCollector);
83+
84+
BICCollector bicCollector = new CBICCollector(input);
11585
// bicCollector = new SZZRunner(getGitDirectory(input).getAbsolutePath());
11686
bicCollector.setBFC(bfcList);
11787
csvInfoLst = bicCollector.collectFrom(commitList);
118-
88+
System.out.println("please~~~~~~~~~~~~~~~~~~~~~~~~~~~~~");
89+
Print_CSV(input, csvInfoLst);//이게 최종 BIC프린트 해주는 메소드-> 손델것은 없다. 알아서 하는 메소드.
90+
System.out.println("&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&");
11991
break;
120-
case METRIC: // TODO:
92+
93+
case Metric:
94+
//BIC 파일 읽기
95+
Read_BICcsv(input, bicList);
96+
12197
metricCollector = new CMetricCollector(input,false);
12298
metricCollector.setBIC(bicList);
12399
File arff = metricCollector.collectFrom(commitList);
124100
System.out.println("Metric was saved in " + arff.getAbsolutePath());
125101

126-
return;
102+
break;
103+
104+
case Develop_Metirc:
105+
//BIC 파일 읽기
106+
Read_BICcsv(input, bicList);
127107

128-
case DEVELOPERMETRIC:
129108
DeveloperHistory developerHistory = new DeveloperHistory(input);
130109
String midDate = developerHistory.findDeveloperDate();
131110
System.out.println("MidDate : "+midDate);
111+
132112
metricCollector = new CMetricCollector(input,true);
133113
metricCollector.setMidDate(midDate);
134114
metricCollector.setBIC(bicList);
135115
metricCollector.collectFrom(commitList);
136116

137-
138-
return;
117+
break;
139118
}
140119

141-
// 5. Print CSV
120+
121+
122+
}
123+
124+
125+
126+
public static List<String> Read_BICcsv(Input input, List<String> bicList){
127+
File BIC = new File(input.BICpath);
128+
if (!BIC.isFile()) {
129+
System.out.println("There is no BIC file");
130+
System.exit(1);
131+
}
132+
bicList = Utils.readBICCsvFile(input.BICpath);
133+
134+
return bicList;
135+
136+
}
137+
138+
public static void Print_CSV( Input input, List<CSVInfo> csvInfoLst) throws IOException {
139+
142140
if (csvInfoLst.size() < 1) {
141+
System.out.println("why is it not workding?");
143142
return;
144143
}
145-
144+
System.out.println("Really?");
146145
CSVMaker printer = new CSVMaker();
147146
printer.setDataType(csvInfoLst);
148147
printer.setPath(input);
149148
printer.print(csvInfoLst);
150-
149+
150+
}
151+
152+
public static List<String> Making_bfcCollector (Input input, List<String> bfcList, List<RevCommit> commitList, BFCCollector bfcCollector)
153+
throws IOException,InvalidProjectKeyException, InvalidDomainException{
154+
155+
switch (input.mode) { //CLIConverter에서 각각 옵션 모드를 설정해 주었다.
156+
case Jira:
157+
bfcCollector = new BFCJiraCollector();
158+
bfcCollector.setJiraURL(input.jiraURL);
159+
bfcCollector.setJiraProjectKey(input.jiraProjectKey);
160+
bfcCollector.setOutPath(input.outPath);
161+
bfcList = bfcCollector.collectFrom(commitList);
162+
break;
163+
164+
case KeyWord:
165+
bfcCollector = new BFCKeywordCollector();
166+
bfcList = bfcCollector.collectFrom(commitList);
167+
break;
168+
169+
case GitHub:
170+
bfcCollector = new BFCGitHubCollector();
171+
bfcCollector.setGitHubURL(input.gitURL);
172+
bfcCollector.setGitHubLabel(input.label);
173+
bfcList = bfcCollector.collectFrom(commitList);
174+
break;
175+
176+
}
177+
178+
return bfcList;
151179
}
152180

181+
182+
153183
private static boolean isValidRepository(Input input) {
154184
File directory = getGitDirectory(input);
155185
try {
156-
Git git = Git.open(directory);
186+
Git git = Git.open(directory); //여기가 쓰이는데 왜안쓰인다고 뜨는지 모르겠다.
157187
return true;
158188
} catch (IOException e) {
159189
return false;

‎src/main/java/edu/handong/csee/isel/bic/collector/CBICCollector.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
import edu.handong.csee.isel.data.Input;
2828
import edu.handong.csee.isel.data.csv.BICInfo;
2929

30-
public class CBICCollector implements BICCollector {
30+
public class CBICCollector implements BICCollector { //도대체 왜 여기서 에러가 뜨는지가 모르겠다. 건든게 일도 없는데?
3131

3232
Input input;
3333
List<String> bfcList = null;

‎src/main/java/edu/handong/csee/isel/data/Input.java

+7-6
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,11 @@ public class Input {
1919

2020
public String label;
2121

22-
public ReferenceType referecneType;
22+
public TaskType taskType; // -t 옵션(메인 전체 큰 옵션)
2323

24-
public Mode mode;
24+
public Mode mode;// BIC 랑 Path일 경우 (ij, ig, ik 옵션 정하기 위해)
25+
26+
public String Issue_keyWord; //이슈키 추가한 부분
2527

2628
public String BICpath;
2729

@@ -34,13 +36,12 @@ public class Input {
3436
public int percent;
3537

3638

37-
38-
public static enum ReferenceType {
39-
JIRA, GITHUB, KEYWORD, BICCSV
39+
public static enum TaskType {
40+
Patch,BIC, Metric, Develop_Metirc
4041
}
4142

4243
public static enum Mode {
43-
PATCH, BIC, METRIC, DEVELOPERMETRIC
44+
GitHub, Jira, KeyWord
4445
}
4546

4647
}

‎src/main/java/edu/handong/csee/isel/data/processor/CSVMaker.java

+5-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,8 @@ public class CSVMaker {
2121
public String path;
2222
private Type type = null;
2323

24-
private static enum Type {
25-
PATCH, BIC, METRIC
24+
private static enum Type { //해당 class는 파라미터로 들어온 csvInfo의 첫번째 값의 속성을 instanceof 으로 알아낸 뒤 알아서 파일을 만든다.. 그래서 고칠부분은 없다.
25+
PATCH, BIC, METRIC
2626
}
2727

2828
public void setPath(Input input) {
@@ -101,13 +101,16 @@ private void print(BICInfo info) throws IOException {
101101
public void setDataType(List<CSVInfo> csvInfoLst) {
102102
CSVInfo csvInfoFirst = csvInfoLst.get(0);
103103
if (csvInfoFirst instanceof PatchInfo) {
104+
System.out.println("CSVMAER path");
104105
this.type = Type.PATCH;
105106
}
106107
if (csvInfoFirst instanceof BICInfo) {
107108
this.type = Type.BIC;
109+
System.out.println("CSVMAER BIC");
108110
}
109111
if (csvInfoFirst instanceof MetricInfo) {
110112
this.type = Type.METRIC;
113+
System.out.println("CSVMAER MATRIC");
111114
}
112115
}
113116

‎src/main/java/edu/handong/csee/isel/data/processor/input/converter/CLIConverter.java

+165-89
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,66 @@ public Input getInputFrom(String[] args) {
2525
try {
2626
cmd = parser.parse(options, args);
2727
} catch (ParseException e) {
28+
System.out.println("여기!!!!1111");
2829
printHelp(options);
2930
System.exit(1);
3031
}
3132

3233
// CLI exception handling
3334
if (!isValid(cmd, options)) {
34-
printHelp(options);
35+
System.out.println("여기!!!!22222");
3536
System.exit(1);
3637
}
37-
38+
39+
3840
Input input = new Input();
41+
input.gitURL = cmd.getOptionValue("i");// input path
42+
if (input.gitURL.endsWith("/")) {
43+
input.gitURL = input.gitURL.substring(0, input.gitURL.length() - 1);
44+
}
45+
input.gitRemoteURI = input.gitURL + ".git";
46+
47+
input.projectName = getProjectName(input.gitRemoteURI);
48+
49+
input.outPath = cmd.getOptionValue("o");// output path
50+
if (input.outPath.endsWith(File.separator)) {
51+
input.outPath = input.outPath.substring(0, input.outPath.length() - 1);
52+
}
53+
54+
55+
//각각 옵션이 null아닐때 값을 넣어주고 해당 값에 맞는 input.mode를 정해 주었다!
56+
if(cmd.getOptionValue("ij")!=null) {
57+
input.jiraURL = cmd.getOptionValue("ij");
58+
input.jiraProjectKey = cmd.getOptionValue("jk");
59+
input.mode = Input.Mode.Jira;
60+
}
61+
else if(cmd.getOptionValue("ik")!=null) {
62+
input.Issue_keyWord = cmd.getOptionValue("ik");
63+
input.mode = Input.Mode.KeyWord;
64+
}
65+
else {
66+
input.mode = Input.Mode.GitHub;
67+
}
68+
69+
String task= cmd.getOptionValue("t"); //무슨 테스크를 할지 값을 비교해서 밑에서 정해줌
70+
71+
if (task.equals("patch")) {
72+
input.taskType = Input.TaskType.Patch;
73+
} else if (task.equals("BIC")) {
74+
input.taskType = Input.TaskType.BIC;
75+
} else if (task.equals("metric")) {
76+
input.taskType = Input.TaskType.Metric;
77+
} else if (task.equals("Develop_Metric")) {
78+
input.taskType = Input.TaskType.Develop_Metirc;
79+
}
80+
81+
input.BICpath = cmd.getOptionValue("cp"); //metric 만들때 필요한 BIC 인풋 path옵션!
82+
83+
input.label = cmd.getOptionValue("l");
84+
input.startDate = cmd.getOptionValue("s");
85+
input.endDate = cmd.getOptionValue("e");
86+
87+
3988
int max;
4089
int min;
4190
if (cmd.hasOption("x") || cmd.hasOption("m")) {
@@ -47,19 +96,20 @@ public Input getInputFrom(String[] args) {
4796
}
4897
input.maxSize = max;
4998
input.minSize = min;
99+
100+
101+
// if (cmd.hasOption("b")) {
102+
// input.mode = Input.Mode.BIC;
103+
// } else if (cmd.hasOption("t")) {
104+
// input.mode = Input.Mode.METRIC;
105+
// } else if(cmd.hasOption("d")){
106+
// input.mode = Input.Mode.DEVELOPERMETRIC;
107+
// } else {
108+
// input.mode = Input.Mode.PATCH;
109+
// }
110+
111+
50112

51-
input.gitURL = cmd.getOptionValue("i");
52-
if (input.gitURL.endsWith("/")) {
53-
input.gitURL = input.gitURL.substring(0, input.gitURL.length() - 1);
54-
}
55-
input.gitRemoteURI = input.gitURL + ".git";
56-
input.jiraProjectKey = cmd.getOptionValue("k");
57-
input.jiraURL = cmd.getOptionValue("j");
58-
input.projectName = getProjectName(input.gitRemoteURI);
59-
input.label = cmd.getOptionValue("l");
60-
input.BICpath = cmd.getOptionValue("c");
61-
input.startDate = cmd.getOptionValue("s");
62-
input.endDate = cmd.getOptionValue("e");
63113

64114
int inputPercent;
65115
if(!cmd.hasOption("p")) {
@@ -74,73 +124,99 @@ public Input getInputFrom(String[] args) {
74124
}
75125
input.percent = inputPercent;
76126

77-
input.outPath = cmd.getOptionValue("o");
78-
if (input.outPath.endsWith(File.separator)) {
79-
input.outPath = input.outPath.substring(0, input.outPath.length() - 1);
80-
}
81-
82-
if (cmd.hasOption("g")) {
83-
input.referecneType = Input.ReferenceType.GITHUB;
84-
} else if (cmd.hasOption("j")) {
85-
input.referecneType = Input.ReferenceType.JIRA;
86-
} else if (cmd.hasOption("c")) {
87-
input.referecneType = Input.ReferenceType.BICCSV;
88-
} else {
89-
input.referecneType = Input.ReferenceType.KEYWORD;
90-
}
91-
92-
if (cmd.hasOption("b")) {
93-
input.mode = Input.Mode.BIC;
94-
} else if (cmd.hasOption("t")) {
95-
input.mode = Input.Mode.METRIC;
96-
} else if(cmd.hasOption("d")){
97-
input.mode = Input.Mode.DEVELOPERMETRIC;
98-
} else {
99-
input.mode = Input.Mode.PATCH;
100-
}
101-
102127
return input;
103128
}
129+
104130

105131
private boolean isValid(CommandLine cmd, Options options) {
106132
try {
107-
if (cmd.hasOption("j") ^ cmd.hasOption("k")) {
108-
String eMessage = "'j' options must be used with 'k'";
133+
134+
if (!(cmd.hasOption("t"))) {
135+
String eMessage = "'t' options must be used in this program";
109136
throw new Exception(eMessage);
110137
}
111-
if (cmd.hasOption("x") ^ cmd.hasOption("m")) {
112-
String eMessage = "'x' and 'm' Option must be used together!";
138+
if (!(cmd.hasOption("i"))) {
139+
String eMessage = "'i' options must be used in this program";
113140
throw new Exception(eMessage);
114141
}
115-
if (cmd.hasOption("x")) {
116-
int max = Integer.parseInt(cmd.getOptionValue("x"));
117-
int min = Integer.parseInt(cmd.getOptionValue("m"));
118-
119-
if (max < min) {
120-
String eMessage = "Max must be bigger than min!";
121-
throw new Exception(eMessage);
122-
}
142+
if (!(cmd.hasOption("o"))) {
143+
String eMessage = "'o' options must be used in this program";
144+
throw new Exception(eMessage); //여기 위로는 필수로 필요햔 옵션들
123145
}
124146

125-
if (cmd.hasOption("t") && !cmd.hasOption("c")) {
126-
String eMessage = "Extracting Metrics requires BIC csv. get BIC first";
147+
String task= cmd.getOptionValue("t"); //t가 해당하는 옵션이 없을 경우 에러
148+
149+
if (!((task.equals("metric"))||(task.equals("Develop_Metric"))||(task.equals("patch"))||(task.equals("BIC")))){
150+
System.out.println(task);
151+
String eMessage = "task option have to be patch or BIC or metric or Develop_Metirc";
152+
throw new Exception(eMessage);
153+
}
154+
// path 이거나 bic 이라면 옆에 해당 옵션중 한개는 무조건 있어야 한다.
155+
if ((task.equals("patch")||task.equals("BIC")) ^ (cmd.hasOption("ij")||cmd.hasOption("ig")||cmd.hasOption("ik"))) {
156+
String eMessage = "Making patch or BIC.csv need 'ij' or 'ig' of 'ik'option";
157+
throw new Exception(eMessage);
158+
}
159+
// metic과 Develop_Metric이라면 CP(BIC path)는 무조건 있어야 한다.
160+
if ((task.equals("metric")||task.equals("Develop_Metric")) ^ (cmd.hasOption("cp"))) {
161+
String eMessage = "It need a BIC CSV file to make a metric";
127162
throw new Exception(eMessage);
128163
}
129164

130-
if (cmd.hasOption("d") && !cmd.hasOption("c")) {
131-
String eMessage = "Extracting Metrics requires BIC csv. get BIC first";
165+
//온셥에 ij가 있다면 jk는 무조건 있어야 한다.
166+
if (cmd.hasOption("ij") ^ cmd.hasOption("jk")) {
167+
String eMessage = "'ij' and 'jk' Option must be used together!";
132168
throw new Exception(eMessage);
133169
}
134170

171+
172+
173+
// if ((cmd.hasOption("t") ^ cmd.hasOption("p"))||(cmd.hasOption("t") ^ cmd.hasOption("b"))
174+
// ||(cmd.hasOption("t") ^ cmd.hasOption("m"))||(cmd.hasOption("t") ^ cmd.hasOption("dm"))){
175+
// String eMessage = "'t' options must be used with 'k'";
176+
// throw new Exception(eMessage);
177+
// }
178+
//
179+
//
180+
//
181+
// if (cmd.hasOption("d") && !cmd.hasOption("c")) {
182+
// String eMessage = "Extracting Metrics requires BIC csv. get BIC first";
183+
// throw new Exception(eMessage);
184+
// }
185+
186+
187+
if (cmd.hasOption("x") ^ cmd.hasOption("m")) {
188+
String eMessage = "'x' and 'm' Option must be used together!";
189+
throw new Exception(eMessage);
190+
}
191+
if (cmd.hasOption("x")) {
192+
int max = Integer.parseInt(cmd.getOptionValue("x"));
193+
int min = Integer.parseInt(cmd.getOptionValue("m"));
194+
195+
if (max < min) {
196+
String eMessage = "Max must be bigger than min!";
197+
throw new Exception(eMessage);
198+
}
199+
}
200+
135201
} catch (Exception e) {
202+
System.out.println("여기깅ㄴ가 혹");
136203
System.out.println(e.getMessage());
137204
printHelp(options);
138205
return false;
139206
}
140207
return true;
141208
}
209+
210+
//bic CSV파일 만드는 컴파일 명령
211+
// ./BugPatchCollector -i https://github.com/apache/nutch -o /Users/juhui/Desktop/testMain/BIC -t BIC -ij issues.apache.org -jk NUTCH
212+
213+
//arff파일 만드는 명령
214+
// ./BugPatchCollector -i https://github.com/apache/metamodel -o /data/metric -t -c /data/BIC/BIC_metamodel.csv
215+
216+
//바뀐 메인 돌리기
217+
// ./BugPatchCollector -i https://github.com/apache/juddi -ij issues.apache.org -jk JUDDI -t BIC -o /Users/juhui/Desktop/testMain/BIC
142218

143-
private Options createOptions() {
219+
private Options createOptions() {// desc 다시쓰자!
144220
Options options = new Options();
145221

146222
options.addOption(
@@ -149,36 +225,27 @@ private Options createOptions() {
149225

150226
options.addOption(Option.builder("o").longOpt("result").desc("directory will have result file").hasArg()
151227
.argName("directory").required().build());
228+
229+
options.addOption(Option.builder("t").longOpt("task").desc("kind of task").hasArg()
230+
.argName("task").required().build());
152231

153-
options.addOption(Option.builder("x").longOpt("max").desc(
154-
"Set a Max lines of each result patch. Only count '+++' and '---' lines. must used with '-m'. (default: 500)")
155-
.hasArg().argName("Max lines of patch").build());
156-
157-
options.addOption(Option.builder("m").longOpt("min")
158-
.desc("Set a Min lines of each result patch. This Option need to be used with 'x' Option. (default: 0)")
159-
.hasArg().argName("Min lines of patch").build());
160-
161-
options.addOption(Option.builder("l").longOpt("label").desc("Set a bug label of github (default: 'bug')")
162-
.hasArg().argName("Find coincident commit with label").build());
163-
164-
options.addOption(Option.builder("b").longOpt("bugIntroducingChange")
165-
.desc("If you want to get bug introducing changes, add this option").build());
166-
167-
options.addOption(Option.builder("g").longOpt("github")
168-
.desc("When searching fix-commit, use GitHub-issues with label name").build());
169-
170-
options.addOption(Option.builder("t").longOpt("metric").desc("collect metrics from all changes").build());
171-
172-
options.addOption(Option.builder("j").longOpt("jiraURL").desc("Jira issues URL (example: issues.apache.org)")
232+
options.addOption(Option.builder("ij").longOpt("issue jiraURL").desc("Jira issues URL (example: issues.apache.org)")
173233
.hasArg().argName("Jira project URL").build());
174-
175-
options.addOption(Option.builder("k").longOpt("jiraProject").desc(
234+
235+
options.addOption(Option.builder("jk").longOpt("jiraProject keyword").desc(
176236
"Jira project key. you can get more informations: https://github.com/HGUISEL/BugPatchCollector/issues/18")
177237
.hasArg().argName("Project Key").build());
178238

179-
options.addOption(Option.builder("c").longOpt("BugIntroducingChange csv file path").desc("Path of csv file")
239+
options.addOption(Option.builder("ig").longOpt("issue github")
240+
.desc("When searching fix-commit, use GitHub-issues with label name").build());
241+
242+
options.addOption(Option.builder("ik").longOpt("issue keyword").desc("keyword of commit message")
243+
.hasArg().argName("CommitMsgkeyword").build());
244+
245+
options.addOption(Option.builder("cp").longOpt("BugIntroducingChange csv file path").desc("Path of csv file")
180246
.hasArg().argName("BIC csv file path").build());
181-
247+
248+
182249
options.addOption(Option.builder("s").longOpt("startdate")
183250
.desc("Start date for collecting training data. Format: \"yyyy-MM-dd HH:mm:ss\"")
184251
.hasArg()
@@ -191,18 +258,27 @@ private Options createOptions() {
191258
.argName("End date")
192259
.build());
193260

194-
options.addOption(Option.builder("d").longOpt("developer")
195-
.desc("collecting metrics for developer history scenario")
196-
.argName("developer history")
197-
.build());
261+
options.addOption(Option.builder("l").longOpt("label").desc("Set a bug label of github (default: 'bug')")
262+
.hasArg().argName("Find coincident commit with label").build());
263+
198264

265+
options.addOption(Option.builder("h").longOpt("help").desc("Help").build());
266+
267+
199268
options.addOption(Option.builder("p").longOpt("percent")
200-
.desc("Percent of developer. Range : 2 ~ 9")
201-
.hasArg()
202-
.argName("percent of developer")
203-
.build());
269+
.desc("Percent of developer. Range : 2 ~ 9")
270+
.hasArg()
271+
.argName("percent of developer")
272+
.build());
204273

205-
options.addOption(Option.builder("h").longOpt("help").desc("Help").build());
274+
275+
options.addOption(Option.builder("x").longOpt("max").desc(
276+
"Set a Max lines of each result patch. Only count '+++' and '---' lines. must used with '-m'. (default: 500)")
277+
.hasArg().argName("Max lines of patch").build());
278+
279+
options.addOption(Option.builder("m").longOpt("min")
280+
.desc("Set a Min lines of each result patch. This Option need to be used with 'x' Option. (default: 0)")
281+
.hasArg().argName("Min lines of patch").build());
206282

207283
return options;
208284
}

‎src/main/java/edu/handong/csee/isel/metric/collector/CMetricCollector.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public File collectFrom(List<RevCommit> commitList) {
7979
arffHelper.setReferencePath(referencePath);
8080
arffHelper.setProjectName(input.projectName);
8181
arffHelper.setOutPath(input.outPath);
82-
mergedArff = arffHelper.getMergedBOWArffBetween(bowCollector, cVectorCollector);
82+
mergedArff = arffHelper.getMergedBOWArffBetween(bowCollector, cVectorCollector); //arrf 파일이 하나나온다 <<bow-vector arff>>
8383

8484
// TODO: 4. Meta data, SJ help me
8585
CommitCollector commitCollector = new CommitCollector(git, referencePath, bicList, input.projectName, startDate, endDate, developerHistory); //StartDate, strEndDate, test
@@ -89,7 +89,7 @@ public File collectFrom(List<RevCommit> commitList) {
8989
String arffOutputPath = commitCollector.CSV2ARFF();
9090

9191
File metaArff = new File(arffOutputPath); // TODO: Here your logic: make
92-
// metadata arff
92+
// metadata arff //reference 안에 있는 arff...!
9393

9494
ArrayList<String> keyOrder = arffHelper.getKeyOrder();
9595

@@ -98,7 +98,7 @@ public File collectFrom(List<RevCommit> commitList) {
9898
File resultArff = null;
9999

100100
try {
101-
if(!developerHistory)resultArff = arffHelper.makeMergedArff(mergedArff, metaArff, keyOrder);
101+
if(!developerHistory)resultArff = arffHelper.makeMergedArff(mergedArff, metaArff, keyOrder);// 여기서 섞는 최종 key-data arff
102102
else resultArff = arffHelper.makeMergedDeveloperHistoryArff(mergedArff, metaArff, keyOrder, midDate);
103103
} catch (IOException e) {
104104
// TODO Auto-generated catch block

‎src/main/java/edu/handong/csee/isel/metric/collector/CharacteristicVectorCollector.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public void collect() {
9292
case "UPD":
9393
case "MOV":
9494

95-
String changedNode = element.getName() + String.valueOf(element.getNode().getType());
95+
String changedNode = element.getName() + String.valueOf(element.getNode().getType());//node
9696

9797
contentBuffer.append(changedNode);
9898
contentBuffer.append(" ");

0 commit comments

Comments
 (0)
Please sign in to comment.