Program: 133391
Project: 133391
Buggy source:
/** 
 * This operation creates an AbstractEntryComposite for an Entry and adds that Entry to the EntryMap.
 * @param entry The Entry for which the Control should be created.
 * @param index The index in the entryMap of where the rendered AbstractEntryComposite will be put.
 */
private void renderEntry(IEntry entry,int index){
  for (  IEntryComposite entryTemp : entryMap.values()) {
    if (entryTemp.getEntry().equals(entry)) {
      return;
    }
  }
  IEntryComposite entryComposite=null;
  IEntryCompositeProvider provider=new DefaultEntryCompositeProvider();
  if (!"String_Node_Str".equals(entry.getContext())) {
    try {
      for (      IEntryCompositeProvider p : IEntryCompositeProvider.getProviders()) {
        if (p.getName().equals(entry.getContext())) {
          provider=p;
          break;
        }
      }
    }
 catch (    CoreException e) {
      logger.error("String_Node_Str",e);
    }
  }
  entryComposite=provider.getEntryComposite(this,entry,SWT.FLAT,formToolkit);
  entryMap.put(index,entryComposite);
  List<Control> uiEntryComps=Arrays.asList(getChildren());
  HashMap<Integer,AbstractEntryComposite> uiMap=new HashMap<Integer,AbstractEntryComposite>();
  for (int i=0; i < uiEntryComps.size(); i++) {
    AbstractEntryComposite e=(AbstractEntryComposite)uiEntryComps.get(i);
    if (e != null) {
      uiMap.put(i,e);
    }
  }
  for (int i=0; i < entryMap.size(); i++) {
    IEntry mapEntry=null, uiEntry=null;
    if (entryMap.get(i) != null)     mapEntry=entryMap.get(i).getEntry();
    if (uiMap.get(i) != null)     uiEntry=uiMap.get(i).entry;
    if (mapEntry == null || uiEntry == null) {
      continue;
    }
    int uiPosition=0;
    if (!mapEntry.getName().equals(uiEntry.getName())) {
      for (int j=0; j < uiEntryComps.size(); j++) {
        IEntry e=uiMap.get(j).entry;
        if (e.getName().equals(mapEntry.getName())) {
          uiPosition=j;
          break;
        }
      }
      if (i - 1 >= 0) {
        AbstractEntryComposite entryAbove=uiMap.get(i - 1);
        if (entryAbove != null) {
          uiMap.get(uiPosition).moveBelow(entryAbove);
        }
      }
 else       if (i + 1 <= entryMap.size()) {
        AbstractEntryComposite entryBelow=uiMap.get(i + 1);
        if (entryBelow != null) {
          uiMap.get(uiPosition).moveAbove(entryBelow);
        }
      }
    }
  }
  return;
}

Fixed version (ground truth):
/** 
 * This operation creates an AbstractEntryComposite for an Entry and adds that Entry to the EntryMap.
 * @param entry The Entry for which the Control should be created.
 * @param index The index in the entryMap of where the rendered AbstractEntryComposite will be put.
 */
private void renderEntry(IEntry entry,int index){
  for (  IEntryComposite entryTemp : entryMap.values()) {
    if (entryTemp.getEntry().equals(entry)) {
      return;
    }
  }
  IEntryComposite entryComposite=null;
  IEntryCompositeProvider provider=new DefaultEntryCompositeProvider();
  if (!"String_Node_Str".equals(entry.getContext())) {
    try {
      for (      IEntryCompositeProvider p : IEntryCompositeProvider.getProviders()) {
        if (p.getName().equals(entry.getContext())) {
          provider=p;
          break;
        }
      }
    }
 catch (    CoreException e) {
      logger.error("String_Node_Str",e);
    }
  }
  entryComposite=provider.getEntryComposite(this,entry,SWT.FLAT,formToolkit);
  entryMap.put(index,entryComposite);
  List<Control> uiEntryComps=Arrays.asList(getChildren());
  HashMap<Integer,IEntryComposite> uiMap=new HashMap<Integer,IEntryComposite>();
  for (int i=0; i < uiEntryComps.size(); i++) {
    IEntryComposite e=(IEntryComposite)uiEntryComps.get(i);
    if (e != null) {
      uiMap.put(i,e);
    }
  }
  for (int i=0; i < entryMap.size(); i++) {
    IEntry mapEntry=null, uiEntry=null;
    if (entryMap.get(i) != null)     mapEntry=entryMap.get(i).getEntry();
    if (uiMap.get(i) != null)     uiEntry=uiMap.get(i).getEntry();
    if (mapEntry == null || uiEntry == null) {
      continue;
    }
    int uiPosition=0;
    if (!mapEntry.getName().equals(uiEntry.getName())) {
      for (int j=0; j < uiEntryComps.size(); j++) {
        IEntry e=uiMap.get(j).getEntry();
        if (e.getName().equals(mapEntry.getName())) {
          uiPosition=j;
          break;
        }
      }
      if (i - 1 >= 0) {
        IEntryComposite entryAbove=uiMap.get(i - 1);
        if (entryAbove != null) {
          uiMap.get(uiPosition).getComposite().moveBelow(entryAbove.getComposite());
        }
      }
 else       if (i + 1 <= entryMap.size()) {
        IEntryComposite entryBelow=uiMap.get(i + 1);
        if (entryBelow != null) {
          uiMap.get(uiPosition).getComposite().moveAbove(entryBelow.getComposite());
        }
      }
    }
  }
  return;
}