package heros.alias;
import com.google.common.base.Optional;
public class AccessPathUtil {
<BUG>public static <FieldRef, D extends FieldSensitiveFact<?, FieldRef,  D>> boolean isPrefixOf(D prefixCandidate, D fact) {
</BUG>
if(prefixCandidate.getBaseValue() == null) {
if(fact.getBaseValue() != null)
<BUG>return false;
} else if(!prefixCandidate.getBaseValue().equals(fact.getBaseValue()))
return false;
return prefixCandidate.getAccessPath().isPrefixOf(fact.getAccessPath());</BUG>
}

package heros.alias;
import heros.alias.AccessPath.PrefixTestResult;
import com.google.common.base.Optional;
public class AccessPathUtil {
public static <FieldRef, D extends FieldSensitiveFact<?, FieldRef,  D>> PrefixTestResult isPrefixOf(D prefixCandidate, D fact) {
if(prefixCandidate.getBaseValue() == null) {
if(fact.getBaseValue() != null)
return PrefixTestResult.NO_PREFIX;
} else if(!prefixCandidate.getBaseValue().equals(fact.getBaseValue()))
return PrefixTestResult.NO_PREFIX;
return prefixCandidate.getAccessPath().isPrefixOf(fact.getAccessPath());
}
