diff --git a/org.ntlab.reverseDebugger/src/org/ntlab/reverseDebugger/analyzerProvider/ReverseDebuggerAnalyzer.java b/org.ntlab.reverseDebugger/src/org/ntlab/reverseDebugger/analyzerProvider/ReverseDebuggerAnalyzer.java index 089bec6..db2350a 100644 --- a/org.ntlab.reverseDebugger/src/org/ntlab/reverseDebugger/analyzerProvider/ReverseDebuggerAnalyzer.java +++ b/org.ntlab.reverseDebugger/src/org/ntlab/reverseDebugger/analyzerProvider/ReverseDebuggerAnalyzer.java @@ -20,7 +20,7 @@ public class ReverseDebuggerAnalyzer { public static ArrayList findAllSeedAliases(MethodExecution me) { - ArrayList startAliasList = new ArrayList<>(); + ArrayList seedAliasList = new ArrayList<>(); List statements = me.getStatements(); String[] primitives = {"byte", "short", "int", "long", "float", "double", "char", "boolean"}; List primitiveList = Arrays.asList(primitives); @@ -31,64 +31,64 @@ FieldAccess fa = (FieldAccess)statement; String objId = fa.getContainerObjId(); if (objId != null && !(objId.equals("0")) && !(primitiveList.contains(fa.getContainerClassName()))) { - startAliasList.add(new Alias(objId, tp, Alias.OCCURRENCE_EXP_CONTAINER)); + seedAliasList.add(new Alias(objId, tp, Alias.OCCURRENCE_EXP_CONTAINER)); } objId = fa.getValueObjId(); if (objId != null && !(objId.equals("0")) && !(primitiveList.contains(fa.getValueClassName()))) { - startAliasList.add(new Alias(objId, tp, Alias.OCCURRENCE_EXP_FIELD)); + seedAliasList.add(new Alias(objId, tp, Alias.OCCURRENCE_EXP_FIELD)); } } else if (statement instanceof FieldUpdate) { FieldUpdate fu = (FieldUpdate)statement; String objId = fu.getContainerObjId(); if (objId != null && !(objId.equals("0")) && !(primitiveList.contains(fu.getContainerClassName()))) { - startAliasList.add(new Alias(objId, tp, Alias.OCCURRENCE_EXP_CONTAINER)); + seedAliasList.add(new Alias(objId, tp, Alias.OCCURRENCE_EXP_CONTAINER)); } objId = fu.getValueObjId(); if (objId != null && !(objId.equals("0")) && !(primitiveList.contains(fu.getValueClassName()))) { - startAliasList.add(new Alias(objId, tp, Alias.OCCURRENCE_EXP_FIELD)); + seedAliasList.add(new Alias(objId, tp, Alias.OCCURRENCE_EXP_FIELD)); } } else if (statement instanceof ArrayAccess) { ArrayAccess aa = (ArrayAccess)statement; String valueObjId = aa.getValueObjectId(); if (valueObjId != null && !(valueObjId.equals("0")) && !(primitiveList.contains(aa.getValueClassName()))) { - startAliasList.add(new Alias(valueObjId, tp, Alias.OCCURRENCE_EXP_ARRAY)); + seedAliasList.add(new Alias(valueObjId, tp, Alias.OCCURRENCE_EXP_ARRAY)); } } else if (statement instanceof ArrayUpdate) { ArrayUpdate au = (ArrayUpdate)statement; String valueObjId = au.getValueObjectId(); if (valueObjId != null && !(valueObjId.equals("0")) && !(primitiveList.contains(au.getValueClassName()))) { - startAliasList.add(new Alias(valueObjId, tp, Alias.OCCURRENCE_EXP_ARRAY)); + seedAliasList.add(new Alias(valueObjId, tp, Alias.OCCURRENCE_EXP_ARRAY)); } } else if (statement instanceof ArrayCreate) { ArrayCreate ac = (ArrayCreate)statement; String arrayObjId = ac.getArrayObjectId(); if (arrayObjId != null && !(arrayObjId.equals("0")) && !(primitiveList.contains(ac.getArrayClassName()))) { - startAliasList.add(new Alias(arrayObjId, tp, Alias.OCCURRENCE_EXP_RETURN)); + seedAliasList.add(new Alias(arrayObjId, tp, Alias.OCCURRENCE_EXP_RETURN)); } } else if (statement instanceof MethodInvocation) { MethodExecution calledMe = ((MethodInvocation)statement).getCalledMethodExecution(); String thisObjId = calledMe.getThisObjId(); if (thisObjId != null && !(thisObjId.equals("0"))) { - startAliasList.add(new Alias(thisObjId, tp, Alias.OCCURRENCE_EXP_RECEIVER)); + seedAliasList.add(new Alias(thisObjId, tp, Alias.OCCURRENCE_EXP_RECEIVER)); } List args = calledMe.getArguments(); for (int j = 0; j < args.size(); j++) { ObjectReference arg = args.get(j); String argValueId = arg.getId(); if (argValueId != null && !(argValueId.equals("0")) && !(primitiveList.contains(arg.getActualType()))) { - startAliasList.add(new Alias(argValueId, tp, (j + Alias.OCCURRENCE_EXP_FIRST_ARG))); + seedAliasList.add(new Alias(argValueId, tp, (j + Alias.OCCURRENCE_EXP_FIRST_ARG))); } } ObjectReference returnValue = calledMe.getReturnValue(); if (returnValue != null) { String returnValueId = returnValue.getId(); if (returnValueId != null && !(returnValueId.equals("0") && !(primitiveList.contains(returnValue.getActualType())))) { - startAliasList.add(new Alias(returnValueId, tp, Alias.OCCURRENCE_EXP_RETURN)); + seedAliasList.add(new Alias(returnValueId, tp, Alias.OCCURRENCE_EXP_RETURN)); } } } } - return startAliasList; + return seedAliasList; } private static TracePoint getRecentlyFieldUpdate(TracePoint tp) {