Remove ClassHierarchy.resolveMethod() calls whose results are unused

I'm grouping these together in a single commit in case these calls are
actually wanted for side effects.
This commit is contained in:
Ben Liblit 2017-05-12 15:07:59 +02:00 committed by Manu Sridharan
parent 214e0caa86
commit 2e503a17a2
1 changed files with 0 additions and 14 deletions

View File

@ -22,7 +22,6 @@ import com.ibm.wala.cfg.exc.NullPointerAnalysis;
import com.ibm.wala.cfg.exc.intra.IntraprocNullPointerAnalysis;
import com.ibm.wala.classLoader.ClassLoaderFactory;
import com.ibm.wala.classLoader.ClassLoaderFactoryImpl;
import com.ibm.wala.classLoader.IMethod;
import com.ibm.wala.core.tests.callGraph.CallGraphTestUtil;
import com.ibm.wala.core.tests.util.TestConstants;
import com.ibm.wala.core.tests.util.WalaTestCase;
@ -100,7 +99,6 @@ public class NullPointerExceptionInterTest extends WalaTestCase {
public void testIfException() throws UnsoundGraphException, CancelException, WalaException {
MethodReference mr = StringStuff.makeMethodReference("cfg.exc.inter.CallFieldAccess.callIfException()Lcfg/exc/intra/B");
IMethod m = cha.resolveMethod(mr);
IR ir = cache.getIR(m);
InterprocAnalysisResult<SSAInstruction, IExplodedBasicBlock> interExplodedCFG =
NullPointerAnalysis.computeInterprocAnalysis(cg, new NullProgressMonitor());
@ -117,8 +115,6 @@ public class NullPointerExceptionInterTest extends WalaTestCase {
public void testDynamicIfException() throws UnsoundGraphException, CancelException, WalaException {
MethodReference mr = StringStuff.makeMethodReference("cfg.exc.inter.CallFieldAccess.callDynamicIfException()Lcfg/exc/intra/B");
IMethod m = cha.resolveMethod(mr);
Assert.assertEquals(1, cg.getNodes(mr).size());
final CGNode callNode = cg.getNodes(mr).iterator().next();
@ -137,7 +133,6 @@ public class NullPointerExceptionInterTest extends WalaTestCase {
public void testIfNoException() throws UnsoundGraphException, CancelException, WalaException {
MethodReference mr = StringStuff.makeMethodReference("cfg.exc.inter.CallFieldAccess.callIfNoException()Lcfg/exc/intra/B");
IMethod m = cha.resolveMethod(mr);
IR ir = cache.getIR(m);
InterprocAnalysisResult<SSAInstruction, IExplodedBasicBlock> interExplodedCFG =
NullPointerAnalysis.computeInterprocAnalysis(cg, new NullProgressMonitor());
@ -153,7 +148,6 @@ public class NullPointerExceptionInterTest extends WalaTestCase {
public void testDynamicIfNoException() throws UnsoundGraphException, CancelException, WalaException {
MethodReference mr = StringStuff.makeMethodReference("cfg.exc.inter.CallFieldAccess.callDynamicIfNoException()Lcfg/exc/intra/B");
IMethod m = cha.resolveMethod(mr);
IR ir = cache.getIR(m);
InterprocAnalysisResult<SSAInstruction, IExplodedBasicBlock> interExplodedCFG =
NullPointerAnalysis.computeInterprocAnalysis(cg, new NullProgressMonitor());
@ -169,7 +163,6 @@ public class NullPointerExceptionInterTest extends WalaTestCase {
public void testIf2Exception() throws UnsoundGraphException, CancelException, WalaException {
MethodReference mr = StringStuff.makeMethodReference("cfg.exc.inter.CallFieldAccess.callIf2Exception()Lcfg/exc/intra/B");
IMethod m = cha.resolveMethod(mr);
IR ir = cache.getIR(m);
InterprocAnalysisResult<SSAInstruction, IExplodedBasicBlock> interExplodedCFG =
NullPointerAnalysis.computeInterprocAnalysis(cg, new NullProgressMonitor());
@ -186,8 +179,6 @@ public class NullPointerExceptionInterTest extends WalaTestCase {
public void testDynamicIf2Exception() throws UnsoundGraphException, CancelException, WalaException {
MethodReference mr = StringStuff.makeMethodReference("cfg.exc.inter.CallFieldAccess.callDynamicIf2Exception()Lcfg/exc/intra/B");
IMethod m = cha.resolveMethod(mr);
Assert.assertEquals(1, cg.getNodes(mr).size());
final CGNode callNode = cg.getNodes(mr).iterator().next();
@ -206,7 +197,6 @@ public class NullPointerExceptionInterTest extends WalaTestCase {
public void testIf2NoException() throws UnsoundGraphException, CancelException, WalaException {
MethodReference mr = StringStuff.makeMethodReference("cfg.exc.inter.CallFieldAccess.callIf2NoException()Lcfg/exc/intra/B");
IMethod m = cha.resolveMethod(mr);
IR ir = cache.getIR(m);
InterprocAnalysisResult<SSAInstruction, IExplodedBasicBlock> interExplodedCFG =
NullPointerAnalysis.computeInterprocAnalysis(cg, new NullProgressMonitor());
@ -222,7 +212,6 @@ public class NullPointerExceptionInterTest extends WalaTestCase {
public void testDynamicIf2NoException() throws UnsoundGraphException, CancelException, WalaException {
MethodReference mr = StringStuff.makeMethodReference("cfg.exc.inter.CallFieldAccess.callDynamicIf2NoException()Lcfg/exc/intra/B");
IMethod m = cha.resolveMethod(mr);
IR ir = cache.getIR(m);
InterprocAnalysisResult<SSAInstruction, IExplodedBasicBlock> interExplodedCFG =
NullPointerAnalysis.computeInterprocAnalysis(cg, new NullProgressMonitor());
@ -239,7 +228,6 @@ public class NullPointerExceptionInterTest extends WalaTestCase {
public void testGetException() throws UnsoundGraphException, CancelException, WalaException {
MethodReference mr = StringStuff.makeMethodReference("cfg.exc.inter.CallFieldAccess.callGetException()Lcfg/exc/intra/B");
IMethod m = cha.resolveMethod(mr);
IR ir = cache.getIR(m);
InterprocAnalysisResult<SSAInstruction, IExplodedBasicBlock> interExplodedCFG =
NullPointerAnalysis.computeInterprocAnalysis(cg, new NullProgressMonitor());
@ -256,8 +244,6 @@ public class NullPointerExceptionInterTest extends WalaTestCase {
public void testDynamicGetException() throws UnsoundGraphException, CancelException, WalaException {
MethodReference mr = StringStuff.makeMethodReference("cfg.exc.inter.CallFieldAccess.callDynamicGetException()Lcfg/exc/intra/B");
IMethod m = cha.resolveMethod(mr);
Assert.assertEquals(1, cg.getNodes(mr).size());
final CGNode callNode = cg.getNodes(mr).iterator().next();