Click here to Skip to main content
15,893,790 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Java
import java.io.FileNotFoundException;
import com.graph.internal.NodeNotFoundException;
import java.io.IOException;
import java.util.Iterator;

import org.objectweb.asm.tree.analysis.AnalyzerException;

import com.graph.element.Node;
import com.graph.pdg.ProceduralDependenceGraphMatrix;
import com.graph.internal.*;


this is my program and i call some package program.


Java
public class A {

    public static void main(String[] args) throws FileNotFoundException, IOException, AnalyzerException,NodeNotFoundException 

{
  
ProceduralDependenceGraphMatrix lvPDG =  new ProceduralDependenceGraphMatrix.getPDGByMethodSignature("C:\\Program Files\\Java\\jdk1.7.0\\bin\\My\\fact.class","fact","I()");
Iterator<Node> lvIterator =lvPDG.controlDependenceBFSIterator();
    while (lvIterator.hasNext()) {
        Node lvNode = lvIterator.next();

    }
    }

}


and package program

Java
package com.graph.pdg;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.math.BigInteger;
import java.util.Arrays;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;

import org.objectweb.asm.ClassReader;
import org.objectweb.asm.tree.MethodNode;
import org.objectweb.asm.tree.analysis.AnalyzerException;

import com.asm.internal.ConstructGraphClassAdapter;
import com.asm.internal.EmptyClassVisitor;
import com.graph.AbstractAdjacentMatrix;
import com.graph.Graph;
import com.graph.Iterator.ControlDependenceBFSIterator;
import com.graph.Iterator.ControlDependenceDFSIterator;
import com.graph.Iterator.DataDependenceDFSIterator;
import com.graph.element.Node;
import com.graph.internal.MethodCallerGraph;
import com.graph.internal.MethodDependenceGraph;
import com.util.StringUtils;
import com.util.Utils;

/** 
 * <code>ProceduralDependenceGraphMatrix</code> is a final procedural dependence graph representation format.
 * <p>
 * It generates the memory usage is efficient because of the adjacent matrix implementation is used.
 * The conversion of <code>MethodDependenceGraph</code> will become <code>ProceduralDependenceGraphMatrix</code>
 *
 * @version $Revision: 1.0 $ $Date: 2010/04/02
 * 
 * @author Tong Chun Yin
 * @author Lok Lee
 * @author Marco Chan
 */


public class ProceduralDependenceGraphMatrix extends AbstractAdjacentMatrix implements Graph{
	
	//Actual in node
	private int [] mvActualInNodeIndex; 
	private int mvActualOutNodeIndex ;

	//Information (for martix 00 mean nothing , 01 mean data dependence, 10 mean control dependence, 11 mean both ) in binary 
	
	//Flag
	private Node mvExpandingNode = null;	//for a flag of expanding the call node

	//temp structure
	private Map<string,> mvIndexNodeMap = new HashMap<string,>();
	
	//name
	private String mvOwner = null;
	private String mvName = null;
	private String mvDesc = null;
	
	private class NodeCompartor implements Comparator<node>{

		public int compare(Node pObject1, Node pObject2){
			int lvObject1Index = pObject1.getIndex();
			int lvObject2Index = pObject2.getIndex();

			if( lvObject1Index > lvObject2Index )
				return 1;

			else if( lvObject1Index < lvObject2Index )
				return -1;
			else
				return 0;
		}
	}
	
	/** 
	 * A static method for getting a PDG by method signature
	 * 
	 * @param pClassFile A class file location path
	 * @param pName method's method name
	 * @param pDesc method's method description
	 * @throws IOException if the class file is not accessible
	 * @throws FileNotFoundException if the class file path is wrong
	 * @throws AnalyzerException if any analysis error occur
	 * @return <code>ProceduralDependenceGraphMatrix</code> A PDG object, null if method not found in the class file
	*/
	
