public Iterable<JvmFeature> getFeaturesByName(String name, JvmTypeReference declarator,
Iterable<JvmTypeReference> hierarchy) {
if(extensionProvidingType == null)
return emptyList();
List<JvmFeature> result = Lists.newArrayList();
<BUG>JvmType rawType = getTypeReferences().getRawType(extensionProvidingType);
if (rawType instanceof JvmDeclaredType) {</BUG>
Iterable<JvmFeature> candidates = ((JvmDeclaredType) rawType).findAllFeaturesByName(name);
<BUG>collectExtensionMethods(hierarchy, candidates, result);
}</BUG>
return result;

public Iterable<JvmFeature> getFeaturesByName(String name, JvmTypeReference declarator,
Iterable<JvmTypeReference> hierarchy) {
if(extensionProvidingType == null)
return emptyList();
List<JvmFeature> result = Lists.newArrayList();
List<JvmType> rawTypes = getRawTypeHelper().getAllRawTypes(extensionProvidingType, null);
for(JvmType rawType: rawTypes) {
if (rawType instanceof JvmDeclaredType) {
Iterable<JvmFeature> candidates = ((JvmDeclaredType) rawType).findAllFeaturesByName(name);
collectExtensionMethods(hierarchy, candidates, result);
}
}
