Program: 9263
Project: 9263
Buggy source:
public Pointcut concretize1(ResolvedType inAspect,ResolvedType declaringType,IntMap bindings){
  if (isDeclare(bindings.getEnclosingAdvice())) {
    inAspect.getWorld().showMessage(IMessage.ERROR,WeaverMessages.format(WeaverMessages.CFLOW_IN_DECLARE,isBelow ? "String_Node_Str" : "String_Node_Str"),bindings.getEnclosingAdvice().getSourceLocation(),null);
    return Pointcut.makeMatchesNothing(Pointcut.CONCRETE);
  }
  IntMap entryBindings=new IntMap();
  if (freeVars != null) {
    for (int i=0, len=freeVars.length; i < len; i++) {
      int freeVar=freeVars[i];
      entryBindings.put(freeVar,i);
    }
  }
  entryBindings.copyContext(bindings);
  World world=inAspect.getWorld();
  Pointcut concreteEntry;
  ResolvedType concreteAspect=bindings.getConcreteAspect();
  CrosscuttingMembers xcut=concreteAspect.crosscuttingMembers;
  Collection previousCflowEntries=xcut.getCflowEntries();
  entryBindings.pushEnclosingDefinition(CFLOW_MARKER);
  try {
    concreteEntry=entry.concretize(inAspect,declaringType,entryBindings);
  }
  finally {
    entryBindings.popEnclosingDefinitition();
  }
  List innerCflowEntries=new ArrayList(xcut.getCflowEntries());
  innerCflowEntries.removeAll(previousCflowEntries);
  Object field=getCflowfield(concreteEntry,concreteAspect);
  if (freeVars == null || freeVars.length == 0) {
    ResolvedMember localCflowField=null;
    if (field != null) {
      localCflowField=(ResolvedMember)field;
    }
 else {
      localCflowField=new ResolvedMemberImpl(Member.FIELD,concreteAspect,Modifier.STATIC | Modifier.PUBLIC | Modifier.FINAL,NameMangler.cflowCounter(xcut),UnresolvedType.forName(NameMangler.CFLOW_COUNTER_TYPE).getSignature());
      concreteAspect.crosscuttingMembers.addTypeMunger(world.makeCflowCounterFieldAdder(localCflowField));
      concreteAspect.crosscuttingMembers.addConcreteShadowMunger(Advice.makeCflowEntry(world,concreteEntry,isBelow,localCflowField,freeVars == null ? 0 : freeVars.length,innerCflowEntries,inAspect));
      putCflowfield(concreteEntry,concreteAspect,localCflowField);
    }
    Pointcut ret=new ConcreteCflowPointcut(localCflowField,null,true);
    ret.copyLocationFrom(this);
    return ret;
  }
 else {
    List slots=new ArrayList();
    for (int i=0, len=freeVars.length; i < len; i++) {
      int freeVar=freeVars[i];
      if (!bindings.hasKey(freeVar))       continue;
      int formalIndex=bindings.get(freeVar);
      ResolvedPointcutDefinition enclosingDef=bindings.peekEnclosingDefinition();
      ResolvedType formalType=null;
      if (enclosingDef != null && enclosingDef.getParameterTypes().length > 0) {
        formalType=enclosingDef.getParameterTypes()[freeVar].resolve(world);
      }
 else {
        formalType=bindings.getAdviceSignature().getParameterTypes()[formalIndex].resolve(world);
      }
      ConcreteCflowPointcut.Slot slot=new ConcreteCflowPointcut.Slot(formalIndex,formalType,i);
      slots.add(slot);
    }
    ResolvedMember localCflowField=null;
    if (field != null) {
      localCflowField=(ResolvedMember)field;
    }
 else {
      localCflowField=new ResolvedMemberImpl(Member.FIELD,concreteAspect,Modifier.STATIC | Modifier.PUBLIC | Modifier.FINAL,NameMangler.cflowStack(xcut),UnresolvedType.forName(NameMangler.CFLOW_STACK_TYPE).getSignature());
      concreteAspect.crosscuttingMembers.addConcreteShadowMunger(Advice.makeCflowEntry(world,concreteEntry,isBelow,localCflowField,freeVars.length,innerCflowEntries,inAspect));
      concreteAspect.crosscuttingMembers.addTypeMunger(world.makeCflowStackFieldAdder(localCflowField));
      putCflowfield(concreteEntry,concreteAspect,localCflowField);
    }
    Pointcut ret=new ConcreteCflowPointcut(localCflowField,slots,false);
    ret.copyLocationFrom(this);
    return ret;
  }
}