	public static ProceduralDependenceGraphMatrix getPDGByMethodSignature(String pClassFile, String pName, String pDesc) throws FileNotFoundException, IOException, AnalyzerException {
        
		if(pClassFile == null || pName == null || pDesc == null) {
			return null;
		}
		
        ClassReader lvClassReader = new ClassReader (new FileInputStream(pClassFile));		
        ConstructGraphClassAdapter lvConstructGraphClassAdapter = new ConstructGraphClassAdapter(new EmptyClassVisitor(), null);
        
        lvClassReader.accept(lvConstructGraphClassAdapter, ClassReader.EXPAND_FRAMES);
        
        for(int i = 0 ; i < lvConstructGraphClassAdapter.getMethodNodeList().toArray().length ; i++ ) {
        	MethodNode lvMethodNode = lvConstructGraphClassAdapter.getMethodNodeList().get(i);
        
        	if(lvMethodNode.name.equals(pName) && lvMethodNode.desc.equals(pDesc)) {
        		ProceduralDependenceGraphMatrix lvProceduralDependenceGraphMatrix = lvConstructGraphClassAdapter.getPDGByMethodNode
        		( (MethodNode)lvConstructGraphClassAdapter.getMethodNodeList().toArray()[i]);
        		
        		return lvProceduralDependenceGraphMatrix;
        	}
        	
        }

        return null;
	}

	/** 
	 * An internal constructor. Use for conversing <code>MethodDependenceGraph</code> to <code>ProceduralDependenceGraphMatrix</code>
	 * 
	 * @param pMethodDependenceGraph <code>MethodDependenceGraph</code> object
	 */
	public ProceduralDependenceGraphMatrix(MethodDependenceGraph pMethodDependenceGraph){
		
		//pro process
		mvOwner = pMethodDependenceGraph.getOwner();
		mvName = pMethodDependenceGraph.getName();
		mvDesc = pMethodDependenceGraph.getDesc();
		
		
		//initialize the data structure
		int lvNumberOfNode = countNumberOfNormalNode(pMethodDependenceGraph) + countNumberOfExtraNode(pMethodDependenceGraph);
		int lvNumberOfActualInNode = pMethodDependenceGraph.getActualInVariable().size();
		
		mvActualInNodeIndex = new int[lvNumberOfActualInNode];
		mvNodes = new Node[lvNumberOfNode];
		mvAdjacentMatrix = new int[lvNumberOfNode][lvNumberOfNode];
		
		for(int i = 0; i < mvAdjacentMatrix.length ; i++) {
			for(int j = 0 ; j < mvAdjacentMatrix[i].length ; j++) {
				mvAdjacentMatrix[i][j] = Utils.ZERO;
			}
		}
		
		//push the value in the new data structure
		int lvCounter = 0;
		
		//For Nodes
		Iterator<node> lvNodeList = pMethodDependenceGraph.getNodeList().iterator();
		while(lvNodeList.hasNext()) {
			Node lvNode = lvNodeList.next();
			
			//remove error node
			if(lvNode == null || lvNode.getName() == null) { continue;}
			
			mvNodes[lvCounter++] = lvNode;
		}
		
		//some node locate in caller graph
		addExtraNode(lvCounter, pMethodDependenceGraph);
		
		//sort the node by adding sequence
		Arrays.sort(mvNodes, new NodeCompartor());
		
		//construct a hashmap for get node in fast way
		for(int i  = 0 ; i < mvNodes.length ; i++) {
			mvIndexNodeMap.put(String.valueOf(i), mvNodes[i]);
		}
		
		lvCounter = 0;
		
		//For Actual In/out
		Iterator<node> lvActualInVariable= pMethodDependenceGraph.getActualInVariable().iterator();
		while(lvActualInVariable.hasNext()) {
			Node lvNode = lvActualInVariable.next();
			mvActualInNodeIndex[lvCounter++] = lookForNodeIndexByNode(lvNode);
		}
		
		if(pMethodDependenceGraph.getActualOutVariable() != null) {
			mvActualOutNodeIndex = lookForNodeIndexByNode(pMethodDependenceGraph.getActualOutVariable());	
		}else {
			mvActualOutNodeIndex = Utils.MINUSONE;
		}
		
		lvCounter = 0;
		
		//For real martix
		constructMartix(pMethodDependenceGraph.getDataDependenceMap(), Utils.DATADEPENDENCE);
		constructMartix(pMethodDependenceGraph.getControlDependenceMap(), Utils.CONTROLDEPENDENCE);
		
		
//		printingDependency(Utils.DATADEPENDENCE);
//        printingDependency(Utils.CONTROLDEPENDENCE);
		
		//after construct
		mvIndexNodeMap = null;
	}

