GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — RecRankJavaEmersion/src/TestForCreateDataSet.java at master · coderZMR/RecRankJavaEmersion

Expand file tree

/

TestForCreateDataSet.java

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
59 lines (50 loc) · 2.05 KB
/

TestForCreateDataSet.java

Copy path

File metadata and controls

59 lines (50 loc) · 2.05 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
public class TestForCreateDataSet {
static Map<String, String> API2Index;
public static void main(String[] args) throws IOException {
API2Index = ReadAPI2Index.getAPI2IndexMap(new File("/Users/zhangmingrui/Desktop/RecRankJavaEmersion/APIIndexMap.txt"));
ConstructGroum CG = new ConstructGroum();
Groum groum1 = CG.constructGroum("/Users/zhangmingrui/Desktop/RecRankJavaEmersion/dotFile/Demo.resizeArray.dot", API2Index);
Groum groum2 = CG.constructGroum("/Users/zhangmingrui/Desktop/RecRankJavaEmersion/dotFile/Demo.resizeArray1.dot", API2Index);
List<Groum> groumList = new ArrayList<Groum>();
groumList.add(groum1); groumList.add(groum2);
List<String> results = new ArrayList<String>();
results.add("Array.newInstance");
results.add("Class.getComponentType");
results.add("CONTROL.IF");
results.add("Array.getLength");
results.add("Math.min");
int qId = 1;
FileWriter fW = getFileWriter(new File("/Users/zhangmingrui/Desktop/RecRankJavaEmersion/DataSet.txt"));
PrintWriter pW = getPrintWriter(fW);
for (Groum groum : groumList){
CreateDataSet.create(groum, results, qId, new File("/Users/zhangmingrui/Desktop/RecRankJavaEmersion/PathCount.txt"), pW, API2Index);
++qId;
}
ClosePWFW(pW, fW);
}
private static FileWriter getFileWriter(File file) throws IOException {
if (file.exists()) {
file.delete();
}
if (!file.exists()) {
file.createNewFile();
}
return new FileWriter(file, true);
}
private static PrintWriter getPrintWriter(FileWriter fW) {
return new PrintWriter(fW);
}
private static void ClosePWFW(PrintWriter pW, FileWriter fW) throws IOException {
pW.flush();
fW.flush();
pW.close();
fW.close();
}
}
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.