Fixed version (ground truth):
public Pointcut concretize1(ResolvedType inAspect,ResolvedType declaringType,IntMap bindings){
  if (isDeclare(bindings.getEnclosingAdvice())) {
    inAspect.getWorld().showMessage(IMessage.ERROR,WeaverMessages.format(WeaverMessages.CFLOW_IN_DECLARE,isBelow ? "String_Node_Str" : "String_Node_Str"),bindings.getEnclosingAdvice().getSourceLocation(),null);
    return Pointcut.makeMatchesNothing(Pointcut.CONCRETE);
  }
  IntMap entryBindings=new IntMap();
  if (freeVars != null) {
    for (int i=0, len=freeVars.length; i < len; i++) {
      int freeVar=freeVars[i];
      entryBindings.put(freeVar,i);
    }
  }
  entryBindings.copyContext(bindings);
  World world=inAspect.getWorld();
  Pointcut concreteEntry;
  ResolvedType concreteAspect=bindings.getConcreteAspect();
  CrosscuttingMembers xcut=concreteAspect.crosscuttingMembers;
  Collection previousCflowEntries=xcut.getCflowEntries();
  entryBindings.pushEnclosingDefinition(CFLOW_MARKER);
  try {
    concreteEntry=entry.concretize(inAspect,declaringType,entryBindings);
  }
  finally {
    entryBindings.popEnclosingDefinitition();
  }
  List innerCflowEntries=new ArrayList(xcut.getCflowEntries());
  innerCflowEntries.removeAll(previousCflowEntries);
  if (freeVars == null || freeVars.length == 0) {
    ResolvedMember localCflowField=null;
    Object field=getCflowfield(concreteEntry,concreteAspect,"String_Node_Str");
    if (field != null) {
      localCflowField=(ResolvedMember)field;
    }
 else {
      localCflowField=new ResolvedMemberImpl(Member.FIELD,concreteAspect,Modifier.STATIC | Modifier.PUBLIC | Modifier.FINAL,NameMangler.cflowCounter(xcut),UnresolvedType.forName(NameMangler.CFLOW_COUNTER_TYPE).getSignature());
      concreteAspect.crosscuttingMembers.addTypeMunger(world.makeCflowCounterFieldAdder(localCflowField));
      concreteAspect.crosscuttingMembers.addConcreteShadowMunger(Advice.makeCflowEntry(world,concreteEntry,isBelow,localCflowField,freeVars == null ? 0 : freeVars.length,innerCflowEntries,inAspect));
      putCflowfield(concreteEntry,concreteAspect,localCflowField,"String_Node_Str");
    }
    Pointcut ret=new ConcreteCflowPointcut(localCflowField,null,true);
    ret.copyLocationFrom(this);
    return ret;
  }
 else {
    List slots=new ArrayList();
    for (int i=0, len=freeVars.length; i < len; i++) {
      int freeVar=freeVars[i];
      if (!bindings.hasKey(freeVar))       continue;
      int formalIndex=bindings.get(freeVar);
      ResolvedPointcutDefinition enclosingDef=bindings.peekEnclosingDefinition();
      ResolvedType formalType=null;
      if (enclosingDef != null && enclosingDef.getParameterTypes().length > 0) {
        formalType=enclosingDef.getParameterTypes()[freeVar].resolve(world);
      }
 else {
        formalType=bindings.getAdviceSignature().getParameterTypes()[formalIndex].resolve(world);
      }
      ConcreteCflowPointcut.Slot slot=new ConcreteCflowPointcut.Slot(formalIndex,formalType,i);
      slots.add(slot);
    }
    ResolvedMember localCflowField=null;
    Object field=getCflowfield(concreteEntry,concreteAspect,"String_Node_Str");
    if (field != null) {
      localCflowField=(ResolvedMember)field;
    }
 else {
      localCflowField=new ResolvedMemberImpl(Member.FIELD,concreteAspect,Modifier.STATIC | Modifier.PUBLIC | Modifier.FINAL,NameMangler.cflowStack(xcut),UnresolvedType.forName(NameMangler.CFLOW_STACK_TYPE).getSignature());
      concreteAspect.crosscuttingMembers.addConcreteShadowMunger(Advice.makeCflowEntry(world,concreteEntry,isBelow,localCflowField,freeVars.length,innerCflowEntries,inAspect));
      concreteAspect.crosscuttingMembers.addTypeMunger(world.makeCflowStackFieldAdder(localCflowField));
      putCflowfield(concreteEntry,concreteAspect,localCflowField,"String_Node_Str");
    }
    Pointcut ret=new ConcreteCflowPointcut(localCflowField,slots,false);
    ret.copyLocationFrom(this);
    return ret;
  }
}