	private int countNumberOfNormalNode(MethodDependenceGraph pMethodDependenceGraph) {
		int lvCounter = 0;
		
		for(int i = 0 ; i < pMethodDependenceGraph.getNodeList().size(); i++) {
			if(pMethodDependenceGraph.getNodeList().get(i) != null && pMethodDependenceGraph.getNodeList().get(i).getName() != null) {
				lvCounter++;	
			}
		}
		
		return lvCounter;
	}
	
	private int countNumberOfExtraNode(MethodDependenceGraph pMethodDependenceGraph) {
		
		int lvCounter = 0;
		
		Iterator<node> lvControlDependenceKeyIterator = pMethodDependenceGraph.getControlDependenceMap().keySet().iterator();
		while(lvControlDependenceKeyIterator.hasNext()) {
			Node lvKey = lvControlDependenceKeyIterator.next();
			
			Iterator lvControlDependenceValueIterator = ( (List) pMethodDependenceGraph.getControlDependenceMap().get(lvKey)).iterator();
			while(lvControlDependenceValueIterator.hasNext()) {
				Object lvValue = lvControlDependenceValueIterator.next();
				
				if(lvValue instanceof MethodCallerGraph) {
					MethodCallerGraph lvMethodCallerGraph = (MethodCallerGraph) lvValue;
					
					lvMethodCallerGraph.getFormalInVariable().remove(null);
					
					//Entry + FormalIn + FormalOut
					lvCounter++;
					lvCounter+= lvMethodCallerGraph.getFormalInVariable().size();
					lvCounter+= lvMethodCallerGraph.getFormalOutVariable() == null? Utils.ZERO : Utils.ONE;
				}
				
			}	
		}
		
		return lvCounter;
	}
	
	private void addExtraNode(int pCounter, MethodDependenceGraph pMethodDependenceGraph) {
		
		Iterator<node> lvControlDependenceKeyIterator = pMethodDependenceGraph.getControlDependenceMap().keySet().iterator();
		while(lvControlDependenceKeyIterator.hasNext()) {
			Node lvKey = lvControlDependenceKeyIterator.next();
			
			Iterator lvControlDependenceValueIterator = ( (List) pMethodDependenceGraph.getControlDependenceMap().get(lvKey)).iterator();
			while(lvControlDependenceValueIterator.hasNext()) {
				Object lvValue = lvControlDependenceValueIterator.next();
				
				if(lvValue instanceof MethodCallerGraph) {
					MethodCallerGraph lvMethodCallerGraph = (MethodCallerGraph) lvValue;
					
					//Entry + FormalIn + FormalOut
					if(lvMethodCallerGraph.getEntryNode() != null) {
						mvNodes[pCounter++] = lvMethodCallerGraph.getEntryNode();
					}

					Iterator<node> lvFormalInIterator = lvMethodCallerGraph.getFormalInVariable().iterator();
					while(lvFormalInIterator.hasNext()) {
						Node lvNode = lvFormalInIterator.next();
						if(lvNode != null) {
							mvNodes[pCounter++] = lvNode;				
						}
					}
					
					if(lvMethodCallerGraph.getFormalOutVariable() != null) {
						mvNodes[pCounter++] = lvMethodCallerGraph.getFormalOutVariable();	
					}
					
				}
				
			}	
		}
		
	}
	
	private void constructMartix (Map<node,> pDependenceMap, int pAddValue) {
		Iterator<node> lvKeyIterator = pDependenceMap.keySet().iterator();
		while(lvKeyIterator.hasNext()) {
			Node lvKey = lvKeyIterator.next();
		
			Iterator lvControlDependenceValueIterator = pDependenceMap.get(lvKey).iterator();
			while(lvControlDependenceValueIterator.hasNext()) {
				Object lvValue = lvControlDependenceValueIterator.next();

				if(lvValue instanceof MethodCallerGraph) {
					MethodCallerGraph lvMethodCallerGraph = (MethodCallerGraph) lvValue;
					constructMartix(lvMethodCallerGraph.getControlDependenceMap(), Utils.CONTROLDEPENDENCE);
					constructMartix(lvMethodCallerGraph.getDataDependenceMap(), Utils.DATADEPENDENCE);
				}else {
					//Node
					Node lvToNode = (Node) lvValue;
					addValueInMaxtrix(lvKey , lvToNode, pAddValue);
				}
			}
		}
	}
	
