Skip to content

Commit

Permalink
docs(spgroup#31): translate comments
Browse files Browse the repository at this point in the history
  • Loading branch information
barbosamaatheus committed Dec 22, 2020
1 parent dc45744 commit a2ccfa0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,15 +99,15 @@ private void runAnalyzeWithBaseUnit(SootMethod sm, List<SootMethod> traversed, S

private void runAnalyze(SootMethod sm, List<SootMethod> traversed, Statement.Type changeTag, Unit unit, boolean tagged) {
if (unit instanceof AssignStmt) {
// TODO Verificar AssignStmt contem objetos, arrays ou outros tipos?
// TODO Does AssignStmt check contain objects, arrays or other types?
AssignStmt assignStmt = (AssignStmt) unit;

// TODO Verificar caso: x = foo() + foo()
// TODO Check case: x = foo() + foo
if (assignStmt.containsInvokeExpr()) {
traverse(assignStmt.getInvokeExpr().getMethod(), traversed, changeTag);
}

// TODO renomear Statement. (UnitWithExtraInformations)
// TODO rename Statement. (UnitWithExtraInformations)
Statement stmt = getStatementAssociatedWithUnit(sm, unit, changeTag);

if (tagged) {
Expand All @@ -116,11 +116,10 @@ private void runAnalyze(SootMethod sm, List<SootMethod> traversed, Statement.Typ
kill(unit);
}

// TODO Verificar tratamento em caso de for
// TODO Check treatment in case 'for'
} else if (unit instanceof InvokeStmt) {
InvokeStmt invokeStmt = (InvokeStmt) unit;
Statement stmt = getStatementAssociatedWithUnit(sm, unit, changeTag);
// TODO trocar stmt.getType() por changeTag
traverse(invokeStmt.getInvokeExpr().getMethod(), traversed, stmt.getType());
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@ public class OverridingAssignmentClassFieldConflictInterProceduralSample {

public void m() {
x = 0; // LEFT
foo(); // RIGHT
x = foo() + bar(); // RIGHT
}

private void foo() {
x = 1;
private int foo() {
return 1;
}

private int bar() {
return 1;
}

}

0 comments on commit a2ccfa0

Please sign in to comment.