private void createValues(Set<TypeReference> exceptions) { TypeReference[] exceptionsArray = new TypeReference[exceptions.size()]; exceptions.toArray(exceptionsArray); values = new ObjectArrayMapping<>(exceptionsArray); }
private static OrdinalSetMapping<Statement> createStatementDomain(Collection<Statement> statements) { Statement[] arr = new Statement[statements.size()]; OrdinalSetMapping<Statement> domain = new ObjectArrayMapping<>(statements.toArray(arr)); return domain; }
private static OrdinalSetMapping<Statement> createStatementDomain(Collection<Statement> statements) { Statement[] arr = new Statement[statements.size()]; OrdinalSetMapping<Statement> domain = new ObjectArrayMapping<>(statements.toArray(arr)); return domain; }
private void createValues(Set<TypeReference> exceptions) { TypeReference[] exceptionsArray = new TypeReference[exceptions.size()]; exceptions.toArray(exceptionsArray); values = new ObjectArrayMapping<>(exceptionsArray); }
/** * generate a numbering of the putstatic instructions */ private OrdinalSetMapping<Integer> numberPutStatics() { ArrayList<Integer> putInstrs = new ArrayList<>(); IR ir = ecfg.getIR(); SSAInstruction[] instructions = ir.getInstructions(); for (int i = 0; i < instructions.length; i++) { SSAInstruction instruction = instructions[i]; if (instruction instanceof SSAPutInstruction && ((SSAPutInstruction) instruction).isStatic()) { SSAPutInstruction putInstr = (SSAPutInstruction) instruction; // instrNum is the number that will be assigned to this putstatic int instrNum = putInstrs.size(); putInstrs.add(i); // also update the mapping of static fields to def'ing statements IField field = cha.resolveField(putInstr.getDeclaredField()); assert field != null; BitVector bv = staticField2DefStatements.get(field); if (bv == null) { bv = new BitVector(); staticField2DefStatements.put(field, bv); } bv.set(instrNum); } } return new ObjectArrayMapping<>(putInstrs.toArray(new Integer[0])); }
return new ObjectArrayMapping<>(putInstrs.toArray(new Pair[0]));
AstMethod astMethod = (AstMethod)method; DefUse du = new DefUse(ir); OrdinalSetMapping<SSAInstruction> instrIndices = new ObjectArrayMapping<>(ir.getInstructions()); CorrelationSummary summary = new CorrelationSummary(method, instrIndices);
AstMethod astMethod = (AstMethod)method; DefUse du = new DefUse(ir); OrdinalSetMapping<SSAInstruction> instrIndices = new ObjectArrayMapping<>(ir.getInstructions()); CorrelationSummary summary = new CorrelationSummary(method, instrIndices);