@@ -22,35 +22,7 @@ public boolean performMutation(MutationLocation location, BufferedWriter writer,
2222 ASTMutationLocation mLocation = (ASTMutationLocation ) location ;
2323 CommonTree parent = (CommonTree ) mLocation .getTree ().getParent ();
2424 List <CommonTree > hijos = (List <CommonTree >)parent .getChildren ();
25- // int intentInstanceLine = -1;
2625 String intentInstanceLineVar = mLocation .getTree ().getChild (1 ).getChild (0 ).toString ();
27- //
28- // int contextInstanceLine = -1;
29- // String contextInstanceLineVar = mLocation.getTree().getChild(1).getChild(1).toString();
30- //
31- // int classComponentLine = -1;
32- //
33- // String classComponentLineVar = mLocation.getTree().getChild(1).getChild(2).toString();
34- // int actualChild = mLocation.getTree().getChildIndex();
35- // while(actualChild>0 && (intentInstanceLine == -1 || contextInstanceLine == -1 || classComponentLine == -1)) {
36- // CommonTree temp = (CommonTree) hijos.get(actualChild);
37- // List<CommonTree> hijoss = (List<CommonTree>) temp.getChildren();
38- // if(temp.getType()==142
39- // && hijoss.get(0).getText().equals("const-class")
40- // && hijoss.get(1).getText().equals(classComponentLineVar)){
41- // classComponentLine = temp.getLine();
42- // } else if(temp.getType()==142
43- // && hijoss.get(0).getText().equals("new-instance")
44- // && hijoss.get(1).getText().equals(intentInstanceLineVar)){
45- // intentInstanceLine = temp.getLine();
46- // } else if(temp.getType()==148
47- // && hijoss.get(0).getText().equals("iget-object")
48- // && hijoss.get(1).getText().equals(contextInstanceLineVar)) {
49- // contextInstanceLine = temp.getLine();
50- // }
51- //
52- // actualChild--;
53- // }
5426
5527 List <String > newLines = new ArrayList <String >();
5628 List <String > lines = FileHelper .readLines (location .getFilePath ());
@@ -64,22 +36,6 @@ public boolean performMutation(MutationLocation location, BufferedWriter writer,
6436
6537 //Apply mutation
6638 newLines .add (" const/4 " +intentInstanceLineVar +", 0x0" );
67- // String linesToConsider = "";
68- // boolean newLineFlag = false;
69- // for(int i = location.getStartLine(); i <= location.getEndLine(); i++){
70- // if(newLineFlag){
71- // linesToConsider += " "+lines.get(i);
72- // } else {
73- // linesToConsider += lines.get(i);
74- // newLineFlag = true;
75- // }
76- // }
77- //
78- // String sub1 = linesToConsider.substring(0, location.getStartColumn());
79- // String sub2 = linesToConsider.substring(location.getEndColumn());
80- //
81- // String mutatedLine = sub1 + "null" + sub2;
82- // newLines.add(mutatedLine);
8339
8440
8541 //Add lines after the MutationLocation
0 commit comments