Program: 9267
Project: 9267
Buggy source:
/** 
 * Checks that concrete aspect is valid
 * @return true if ok, false otherwise
 */
public boolean validate(){
  if (!(m_world instanceof BcelWorld)) {
    reportError("String_Node_Str");
    return false;
  }
  ResolvedType current=m_world.resolve(m_concreteAspect.name,true);
  if (!current.isMissing()) {
    reportError("String_Node_Str" + stringify());
    return false;
  }
  if (m_concreteAspect.extend == null && m_concreteAspect.precedence != null) {
    if (m_concreteAspect.pointcuts.isEmpty()) {
      m_isValid=true;
      m_perClause=new PerSingleton();
      m_parent=null;
      return true;
    }
 else {
      reportError("String_Node_Str" + stringify());
      return false;
    }
  }
  m_parent=m_world.resolve(m_concreteAspect.extend,true);
  if (m_parent.isMissing()) {
    String fixedName=m_concreteAspect.extend;
    int hasDot=fixedName.lastIndexOf('.');
    while (hasDot > 0) {
      char[] fixedNameChars=fixedName.toCharArray();
      fixedNameChars[hasDot]='$';
      fixedName=new String(fixedNameChars);
      hasDot=fixedName.lastIndexOf('.');
      m_parent=m_world.resolve(UnresolvedType.forName(fixedName),true);
      if (!m_parent.isMissing()) {
        break;
      }
    }
  }
  if (m_parent.isMissing()) {
    reportError("String_Node_Str" + stringify());
    return false;
  }
  if (!m_parent.isAbstract()) {
    reportError("String_Node_Str" + stringify());
    return false;
  }
  if (!m_parent.isAspect()) {
    reportError("String_Node_Str" + stringify());
    return false;
  }
  List elligibleAbstractions=new ArrayList();
  Iterator methods=m_parent.getMethods();
  while (methods.hasNext()) {
    ResolvedMember method=(ResolvedMember)methods.next();
    if (method.isAbstract()) {
      if ("String_Node_Str".equals(method.getSignature())) {
        elligibleAbstractions.add(method.getName());
      }
 else {
        reportError("String_Node_Str" + method.getName() + "String_Node_Str"+ stringify());
        return false;
      }
    }
  }
  List pointcutNames=new ArrayList();
  for (Iterator it=m_concreteAspect.pointcuts.iterator(); it.hasNext(); ) {
    Definition.Pointcut abstractPc=(Definition.Pointcut)it.next();
    pointcutNames.add(abstractPc.name);
  }
  for (Iterator it=elligibleAbstractions.iterator(); it.hasNext(); ) {
    String elligiblePc=(String)it.next();
    if (!pointcutNames.contains(elligiblePc)) {
      reportError("String_Node_Str" + elligiblePc + "String_Node_Str"+ stringify());
      return false;
    }
  }
  m_perClause=m_parent.getPerClause();
  m_isValid=true;
  return m_isValid;
}

Fixed version (ground truth):
/** 
 * Checks that concrete aspect is valid
 * @return true if ok, false otherwise
 */
public boolean validate(){
  if (!(m_world instanceof BcelWorld)) {
    reportError("String_Node_Str");
    return false;
  }
  ResolvedType current=m_world.resolve(m_concreteAspect.name,true);
  if (!current.isMissing()) {
    reportError("String_Node_Str" + stringify());
    return false;
  }
  if (m_concreteAspect.extend == null && m_concreteAspect.precedence != null) {
    if (m_concreteAspect.pointcuts.isEmpty()) {
      m_isValid=true;
      m_perClause=new PerSingleton();
      m_parent=null;
      return true;
    }
 else {
      reportError("String_Node_Str" + stringify());
      return false;
    }
  }
  m_parent=m_world.resolve(m_concreteAspect.extend,true);
  if (m_parent.isMissing()) {
    String fixedName=m_concreteAspect.extend;
    int hasDot=fixedName.lastIndexOf('.');
    while (hasDot > 0) {
      char[] fixedNameChars=fixedName.toCharArray();
      fixedNameChars[hasDot]='$';
      fixedName=new String(fixedNameChars);
      hasDot=fixedName.lastIndexOf('.');
      m_parent=m_world.resolve(UnresolvedType.forName(fixedName),true);
      if (!m_parent.isMissing()) {
        break;
      }
    }
  }
  if (m_parent.isMissing()) {
    reportError("String_Node_Str" + stringify());
    return false;
  }
  if (!m_parent.isAbstract()) {
    reportError("String_Node_Str" + stringify());
    return false;
  }
  if (!m_parent.isAspect()) {
    reportError("String_Node_Str" + stringify());
    return false;
  }
  List elligibleAbstractions=new ArrayList();
  Iterator methods=m_parent.getMethods();
  while (methods.hasNext()) {
    ResolvedMember method=(ResolvedMember)methods.next();
    if (method.isAbstract()) {
      if ("String_Node_Str".equals(method.getSignature())) {
        String n=method.getName();
        if (n.startsWith("String_Node_Str")) {
          n=n.substring(14);
          n=n.substring(0,n.indexOf("String_Node_Str"));
          elligibleAbstractions.add(n);
        }
 else {
          elligibleAbstractions.add(method.getName());
        }
      }
 else {
        reportError("String_Node_Str" + method.getName() + "String_Node_Str"+ stringify());
        return false;
      }
    }
  }
  List pointcutNames=new ArrayList();
  for (Iterator it=m_concreteAspect.pointcuts.iterator(); it.hasNext(); ) {
    Definition.Pointcut abstractPc=(Definition.Pointcut)it.next();
    pointcutNames.add(abstractPc.name);
  }
  for (Iterator it=elligibleAbstractions.iterator(); it.hasNext(); ) {
    String elligiblePc=(String)it.next();
    if (!pointcutNames.contains(elligiblePc)) {
      reportError("String_Node_Str" + elligiblePc + "String_Node_Str"+ stringify());
      return false;
    }
  }
  m_perClause=m_parent.getPerClause();
  m_isValid=true;
  return m_isValid;
}