summaryrefslogtreecommitdiff
path: root/st
diff options
context:
space:
mode:
Diffstat (limited to 'st')
-rw-r--r--st/MethodInstance.java3
-rw-r--r--st/TokenKey.java17
2 files changed, 18 insertions, 2 deletions
diff --git a/st/MethodInstance.java b/st/MethodInstance.java
index 9f1e6df..7ed0674 100644
--- a/st/MethodInstance.java
+++ b/st/MethodInstance.java
@@ -19,8 +19,7 @@ public class MethodInstance extends AbstractInstance {
public boolean equals(Object other) {
MethodInstance o;
return (other instanceof MethodInstance &&
- ((o = (MethodInstance) other).getName() == this.getName() &&
- o.getParentClass() == this.getParentClass()));
+ ((o = (MethodInstance) other).getName() == this.getName()));
}
public ArrayList<TypeInstance> getArguments() {
diff --git a/st/TokenKey.java b/st/TokenKey.java
index 941c83f..948e06a 100644
--- a/st/TokenKey.java
+++ b/st/TokenKey.java
@@ -1,5 +1,7 @@
package st;
+import misc.*;
+
/**
* This class is a data structure used to distinguish tokens in
* a given program. Tokens are considered unique if their "beginLine"
@@ -28,6 +30,21 @@ public class TokenKey {
@Override public boolean equals(Object other) {
boolean ret = false;
TokenKey o;
+ // if (other instanceof TokenKey) {
+ // o = (TokenKey) other;
+ // MinimalLogger.info(String.format("Comparing %s and %s",
+ // this.toString(),
+ // other.toString()));
+ // if ((o.cls == null && this.cls == null) ||
+ // (o.cls != null && o.cls.equals(this.cls))) {
+ // MinimalLogger.info("Classes are equal!");
+ // if ((o.mtd == null && this.mtd == null) ||
+ // (o.mtd != null && o.mtd.equals(this.mtd))) {
+ // MinimalLogger.info("Methods are equal!");
+ // if (o.name.equals(this.name)) { ret = true; }
+ // } else { MinimalLogger.info("Methods not equal."); }
+ // } else { MinimalLogger.info("Classes not equal."); }
+ // }
if (other instanceof TokenKey &&
(o = (TokenKey) other).name.equals(this.name) &&
((o.cls == null && this.cls == null) ||