Program: 185872
Project: 185872
Buggy source:
private Expression findStaticFieldOrPropAccessorImportFromModule(String name){
  ModuleNode module=currentClass.getModule();
  if (module == null)   return null;
  Map<String,ImportNode> importNodes=module.getStaticImports();
  Expression expression=null;
  String accessorName=getAccessorName(name);
  if (importNodes.containsKey(accessorName)) {
    ImportNode importNode=importNodes.get(accessorName);
    expression=findStaticPropertyAccessorByFullName(importNode.getType(),importNode.getFieldName());
    if (expression != null)     return expression;
    expression=findStaticPropertyAccessor(importNode.getType(),getPropNameForAccessor(importNode.getFieldName()));
    if (expression != null)     return expression;
  }
  if (accessorName.startsWith("String_Node_Str")) {
    accessorName="String_Node_Str" + accessorName.substring(3);
    if (importNodes.containsKey(accessorName)) {
      ImportNode importNode=importNodes.get(accessorName);
      expression=findStaticPropertyAccessorByFullName(importNode.getType(),importNode.getFieldName());
      if (expression != null)       return expression;
      expression=findStaticPropertyAccessor(importNode.getType(),getPropNameForAccessor(importNode.getFieldName()));
      if (expression != null)       return expression;
    }
  }
  if (importNodes.containsKey(name)) {
    ImportNode importNode=importNodes.get(name);
    try {
      if (!isReconcile) {
        expression=findStaticPropertyAccessor(importNode.getType(),importNode.getFieldName());
        if (expression != null)         return expression;
      }
      expression=findStaticField(importNode.getType(),importNode.getFieldName());
      if (expression != null)       return expression;
    }
  finally {
      if (expression != null)       expression.setNodeMetaData("String_Node_Str",name);
    }
  }
  for (  ImportNode importNode : module.getStaticStarImports().values()) {
    ClassNode node=importNode.getType();
    expression=findStaticPropertyAccessor(node,name);
    if (expression != null)     return expression;
    expression=findStaticField(node,name);
    if (expression != null)     return expression;
  }
  return null;
}

Fixed version (ground truth):
private Expression findStaticFieldOrPropAccessorImportFromModule(String name){
  ModuleNode module=currentClass.getModule();
  if (module == null)   return null;
  Map<String,ImportNode> importNodes=module.getStaticImports();
  Expression expression=null;
  String accessorName=getAccessorName(name);
  if (importNodes.containsKey(accessorName)) {
    ImportNode importNode=importNodes.get(accessorName);
    expression=findStaticPropertyAccessorByFullName(importNode.getType(),importNode.getFieldName());
    if (expression != null)     return expression;
    expression=findStaticPropertyAccessor(importNode.getType(),getPropNameForAccessor(importNode.getFieldName()));
    if (expression != null)     return expression;
  }
  if (accessorName.startsWith("String_Node_Str")) {
    accessorName="String_Node_Str" + accessorName.substring(3);
    if (importNodes.containsKey(accessorName)) {
      ImportNode importNode=importNodes.get(accessorName);
      expression=findStaticPropertyAccessorByFullName(importNode.getType(),importNode.getFieldName());
      if (expression != null)       return expression;
      expression=findStaticPropertyAccessor(importNode.getType(),getPropNameForAccessor(importNode.getFieldName()));
      if (expression != null)       return expression;
    }
  }
  if (importNodes.containsKey(name)) {
    ImportNode importNode=importNodes.get(name);
    try {
      if (!isReconcile) {
        expression=findStaticPropertyAccessor(importNode.getType(),importNode.getFieldName());
        if (expression != null)         return expression;
      }
      expression=findStaticField(importNode.getType(),importNode.getFieldName());
      if (expression != null)       return expression;
    }
  finally {
      if (expression != null)       expression.putNodeMetaData("String_Node_Str",name);
    }
  }
  for (  ImportNode importNode : module.getStaticStarImports().values()) {
    ClassNode node=importNode.getType();
    expression=findStaticPropertyAccessor(node,name);
    if (expression != null)     return expression;
    expression=findStaticField(node,name);
    if (expression != null)     return expression;
  }
  return null;
}