	private void addValueInMaxtrix(Node lvFromNode, Node lvToNode, int pAddValue) {
		int lvRow = lookForNodeIndexByNode(lvFromNode);
		int lvColumn = lookForNodeIndexByNode(lvToNode);
		
		//For security reason
		if(lvRow == -1 || lvColumn == -1 ||mvAdjacentMatrix[lvRow][lvColumn] == pAddValue) {
			return;
		}
		
		mvAdjacentMatrix[lvRow][lvColumn] += pAddValue;
	}
	
	private int lookForNodeIndexByNode(Node pNode) {
		
		Iterator<string> lvIndexIterator = mvIndexNodeMap.keySet().iterator();
		while(lvIndexIterator.hasNext()) {
			String lvIndex = lvIndexIterator.next();
			if(pNode.equals(mvIndexNodeMap.get(lvIndex))) {
				return Integer.parseInt(lvIndex);
			}
		}
		
		return Utils.MINUSONE;
	}
	
	/** 
	 * Printing Dependency for a PDG
	 * 
	 * @param pvDependency A constant specified in the {@link com.util.Utils}. It can be a data dependence constant or control dependence constant
	 */
	public void printingDependency(int pvDependency)
	{
		String lvTypeOfDependency = null;
		
		if(pvDependency == Utils.DATADEPENDENCE)
			lvTypeOfDependency = "Data";
		else
			lvTypeOfDependency = "Control";
		
		System.out.println("********* Printing " + lvTypeOfDependency + " Dependency of Owner:" + mvOwner + " Method:" + mvName + " Desc: " + mvDesc + "**********" );
		
		for(int i=0; i< mvAdjacentMatrix.length; i++)
        {
        	for(int j=0; j< mvAdjacentMatrix.length; j++)
        	{
        		if(mvAdjacentMatrix[i][j] == pvDependency)
        		{
        			System.out.println(mvNodes[i].getName() + " --> " + mvNodes[j].getName());
        		}
        		else if(mvAdjacentMatrix[i][j] == 3)
        		{
        			System.out.println(mvNodes[i].getName() + " --> " + mvNodes[j].getName());
        		}
        	}
        }
		
		System.out.println("********* End of Printing " + lvTypeOfDependency + " Dependency of Owner:" + mvOwner + " Method:" + mvName + " Desc: " + mvDesc + "**********" );
		System.out.println();
	}


	/** 
	 * A getter method of actual-in Node
	 * 
	 * @return <code>int[]</code> The actual-in Node in the array position
	 * @see #getNodes()
	 */
	public int[] getActualInNodeIndex() {
		return mvActualInNodeIndex;
	}

	/** 
	 * A getter method of actual-out Node
	 * 
	 * @return <code>int</code> The actual-out Node in the array position
	 * @see #getNodes()
	 */
	public int getActualOutNodeIndex() {
		return mvActualOutNodeIndex;
	}

	
	/** 
	 * Used in the searching algorithm. Need to keep track of information for the crossing <code>ProceduralDependenceGraph</code> searching. 
	 * 
	 * @return <code>Node</code> A Node Object
	 */
	public Node getExpandingNode() {
		return mvExpandingNode;
	}

	/** 
	 * Used in the searching algorithm. Need to keep track of information for the crossing <code>ProceduralDependenceGraph</code> searching. 
	 * 
	 * @param pExpandingNode A <code>Node</code> object
	 */
	public void setExpandingNode(Node pExpandingNode) {
		mvExpandingNode = pExpandingNode;
	}
	
	
	/**
     * Get the method owner name
     * 
     * @return <code>String</code> a method owner name 
     */
	public String getOwner() {
		return mvOwner;
	}

	/**
     * Get the method name
     * 
     * @return <code>String</code> a method name 
     */
	public String getName() {
		return mvName;
	}

	/**
     * Get the method description
     * 
     * @return <code>String</code> a method description 
     */
	public String getDesc() {
		return mvDesc;
	}

	
	/////////////////////////////////////////////////////////////////////////////////////////////////
	//Process Method
	/////////////////////////////////////////////////////////////////////////////////////////////////
	private int getLevelIndexOfNode (Node pNode, int pDependence) {
		
		int lvLevel = 1;
		
		Node lvUpperLevelOneNode = getAncestorByNode(pNode, pDependence);
		
		while(lvUpperLevelOneNode != null) {
			lvUpperLevelOneNode = getAncestorByNode(lvUpperLevelOneNode, pDependence);
			lvLevel ++;
		}
	
		return lvLevel;
	}
	
