dead-code Questions
1
This question is a kind of followup to eliminate unused virtual functions, which does not go deep enough for my interest.
The problem: When defining classes that have virtual functions, the compil...
Gilbye asked 3/6, 2015 at 10:14
9
Solved
I've been through a few questions over the network about this subject but I didn't find any answer for my question, or it's for another language or it doesn't answer totally (dead code is not usele...
Fie asked 24/6, 2015 at 12:49
1
Solved
I'm writing a program that is supposed to solve a sudoko-like puzzle, Hashiwokakero. I have some code that looks like this:
if (bridgesLeft[row][col] == 1)
{
doSomething();
}
else if (bridgesLeft...
Glassful asked 20/3, 2015 at 22:20
3
Solved
Performance is important for a certain class I'm writing.
I thought about calling a function like so:
debug('This is a debug message, only visible when debugging is on');
And the contents would...
Ruckman asked 12/9, 2014 at 9:16
2
Does anyone know of a tool for detecting dead code in a Java EE project?
I've looked into lots of tools that do this well for pure Java projects, but nothing seems to really handle projects which ...
Epigeous asked 10/8, 2011 at 19:58
2
Solved
As discussed here, javac and other Java compilers may provide code elimination capabilities for if-statements where the condition is a "Constant Expression".
How is this affected if my code uses a...
Orbit asked 22/5, 2014 at 21:2
0
My iOS project uses dlsym to dynamically point to an optional C library. Optional as-in the project can run with our without it, it just adds features.
For background info: Detect and use optional...
Arithmomancy asked 1/5, 2014 at 9:32
6
How can you tell if a PL/SQL Package, Procedure, or Function is being used? Is there an Oracle table or view that contains statistics on PL/SQL Package, Procedure, or Function usage?
Halfbaked asked 12/1, 2011 at 14:55
4
Solved
The following code gives me a 'Dead Code' warning in Eclipse:
private void add(Node<E> n, E element) {
Node<E> e = new Node<E>(element);
if (n == null)
root = e;
else if (n.c...
3
Solved
Would someone please tell me why i am getting a dead code warning in the else branch of if (projectId != null) ? If i got this right, the interpreter thinks projectId can never be null - is that ri...
4
Solved
I'm having a hard time finding information about javac's code elimination capabilities:
I read that if you have something like the following, the if-statement will be eliminated:
static final b...
Chitin asked 31/7, 2013 at 8:42
4
Solved
I just installed the Unnecessary Code Detector for Eclipse and ran it on my project. I see a lot of so-called "dead code". Although, from an organizational standpoint, it makes sense to remove dead...
Polymer asked 29/4, 2013 at 14:23
1
Solved
What is a good way to find methods in a that are not being called anymore? I'm in the process of refactoring a large Rails application and the worst thing you can find is code that is not being use...
Theodoratheodore asked 20/12, 2012 at 20:19
2
Solved
This code keeps giving me a dead code warning on the i++ in the for loop and it is not incrementing the i for some reason!
import java.util.Scanner;
public class HideThatNumber {
/**
* @param...
1
Solved
I have this function with some dead code, marked by Eclipse.
I have two lines that check a & b. Lines that check b are marked as null.
public int[] runThis(List<Integer> buildIds, List...
7
Solved
Finding dead code in Delphi is usually real simple: just compile and then scan for routines missing their blue dots. The smart linker's very good about tracking them down, most of the time.
Proble...
Originally asked 26/3, 2009 at 21:11
2
I am trying to remove unused functions from my project. Since it has thousands of lines, this takes forever.
Code coverage tools may suggest functions that are not used in a given test case,...
Jordonjorey asked 18/7, 2011 at 8:31
3
Solved
We have a product with ~15 solutions with each a number of projects.
The question is quite simple: Which tool will enable us to search the entire codebase for dead code?
Searching within a singl...
Sophocles asked 25/5, 2011 at 8:26
2
Solved
For testing purposes, I often start typing some code in an already existing project. So, my code I want to test comes before all the other code, like this:
public static void main(String[] args)
{...
Farina asked 8/3, 2011 at 9:43
2
I am curious if there are any tools that provide partial solutions for this. It is a tricky problem because of performSelector . . . but a tool ought to at least be able to come up with candidates,...
Alfonso asked 21/1, 2011 at 21:32
3
Solved
I'd like to know how Java would handle the following scenario:
Suppose I have a class called Debug, which looks like this:
public class Debug
{
private static final boolean isAssertEnabled = tr...
Freewheeling asked 21/1, 2011 at 7:38
8
Are there any tools that can determine if a function/procedure/method/entire class is used?
I've seen tools that can help a knowledgeable developer track down unused fragments of code (most are f...
2
Solved
I was looking for a way of finding statically unreachable functions in a (very) big C++ project. I had tried using doxygen and other static analysis tools suggested here but it seemed that the proj...
3
I am concerned that some of the classes in my app have methods that are defined but not called anywhere in the app.
In Eclipse is there a way to find these methods?
Sandstorm asked 3/11, 2010 at 19:49
8
Solved
How would you go about dead code detection in C/C++ code? I have a pretty large code base to work with and at least 10-15% is dead code. Is there any Unix based tool to identify this areas? S...
Uniocular asked 23/10, 2008 at 9:18
© 2022 - 2024 — McMap. All rights reserved.