Skip to content

Commit

Permalink
Atualizando para nova estrutura do csv da JNose
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianaPriscilaSantos committed Feb 16, 2021
1 parent bb5e832 commit 91dad33
Show file tree
Hide file tree
Showing 8 changed files with 3,955 additions and 57,888 deletions.
34 changes: 17 additions & 17 deletions TSVizzEvolution/src/tsvizzevolution/GraphOneVersion.java
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public class GraphOneVersion extends javax.swing.JFrame {
private JTextField txtFilePathDefault1;
private JTextField txtFilePathMethod;

private static final String VIRGULA = ",";
private static final String VIRGULA = ";";
private static String nomeDoArquivo;
private JPanel pnlLevel;

Expand Down Expand Up @@ -218,7 +218,7 @@ private void btnChooseFileSearchActionPerformed(java.awt.event.ActionEvent evt)
if (returnVal == JFileChooser.APPROVE_OPTION) {
File file = fc.getSelectedFile();
txtFilePathDefault1.setText(file.getPath());
// txtFilePathDefault1.setText("C:\\Users\\T-GAMER\\IdeaProjects\\teste\\src\\tsvizzevolution\\commons-io_testsmesll_2_1.csv");
txtFilePathDefault1.setText("C:\\Users\\T-GAMER\\IdeaProjects\\teste\\src\\tsvizzevolution\\resultado_evolution1.csv");
nomeDoArquivo = file.getName();
btnGerarUploadActionPerformed(evt);

Expand All @@ -231,7 +231,7 @@ private void btnSearchMethodActionPerformed(java.awt.event.ActionEvent evt) thro
if (returnVal == JFileChooser.APPROVE_OPTION) {
File file = fc.getSelectedFile();
txtFilePathMethod.setText(file.getPath());
// txtFilePathMethod.setText("C:\\Users\\T-GAMER\\IdeaProjects\\teste\\src\\tsvizzevolution\\all_report_by_testsmells.csv");
txtFilePathMethod.setText("C:\\Users\\T-GAMER\\IdeaProjects\\teste\\src\\tsvizzevolution\\commons-io_result_byclasstest_testsmells.csv");
nomeDoArquivo = file.getName();
List<ClassMethod> l = retorna_lista_classe_metodo();
List<String> list = new ArrayList<>();
Expand Down Expand Up @@ -304,7 +304,7 @@ private void CriaTreeMapView(String fileName1, String filtro, JPanel painel) {
classe = new JPanel();
classe.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
Color c = new Color(r, g, b);
classe.setBackground(c); // seta a cor de fundo
classe.setBackground(c);
classe.setBorder(BorderFactory.createLineBorder(Configurations.bordaPacote, 1)); // seta a borda
classe.setPreferredSize(new Dimension((d.valor * 500) / maior_valor, (d.valor * 500) / maior_valor));

Expand Down Expand Up @@ -434,17 +434,17 @@ public void run(){
for (int i = 0; i < listaMetodos.size(); i++) {
String[] dado_linha = (String[]) listaMetodos.get(i);
if (obj.classe.equals(dado_linha[1])) {
int begin;
int end;
String begin;
String end;
try {
begin = Integer.valueOf(dado_linha[10]);
begin = dado_linha[9];
}catch (Exception e){
begin = 0;
begin = "0";
}
try {
end = Integer.valueOf(dado_linha[11]);
end = dado_linha[10];
}catch (Exception e){
end = 0;
end = "0";
}
obj.addMethods(new MethodData(dado_linha[8], begin, end));
}
Expand Down Expand Up @@ -1099,7 +1099,7 @@ private static Graph CriaLegenda(Graph graph1) {
" size: 5px; " +
" fill-color: white; " +
" icon-mode: at-left; " +
" icon: url('tsvizzevolution/legenda.jpg');" +
" icon: url('tsvizzevolution/legenda.png');" +
"}"
);
Viewer v = graph1.display();
Expand Down Expand Up @@ -1221,17 +1221,17 @@ private List<ClassMethod> retorna_lista_classe_metodo() throws IOException {
for (int i = 0; i < listaMetodos.size(); i++) {
String[] dado_linha = (String[]) listaMetodos.get(i);
if (obj.classe.equals(dado_linha[1])) {
int begin;
int end;
String begin;
String end;
try {
begin = Integer.valueOf(dado_linha[10]);
begin = dado_linha[9];
}catch (Exception e){
begin = 0;
begin = "0";
}
try {
end = Integer.valueOf(dado_linha[11]);
end = dado_linha[10];
}catch (Exception e){
end = 0;
end = "0";
}
obj.addMethods(new MethodData(dado_linha[8], begin, end));
}
Expand Down
36 changes: 18 additions & 18 deletions TSVizzEvolution/src/tsvizzevolution/GraphTwoVersions.java
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public class GraphTwoVersions extends JFrame {
private JTextField txtFilePathMethod;
private JTextField txtFilePathMethod2;

private static final String VIRGULA = ",";
private static final String VIRGULA = ";";
private static String nomeDoArquivo;


Expand Down Expand Up @@ -376,7 +376,7 @@ private void btnChooseFileSearch1ActionPerformed(ActionEvent evt) {
if (returnVal == JFileChooser.APPROVE_OPTION) {
File file = fc.getSelectedFile();
txtFilePathDefault1.setText(file.getPath());
// txtFilePathDefault1.setText("C:\\Users\\T-GAMER\\IdeaProjects\\teste\\src\\tsvizzevolution\\commons-io_testsmesll_2_1.csv");
txtFilePathDefault1.setText("C:\\Users\\T-GAMER\\IdeaProjects\\teste\\src\\tsvizzevolution\\resultado_evolution1.csv");
nomeDoArquivo = file.getName();
}
}
Expand All @@ -387,7 +387,7 @@ private void btnChooseFileSearch2ActionPerformed(ActionEvent evt) throws IOExcep
if (returnVal == JFileChooser.APPROVE_OPTION) {
File file = fc.getSelectedFile();
txtFilePathDefault2.setText(file.getPath());
// txtFilePathDefault2.setText("C:\\Users\\T-GAMER\\IdeaProjects\\teste\\src\\tsvizzevolution\\commons-io_testsmesll_2_5.csv");
txtFilePathDefault2.setText("C:\\Users\\T-GAMER\\IdeaProjects\\teste\\src\\tsvizzevolution\\resultado_evolution1.csv");
nomeDoArquivo = file.getName();
btnGerarUploadActionPerformed(evt);
}
Expand All @@ -399,7 +399,7 @@ private void btnSearchMethodActionPerformed(ActionEvent evt) {
if (returnVal == JFileChooser.APPROVE_OPTION) {
File file = fc.getSelectedFile();
txtFilePathMethod.setText(file.getPath());
// txtFilePathMethod.setText("C:\\Users\\T-GAMER\\IdeaProjects\\teste\\src\\tsvizzevolution\\all_report_by_testsmells.csv");
txtFilePathMethod.setText("C:\\Users\\T-GAMER\\IdeaProjects\\teste\\src\\tsvizzevolution\\commons-io_result_byclasstest_testsmells.csv");
nomeDoArquivo = file.getName();
}
}
Expand All @@ -410,7 +410,7 @@ private void btnSearchMethod2ActionPerformed(ActionEvent evt) throws IOException
if (returnVal == JFileChooser.APPROVE_OPTION) {
File file = fc.getSelectedFile();
txtFilePathMethod2.setText(file.getPath());
// txtFilePathMethod2.setText("C:\\Users\\T-GAMER\\IdeaProjects\\teste\\src\\tsvizzevolution\\all_report_by_testsmells.csv");
txtFilePathMethod2.setText("C:\\Users\\T-GAMER\\IdeaProjects\\teste\\src\\tsvizzevolution\\commons-io_result_byclasstest_testsmells.csv");
nomeDoArquivo = file.getName();
List<ClassMethod> l = retorna_lista_classe_metodo();
List<String> list = new ArrayList<>();
Expand Down Expand Up @@ -638,17 +638,17 @@ private List<ClassMethod> CriaListaDeMetodos(String path){
for (int i = 0; i < listaMetodos.size(); i++) {
String[] dado_linha = (String[]) listaMetodos.get(i);
if (obj.classe.equals(dado_linha[1]) && obj.testSmell.equals(dado_linha[7])) {
int begin;
int end;
String begin;
String end;
try {
begin = Integer.valueOf(dado_linha[10]);
begin = dado_linha[9];
}catch (Exception e){
begin = 0;
begin = "0";
}
try {
end = Integer.valueOf(dado_linha[11]);
end = dado_linha[10];
}catch (Exception e){
end = 0;
end = "0";
}
obj.addMethods(new MethodData(dado_linha[8], begin, end));
}
Expand Down Expand Up @@ -860,7 +860,7 @@ private static Graph CriaLegenda(Graph graph1) {
" size: 5px; " +
" fill-color: white; " +
" icon-mode: at-left; " +
" icon: url('tsvizzevolution/legenda.jpg');" +
" icon: url('tsvizzevolution/legenda.png');" +
"}"
);
Viewer v = graph1.display();
Expand Down Expand Up @@ -1922,17 +1922,17 @@ private List<ClassMethod> retorna_lista_classe_metodo() throws IOException {
for (int i = 0; i < listaMetodos.size(); i++) {
String[] dado_linha = (String[]) listaMetodos.get(i);
if (obj.classe.equals(dado_linha[1])) {
int begin;
int end;
String begin;
String end;
try {
begin = Integer.valueOf(dado_linha[10]);
begin = dado_linha[9];
}catch (Exception e){
begin = 0;
begin = "0";
}
try {
end = Integer.valueOf(dado_linha[11]);
end = dado_linha[10];
}catch (Exception e){
end = 0;
end = "0";
}
obj.addMethods(new MethodData(dado_linha[8], begin, end));
}
Expand Down
6 changes: 3 additions & 3 deletions TSVizzEvolution/src/tsvizzevolution/MethodData.java
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

public class MethodData {
public String metodo;
public int begin;
public int end;
public String begin;
public String end;

public MethodData(String metodo, int begin, int end) {
public MethodData(String metodo, String begin, String end) {
this.metodo = metodo;
this.begin = begin;
this.end = end;
Expand Down
Loading

0 comments on commit 91dad33

Please sign in to comment.