	/** 
	 * Used in the searching algorithm especially for the breath first search algorithm. 
	 * <p>
	 * Used for getting the peers list (i.e same level) of the <code>Node</code>  
	 * 
	 * @param pNode A <code>Node</code> object for getting the peers
	 * @param pDependence A constant specified in the {@link com.util.Utils}. It can be a data dependence constant or control dependence constant
	 * @return <code>LinkedList</code> A LinkedList structure containing all the <code>Node</code>
	 */
	public LinkedList<node> getPeersListByNode (Node pNode, int pDependence) {

		LinkedList<node> lvReturnList = new LinkedList<node>();
		int lvLevel = getLevelIndexOfNode(pNode, pDependence);
	
		for(int i = 1 ; i < lvLevel ; i++ ) {

			if(i == 1) { 
				lvReturnList = getDescendantListByNode (mvNodes[0], pDependence);	
			}else {
				lvReturnList = getDescendantListByNodeList (lvReturnList, pDependence);
			}
		}

		return lvReturnList;
	}

	/** 
	 * Used in the searching algorithm 
	 * <p>
	 * Used for getting the Descendant list (i.e one level down) of the <code>Node</code>  
	 * 
	 * @param pNode A <code>Node</code> object 
	 * @param pDependence A constant specified in the {@link com.util.Utils}. It can be a data dependence constant or control dependence constant
	 * @return <code>LinkedList</code> A LinkedList structure containing all the <code>Node</code>
	 */
	public LinkedList<node> getDescendantListByNode (Node pNode, int pDependence) {

		LinkedList<node> lvReturnList = new LinkedList<node>();
		
		//Get the realted node list
		for(int i = 0 ; i < mvNodes.length ; i++) {
			if(pNode.equals(mvNodes[i])) {
				
				for(int j = 0; j < mvNodes.length ; j++) {
					
					if(mvAdjacentMatrix[i][j] == pDependence || mvAdjacentMatrix[i][j] == Utils.CONTROLDEPENDENCE + Utils.DATADEPENDENCE) {
						
						if(pNode.equals(mvNodes[j])) { 	//not allow for same node exist in different level
							continue;
						}
						
						lvReturnList.add(mvNodes[j]);
					}	
				}
				break;
			}
			
		}

		return lvReturnList;
	}

	/** 
	 * Used in the searching algorithm 
	 * <p>
	 * Used for getting the Descendant list (i.e one level down) of the Node List. It is a sum product of getting descendant list by a node.  
	 * 
	 * @param pNodeList A <code>LinkedList</code> structure which storing all the <code>Node</code> object 
	 * @param pDependence A constant specified in the {@link com.util.Utils}. It can be a data dependence constant or control dependence constant
	 * @return <code>LinkedList</code> A LinkedList structure containing all the <code>Node</code>
	 * @see #getDescendantListByNode(Node, int)
	 */
	public LinkedList<node> getDescendantListByNodeList (LinkedList<node> pNodeList, int pDependence) {
		
		LinkedList<node> lvReturnList = new LinkedList<node>();
		
		Iterator<node> lvNodeIterator = pNodeList.iterator();
		while(lvNodeIterator.hasNext()) {
			Node lvNode = lvNodeIterator.next();
			lvReturnList.addAll(getDescendantListByNode(lvNode, pDependence));
		}
		
		return lvReturnList;
	}
	
