This commit is contained in:
Adam
2015-11-25 19:31:03 -06:00
parent 4af665e58f
commit e1d207c637
4 changed files with 16 additions and 9 deletions

View File

@@ -221,7 +221,6 @@ public class Rename2
System.out.println(etwo.getGraph());
for (int i = 0; i < 250; ++i)
//for (int i = 0; i < Math.min(one.getClasses().size(), two.getClasses().size()); ++i)
{
ClassFile c1 = one.findClass("class" + i);
ClassFile c2 = two.findClass("class" + i);
@@ -240,9 +239,9 @@ public class Rename2
ClassFile cf1 = one.findClass("client"), cf2 = two.findClass("client");
mapDeobfuscatedMethods(cf1, cf2);
//List<Field> fl1 = getClientFields(one, eone);
//List<Field> fl2 = getClientFields(two, etwo);
// List<Field> fl1 = getClientFields(one, eone);
// List<Field> fl2 = getClientFields(two, etwo);
//
// for (int i = 0; i < Math.min(fl1.size(), fl2.size()); ++i)
// {
// Field f1 = fl1.get(i), f2 = fl2.get(i);
@@ -315,7 +314,7 @@ public class Rename2
//
// show(mappings);
System.out.println("Solved methods "+ g1.solved(VertexType.METHOD) + ", total " + g1.getVerticies().size());
System.out.println("Solved methods "+ g1.solved(VertexType.METHOD) + ", solved fields " + g1.solved(VertexType.FIELD) + ", total " + g1.getVerticies().size());
//rename(mappings, two);

View File

@@ -4,5 +4,7 @@ public enum EdgeType
{
INVOKE,
GETFIELD,
SETFIELD;
SETFIELD,
INVOKED_FROM;
}

View File

@@ -187,10 +187,13 @@ public class Vertex
assert is == null;
assert other.graph != graph;
Method thism = (Method) object;
Method otherm = (Method) other.object;
if (object instanceof Method)
{
Method thism = (Method) object;
Method otherm = (Method) other.object;
assert thism.getMethods().getClassFile().getName().equals(otherm.getMethods().getClassFile().getName());
assert thism.getMethods().getClassFile().getName().equals(otherm.getMethods().getClassFile().getName());
}
this.is = other;
}

View File

@@ -208,7 +208,10 @@ public class Execution
return;
for (Method m : methods)
{
graph.addEdge(frame.nonStatic, m, EdgeType.INVOKE);
graph.addEdge(m, frame.nonStatic, EdgeType.INVOKED_FROM);
}
}
else if (i instanceof FieldInstruction)
{