public void setDebugVarNames(Map<Integer, String> mapDebugVarNames) { if (varVersions == null) { return; } Map<Integer, Integer> mapOriginalVarIndices = varVersions.getMapOriginalVarIndices(); List<VarVersionPair> listVars = new ArrayList<>(mapVarNames.keySet()); listVars.sort(Comparator.comparingInt(o -> o.var)); Map<String, Integer> mapNames = new HashMap<>(); for (VarVersionPair pair : listVars) { String name = mapVarNames.get(pair); Integer index = mapOriginalVarIndices.get(pair.var); if (index != null) { String debugName = mapDebugVarNames.get(index); if (debugName != null && TextUtil.isValidIdentifier(debugName, method.getClassStruct().getBytecodeVersion())) { name = debugName; } } Integer counter = mapNames.get(name); mapNames.put(name, counter == null ? counter = 0 : ++counter); if (counter > 0) { name += String.valueOf(counter); } mapVarNames.put(pair, name); } }
private void removeJsr(StructMethod mt) { removeJsrInstructions(mt.getClassStruct().getPool(), first, DataPoint.getInitialDataPoint(mt)); }
public String getDebugName(StructMethod method) { StructLocalVariableTableAttribute attr = method.getLocalVariableAttr(); if (attr != null && processor != null) { Integer origIndex = processor.getVarOriginalIndex(index); if (origIndex != null) { String name = attr.getName(origIndex, visibleOffset); if (name != null && TextUtil.isValidIdentifier(name, method.getClassStruct().getBytecodeVersion())) { return name; } } } return null; }
private boolean processStatementEx(StructMethod mt, RootStatement root, ControlFlowGraph graph) { int bytecode_version = mt.getClassStruct().getBytecodeVersion();
proc.processStatement(root, mt.getClassStruct());
public byte[] loadBytecode(StructMethod mt, int codeFullLength) { String className = mt.getClassStruct().qualifiedName; in.discard(8); ConstantPool pool = mt.getClassStruct().getPool(); if (pool == null) { pool = new ConstantPool(in);
public static RootStatement codeToJava(StructMethod mt, MethodDescriptor md, VarProcessor varProc) throws IOException { StructClass cl = mt.getClassStruct();
public void setDebugVarNames(Map<Integer, String> mapDebugVarNames) { if (varVersions == null) { return; } Map<Integer, Integer> mapOriginalVarIndices = varVersions.getMapOriginalVarIndices(); List<VarVersionPair> listVars = new ArrayList<>(mapVarNames.keySet()); Collections.sort(listVars, Comparator.comparingInt(o -> o.var)); Map<String, Integer> mapNames = new HashMap<>(); for (VarVersionPair pair : listVars) { String name = mapVarNames.get(pair); Integer index = mapOriginalVarIndices.get(pair.var); if (index != null) { String debugName = mapDebugVarNames.get(index); if (debugName != null && TextUtil.isValidIdentifier(debugName, method.getClassStruct().getBytecodeVersion())) { name = debugName; } } Integer counter = mapNames.get(name); mapNames.put(name, counter == null ? counter = 0 : ++counter); if (counter > 0) { name += String.valueOf(counter); } mapVarNames.put(pair, name); } }
private void removeJsr(StructMethod mt) { removeJsrInstructions(mt.getClassStruct().getPool(), first, DataPoint.getInitialDataPoint(mt)); }
public String getDebugName(StructMethod method) { StructLocalVariableTableAttribute attr = method.getLocalVariableAttr(); if (attr != null && processor != null) { Integer origIndex = processor.getVarOriginalIndex(index); if (origIndex != null) { String name = attr.getName(origIndex, visibleOffset); if (name != null && TextUtil.isValidIdentifier(name, method.getClassStruct().getBytecodeVersion())) { return name; } } } return null; }
private boolean processStatementEx(StructMethod mt, RootStatement root, ControlFlowGraph graph) { int bytecode_version = mt.getClassStruct().getBytecodeVersion();
proc.processStatement(root, mt.getClassStruct());
public byte[] loadBytecode(StructMethod mt, int codeFullLength) { String className = mt.getClassStruct().qualifiedName; in.discard(8); ConstantPool pool = mt.getClassStruct().getPool(); if (pool == null) { pool = new ConstantPool(in);
public static RootStatement codeToJava(StructMethod mt, MethodDescriptor md, VarProcessor varProc) throws IOException { StructClass cl = mt.getClassStruct();