From a2ccfa048533f48197aef2c92813d9d93f4446ba Mon Sep 17 00:00:00 2001 From: Barbosa Date: Tue, 22 Dec 2020 15:48:07 -0300 Subject: [PATCH] docs(#31): translate comments --- .../analysis/ioa/InterproceduralOverrideAssignment.java | 9 ++++----- ...ssignmentClassFieldConflictInterProceduralSample.java | 9 ++++++--- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/main/java/br/unb/cic/analysis/ioa/InterproceduralOverrideAssignment.java b/src/main/java/br/unb/cic/analysis/ioa/InterproceduralOverrideAssignment.java index bf553743..e0e8c2e9 100644 --- a/src/main/java/br/unb/cic/analysis/ioa/InterproceduralOverrideAssignment.java +++ b/src/main/java/br/unb/cic/analysis/ioa/InterproceduralOverrideAssignment.java @@ -99,15 +99,15 @@ private void runAnalyzeWithBaseUnit(SootMethod sm, List traversed, S private void runAnalyze(SootMethod sm, List 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) { @@ -116,11 +116,10 @@ private void runAnalyze(SootMethod sm, List 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()); } } diff --git a/src/test/java/br/unb/cic/analysis/samples/OverridingAssignmentClassFieldConflictInterProceduralSample.java b/src/test/java/br/unb/cic/analysis/samples/OverridingAssignmentClassFieldConflictInterProceduralSample.java index 148a63f4..e4374b35 100644 --- a/src/test/java/br/unb/cic/analysis/samples/OverridingAssignmentClassFieldConflictInterProceduralSample.java +++ b/src/test/java/br/unb/cic/analysis/samples/OverridingAssignmentClassFieldConflictInterProceduralSample.java @@ -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; + } } \ No newline at end of file