diff --git a/ML verify debug.launch b/ML verify debug.launch new file mode 100644 index 000000000..de0d33fdc --- /dev/null +++ b/ML verify debug.launch @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/com.ibm.wala.cast.python.jython3/source/com/ibm/wala/cast/python/parser/PythonModuleParser.java b/com.ibm.wala.cast.python.jython3/source/com/ibm/wala/cast/python/parser/PythonModuleParser.java index 6c1d3bac1..1356ab4de 100644 --- a/com.ibm.wala.cast.python.jython3/source/com/ibm/wala/cast/python/parser/PythonModuleParser.java +++ b/com.ibm.wala.cast.python.jython3/source/com/ibm/wala/cast/python/parser/PythonModuleParser.java @@ -66,18 +66,16 @@ public CAstNode visitImportFrom(ImportFrom importFrom) throws Exception { Optional s = importFrom.getInternalModuleNames().stream() .map(Name::getInternalId) - .reduce( - (a, b) -> { - return a + "/" + b; - }); + .reduce((a, b) -> a + "/" + b); + if (s.isPresent()) { String moduleName = s.get(); LOGGER.finer("Module name from " + importFrom + " is: " + moduleName + "."); if (!isLocalModule(moduleName)) { - LOGGER.finer("Module: " + moduleName + ".py" + " isn't local."); + LOGGER.finer("Module: " + moduleName + " isn't local."); moduleName = s.get() + "/__init__"; - } else LOGGER.finer("Module: " + moduleName + ".py" + " is local."); + } else LOGGER.finer("Module: " + moduleName + " is local."); LOGGER.finer("Module name from " + importFrom + " is: " + moduleName + "."); diff --git a/com.ibm.wala.cast.python/source/com/ibm/wala/cast/python/ir/PythonCAstToIRTranslator.java b/com.ibm.wala.cast.python/source/com/ibm/wala/cast/python/ir/PythonCAstToIRTranslator.java index 106624e01..1bbfdfa23 100644 --- a/com.ibm.wala.cast.python/source/com/ibm/wala/cast/python/ir/PythonCAstToIRTranslator.java +++ b/com.ibm.wala.cast.python/source/com/ibm/wala/cast/python/ir/PythonCAstToIRTranslator.java @@ -66,7 +66,7 @@ public class PythonCAstToIRTranslator extends AstTranslator { - private static final Logger logger = Logger.getLogger(PythonCAstToIRTranslator.class.getName()); + private static final Logger LOGGER = Logger.getLogger(PythonCAstToIRTranslator.class.getName()); private final Map walaTypeNames = HashMapFactory.make(); private final Set> globalDeclSet = new HashSet<>(); @@ -696,7 +696,7 @@ protected void doCall( ((CAstControlFlowRecorder) context.getControlFlow()).map(call, call); if (context.getControlFlow().getTargetLabels(call).isEmpty()) { - logger.fine(() -> "no exceptions for " + CAstPrinter.print(call)); + LOGGER.fine(() -> "no exceptions for " + CAstPrinter.print(call)); context.cfg().addPreEdgeToExit(call, true); } else { context