	/** 
	 * Used for getting the Ancestor Node (i.e one level up) of a <code>Node</code>.   
	 * 
	 * @param pNode A <code>Node</code> object 
	 * @param pDependence A constant specified in the {@link com.util.Utils}. It can be a data dependence constant or control dependence constant
	 * @return <code>Node</code> A Node object 
	 */
	public Node getAncestorByNode (Node pNode, int pDependence) {
		
		//Get the realted node list
		for(int i = 0 ; i < mvNodes.length ; i++) {
			if(pNode.equals(mvNodes[i])) {
				
				for(int j = 0; j < mvNodes.length ; j++) {
					
					if(mvAdjacentMatrix[j][i] == pDependence || mvAdjacentMatrix[j][i] == Utils.CONTROLDEPENDENCE + Utils.DATADEPENDENCE) {
					
						if(pNode.equals(mvNodes[j])) { 	//not allow for same node exist in different level
							continue;
						}
						
						return mvNodes[j];
					}	
				}
				break;
			}
			
		}
		
		return null;

	}

	
	////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	//Implemented method
	////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
	@Override
	public Iterator<node> controlDependenceBFSIterator() {
		return controlDependenceBFSIterator(getEntryNode());
	}

	@Override
	public Iterator<node> controlDependenceDFSIterator() {
		return controlDependenceDFSIterator(getEntryNode());
	}
	
	@Override
	public Iterator<node> controlDependenceDFSIterator(Node pProcessNode) {
		return new ControlDependenceDFSIterator(null, pProcessNode, this);
	}

	@Override
	public Iterator<node> controlDependenceBFSIterator(Node pProcessNode) {
		return new ControlDependenceBFSIterator(null, pProcessNode, this);
	}
	
	@Override
	public Iterator<node> dataDependenceDFSIterator(Node pProcessNode) {
		return new DataDependenceDFSIterator(null, pProcessNode, this);
	}

	@Override
	public BigInteger countTotalNumberOfNode() {
		return new BigInteger(String.valueOf(mvNodes.length));
	}

	@Override
	public BigInteger countTotalNumberOfPDG() {
		return new BigInteger(StringUtils.ONE);
	}

	@Override
	public void printAll() {
		
		System.out.println("********* Printing Node of Owner:" + mvOwner + " Method:" + mvName + " Desc: " + mvDesc + "**********" );
		
		for(int i = 0 ; i <mvnodes.length;>			
			System.out.print(mvNodes[i].getName() + " , ");
			
		}
		System.out.println();
		System.out.println("********* End of Printing Node of Owner:" + mvOwner + " Method:" + mvName + " Desc: " + mvDesc + "**********" );

		
		printingDependency(Utils.DATADEPENDENCE);
		printingDependency(Utils.CONTROLDEPENDENCE);
	}




}


this is my error


C:\Program Files\Java\jdk1.7.0\bin\My>javac A.java
A.java:18: error: cannot find symbol
ProceduralDependenceGraphMatrix lvPDG = new ProceduralDependenceGraphMatrix.get
PDGByMethodSignature("C:\\Program Files\\Java\\jdk1.7.0\\bin\\My\\fact.class","f
act","I()");
^
symbol: class getPDGByMethodSignature
location: class ProceduralDependenceGraphMatrix
1 error


methods name does not match.which argument i want to give.
Posted
Updated 8-Jan-16 19:19pm
v2

1 solution

getPDGByMethodSignature is a static method that returns a ProceduralDependenceGraphMatrix object. So the code should be:
Java
ProceduralDependenceGraphMatrix lvPDG = ProceduralDependenceGraphMatrix.getPDGByMethodSignature("C:\\Program Files\\Java\\jdk1.7.0\\bin\\My\\fact.class","fact","I()");
 
Share this answer
 
Comments
Kamal kannan D 9-Jan-16 5:34am    
thank you
Kamal kannan D 9-Jan-16 5:47am    
when i execute A.java , the following error has occured...
C:\Program Files\Java\jdk1.7.0\bin\My>java A
Exception in thread "main" java.lang.NullPointerException
at A.main(A.java:19)
i refereed following website.
http://www4.comp.polyu.edu.hk/~cscllo/teaching/SDGAPI/
Richard MacCutchan 9-Jan-16 6:00am    
Look at line 19 and see why your object reference is null. Use your debugger to step through the code and check all variables are being initialised correctly.
Richard MacCutchan 9-Jan-16 6:03am    
At a guess ProceduralDependenceGraphMatrix.getPDGByMethodSignature("C:\\Program Files\\Java\\jdk1.7.0\\bin\\My\\fact.class","fact","f"); is not returning a valid object, and your code is not checking the return value.
Kamal kannan D 9-Jan-16 6:07am    
s sir.. can you help me how to return the object.


i need project for program dependence graph. if we load any java file means its display graph. if you know any link help me sir.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900