nus-yam/ex-repair huggingface dataset:
Program: 11718
Project: 11718
Buggy source:
public XImportSection get(){
  XImportSection importSection=XtypeFactory.eINSTANCE.createXImportSection();
  XPackage xPackage=(XPackage)resource.getContents().get(0);
  EList<XImportDirective> importDirectives=xPackage.getImportDirectives();
  for (  XImportDirective importDirective : importDirectives) {
    XImportDeclaration importDeclaration=XtypeFactory.eINSTANCE.createXImportDeclaration();
    JvmDeclaredType importedType=null;
    EObject importedObject=importDirective.getImportedObject();
    if (importedObject instanceof JvmDeclaredType) {
      importedType=(JvmDeclaredType)importedObject;
    }
 else {
      importedType=(JvmDeclaredType)associations.getPrimaryJvmElement(importedObject);
    }
    importDeclaration.setImportedType(importedType);
    importDeclaration.setImportedNamespace(importDirective.getImportedNamespace());
    importDeclaration.setExtension(false);
    importDeclaration.setStatic(false);
    importSection.getImportDeclarations().add(importDeclaration);
  }
  return importSection;
}

Fixed version (ground truth):
public XImportSection get(){
  XImportSection importSection=XtypeFactory.eINSTANCE.createXImportSection();
  EList<XImportDeclaration> importDeclarations=importSection.getImportDeclarations();
  XPackage xPackage=(XPackage)resource.getContents().get(0);
  EList<XImportDirective> importDirectives=xPackage.getImportDirectives();
  for (  XImportDirective importDirective : importDirectives) {
    JvmDeclaredType importedType=null;
    EObject importedObject=importDirective.getImportedObject();
    if (importedObject instanceof JvmDeclaredType) {
      importedType=(JvmDeclaredType)importedObject;
    }
 else {
      EObject primaryJvmElement=associations.getPrimaryJvmElement(importedObject);
      if (primaryJvmElement instanceof JvmDeclaredType) {
        importedType=(JvmDeclaredType)primaryJvmElement;
      }
    }
    if (importedType != null) {
      XImportDeclaration importDeclaration=XtypeFactory.eINSTANCE.createXImportDeclaration();
      importDeclaration.setImportedType(importedType);
      importDeclaration.setImportedNamespace(importDirective.getImportedNamespace());
      importDeclaration.setExtension(false);
      importDeclaration.setStatic(false);
      importDeclarations.add(importDeclaration);
    }
  }
  return importSection;
}
Program: 11719
Project: 11719
Buggy source:
@Override public XImportSection getImportSection(final XtextResource resource){
  return cache.get("String_Node_Str",resource,new Provider<XImportSection>(){
    public XImportSection get(){
      XImportSection importSection=XtypeFactory.eINSTANCE.createXImportSection();
      XPackage xPackage=(XPackage)resource.getContents().get(0);
      EList<XImportDirective> importDirectives=xPackage.getImportDirectives();
      for (      XImportDirective importDirective : importDirectives) {
        XImportDeclaration importDeclaration=XtypeFactory.eINSTANCE.createXImportDeclaration();
        JvmDeclaredType importedType=null;
        EObject importedObject=importDirective.getImportedObject();
        if (importedObject instanceof JvmDeclaredType) {
          importedType=(JvmDeclaredType)importedObject;
        }
 else {
          importedType=(JvmDeclaredType)associations.getPrimaryJvmElement(importedObject);
        }
        importDeclaration.setImportedType(importedType);
        importDeclaration.setImportedNamespace(importDirective.getImportedNamespace());
        importDeclaration.setExtension(false);
        importDeclaration.setStatic(false);
        importSection.getImportDeclarations().add(importDeclaration);
      }
      return importSection;
    }
  }
);
}

Fixed version (ground truth):
@Override public XImportSection getImportSection(final XtextResource resource){
  return cache.get("String_Node_Str",resource,new Provider<XImportSection>(){
    public XImportSection get(){
      XImportSection importSection=XtypeFactory.eINSTANCE.createXImportSection();
      EList<XImportDeclaration> importDeclarations=importSection.getImportDeclarations();
      XPackage xPackage=(XPackage)resource.getContents().get(0);
      EList<XImportDirective> importDirectives=xPackage.getImportDirectives();
      for (      XImportDirective importDirective : importDirectives) {
        JvmDeclaredType importedType=null;
        EObject importedObject=importDirective.getImportedObject();
        if (importedObject instanceof JvmDeclaredType) {
          importedType=(JvmDeclaredType)importedObject;
        }
 else {
          EObject primaryJvmElement=associations.getPrimaryJvmElement(importedObject);
          if (primaryJvmElement instanceof JvmDeclaredType) {
            importedType=(JvmDeclaredType)primaryJvmElement;
          }
        }
        if (importedType != null) {
          XImportDeclaration importDeclaration=XtypeFactory.eINSTANCE.createXImportDeclaration();
          importDeclaration.setImportedType(importedType);
          importDeclaration.setImportedNamespace(importDirective.getImportedNamespace());
          importDeclaration.setExtension(false);
          importDeclaration.setStatic(false);
          importDeclarations.add(importDeclaration);
        }
      }
      return importSection;
    }
  }
);
}
Program: 11722
Project: 11722
Buggy source:
protected void getMissingPackagesHelper(List<EPackage> ePackages,List<GenPackage> genPackages){
  for (  GenPackage genPackage : genPackages) {
    EPackage ePackage=genPackage.getEcorePackage();
    if (ePackage != null) {
      for (Iterator<EObject> j=ePackage.eAllContents(); j.hasNext(); ) {
        EObject eObject=j.next();
        for (Iterator<EObject> k=eObject.eCrossReferences().iterator(); k.hasNext(); ) {
          EObject o=k.next();
          if (o instanceof EClassifier) {
            EClassifier eClassifier=(EClassifier)o;
            if (findGenClassifier(eClassifier) == null) {
              ePackages.add(eClassifier.getEPackage());
            }
          }
        }
      }
    }
  }
}

Fixed version (ground truth):
protected void getMissingPackagesHelper(List<EPackage> ePackages,List<GenPackage> genPackages){
  for (int i=0; i < genPackages.size(); ++i) {
    EPackage ePackage=genPackages.get(i).getEcorePackage();
    if (ePackage != null) {
      for (Iterator<EObject> j=ePackage.eAllContents(); j.hasNext(); ) {
        EObject eObject=j.next();
        for (Iterator<EObject> k=eObject.eCrossReferences().iterator(); k.hasNext(); ) {
          EObject o=k.next();
          if (o instanceof EClassifier) {
            EClassifier eClassifier=(EClassifier)o;
            if (findGenClassifier(eClassifier) == null) {
              ePackages.add(eClassifier.getEPackage());
            }
          }
        }
      }
    }
  }
}
Program: 11723
Project: 11723
Buggy source:
@Override public boolean select(Viewer viewer,Object parentElement,Object element){
  if (element instanceof IFile) {
    IFile file=(IFile)element;
    URI uri=URI.createPlatformResourceURI(file.getFullPath().toString(),true);
    return "String_Node_Str".equals(file.getFileExtension()) && !file.getFullPath().equals(genModelPath) && !genModelURIs.contains(uri);
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean select(Viewer viewer,Object parentElement,Object element){
  if (element instanceof IFile) {
    IFile file=(IFile)element;
    URI uri=URI.createPlatformResourceURI(file.getFullPath().toString(),true);
    String fileExtension=file.getFileExtension();
    return ("String_Node_Str".equals(fileExtension) || "String_Node_Str".equals(fileExtension)) && !file.getFullPath().equals(genModelPath) && !genModelURIs.contains(uri);
  }
  return true;
}
Program: 11725
Project: 11725
Buggy source:
@Override protected Diagnostic doComputeEPackages(Monitor monitor) throws Exception {
  Diagnostic diagnostic=Diagnostic.OK_INSTANCE;
  List<URI> locationURIs=getModelLocationURIs();
  if (locationURIs.isEmpty()) {
    diagnostic=new BasicDiagnostic(Diagnostic.ERROR,EcoreImporterPlugin.getPlugin().getBundle().getSymbolicName(),0,EcoreImporterPlugin.INSTANCE.getString("String_Node_Str"),null);
  }
 else {
    monitor.beginTask("String_Node_Str",2);
    monitor.subTask(EcoreImporterPlugin.INSTANCE.getString("String_Node_Str",new Object[]{locationURIs}));
    ResourceSet ecoreResourceSet=createResourceSet();
    for (    URI ecoreModelLocation : locationURIs) {
      ecoreResourceSet.getResource(ecoreModelLocation,true);
    }
    EcoreUtil.resolveAll(ecoreResourceSet);
    for (    Resource resource : ecoreResourceSet.getResources()) {
      getEPackages().addAll(EcoreUtil.<EPackage>getObjectsByType(resource.getContents(),EcorePackage.Literals.EPACKAGE));
    }
    BasicDiagnostic diagnosticChain=new BasicDiagnostic(ConverterPlugin.ID,ConverterUtil.ACTION_MESSAGE_NONE,EcoreImporterPlugin.INSTANCE.getString("String_Node_Str"),null);
    for (    EPackage ePackage : getEPackages()) {
      Diagnostician.INSTANCE.validate(ePackage,diagnosticChain);
    }
    if (diagnosticChain.getSeverity() != Diagnostic.OK) {
      diagnostic=diagnosticChain;
    }
  }
  return diagnostic;
}

Fixed version (ground truth):
@Override protected Diagnostic doComputeEPackages(Monitor monitor) throws Exception {
  Diagnostic diagnostic=Diagnostic.OK_INSTANCE;
  List<URI> locationURIs=getModelLocationURIs();
  if (locationURIs.isEmpty()) {
    diagnostic=new BasicDiagnostic(Diagnostic.ERROR,EcoreImporterPlugin.getPlugin().getBundle().getSymbolicName(),0,EcoreImporterPlugin.INSTANCE.getString("String_Node_Str"),null);
  }
 else {
    monitor.beginTask("String_Node_Str",2);
    monitor.subTask(EcoreImporterPlugin.INSTANCE.getString("String_Node_Str",new Object[]{locationURIs}));
    ResourceSet ecoreResourceSet=createResourceSet();
    for (    URI ecoreModelLocation : locationURIs) {
      ecoreResourceSet.getResource(ecoreModelLocation,true);
    }
    EcoreUtil.resolveAll(ecoreResourceSet);
    List<EPackage> ePackages=getEPackages();
    for (    Resource resource : ecoreResourceSet.getResources()) {
      ePackages.addAll(EcoreUtil.<EPackage>getObjectsByType(resource.getContents(),EcorePackage.Literals.EPACKAGE));
    }
    for (Iterator<EPackage> i=ePackages.iterator(); i.hasNext(); ) {
      if ("String_Node_Str".equals(i.next().getNsURI())) {
        i.remove();
      }
    }
    BasicDiagnostic diagnosticChain=new BasicDiagnostic(ConverterPlugin.ID,ConverterUtil.ACTION_MESSAGE_NONE,EcoreImporterPlugin.INSTANCE.getString("String_Node_Str"),null);
    for (    EPackage ePackage : ePackages) {
      Diagnostician.INSTANCE.validate(ePackage,diagnosticChain);
    }
    if (diagnosticChain.getSeverity() != Diagnostic.OK) {
      diagnostic=diagnosticChain;
    }
  }
  return diagnostic;
}
Program: 11728
Project: 11728
Buggy source:
public void link(){
  List<Runnable> currentRunnables=new ArrayList<Runnable>(runnables);
  runnables.clear();
  for (  Runnable runnable : currentRunnables) {
    runnable.run();
  }
  for (  Runnable runnable : runnables) {
    runnable.run();
  }
}

Fixed version (ground truth):
public void link(){
  List<Runnable> currentRunnables=new ArrayList<Runnable>(runnables);
  runnables.clear();
  for (  Runnable runnable : currentRunnables) {
    try {
      runnable.run();
    }
 catch (    Throwable throwable) {
      XcorePlugin.INSTANCE.log(throwable);
    }
  }
  for (  Runnable runnable : runnables) {
    try {
      runnable.run();
    }
 catch (    Throwable throwable) {
      XcorePlugin.INSTANCE.log(throwable);
    }
  }
}
Program: 11730
Project: 11730
Buggy source:
public void linkInstanceTypes(){
  for (  Runnable runnable : instanceTypeRunnables) {
    runnable.run();
  }
}

Fixed version (ground truth):
public void linkInstanceTypes(){
  for (  Runnable runnable : instanceTypeRunnables) {
    try {
      runnable.run();
    }
 catch (    Throwable throwable) {
      XcorePlugin.INSTANCE.log(throwable);
    }
  }
}
Program: 11731
Project: 11731
Buggy source:
/** 
 * @since 2.8
 */
protected String indentAndImport(String body,String indentation){
  if (body != null) {
    StringBuffer stringBuffer=new StringBuffer(indent(body,indentation));
    for (int i=0; i < stringBuffer.length(); ) {
      int start=stringBuffer.indexOf("String_Node_Str",i);
      if (start == -1) {
        break;
      }
 else {
        int end=stringBuffer.indexOf("String_Node_Str",start + 2);
        if (end == -1) {
          break;
        }
 else {
          String qualifiedName=stringBuffer.substring(start + 2,end);
          String importedName=getGenModel().getImportedName(qualifiedName);
          stringBuffer.replace(start,end + 2,importedName);
          i+=importedName.length();
        }
      }
    }
    return stringBuffer.toString();
  }
 else {
    return null;
  }
}

Fixed version (ground truth):
/** 
 * @since 2.8
 */
protected String indentAndImport(String body,String indentation){
  if (body != null) {
    StringBuffer stringBuffer=new StringBuffer(indent(body,indentation));
    for (int i=0; i < stringBuffer.length(); ) {
      int start=stringBuffer.indexOf("String_Node_Str",i);
      if (start == -1) {
        break;
      }
 else {
        int end=stringBuffer.indexOf("String_Node_Str",start + 2);
        if (end == -1) {
          break;
        }
 else {
          String qualifiedName=stringBuffer.substring(start + 2,end);
          String importedName=getGenModel().getImportedName(qualifiedName);
          stringBuffer.replace(start,end + 2,importedName);
          i=start + importedName.length();
        }
      }
    }
    return stringBuffer.toString();
  }
 else {
    return null;
  }
}
Program: 11732
Project: 11732
Buggy source:
@Override public ITreeAppendable append(CharSequence value){
  String string=value.toString();
  if (string.startsWith("String_Node_Str") || string.startsWith("String_Node_Str") || string.startsWith("String_Node_Str")|| string.startsWith("String_Node_Str")) {
    return super.append("String_Node_Str").append(string.substring(1));
  }
 else   if (string.endsWith("String_Node_Str")) {
    return super.append(string.substring(0,string.length() - 2)).append("String_Node_Str");
  }
 else   if (string.endsWith("String_Node_Str")) {
    return super.append(string.substring(0,string.length() - 3)).append("String_Node_Str");
  }
 else   if (string.startsWith("String_Node_Str")) {
    return super.append("String_Node_Str").append(string.substring(2));
  }
 else   if (string.endsWith("String_Node_Str")) {
    return super.append(string.substring(0,string.length() - 1)).append("String_Node_Str");
  }
 else {
    return super.append(value);
  }
}

Fixed version (ground truth):
@Override public ITreeAppendable append(CharSequence value){
  String string=value.toString();
  if (string.equals("String_Node_Str")) {
    if (!inDoubleQuotedString) {
      inSingleQuotedString=!inSingleQuotedString;
    }
    return super.append(value);
  }
 else   if (string.equals("String_Node_Str")) {
    if (!inSingleQuotedString) {
      inDoubleQuotedString=!inDoubleQuotedString;
    }
    return super.append(value);
  }
 else   if (inSingleQuotedString || inDoubleQuotedString) {
    return super.append(string.replace("String_Node_Str","String_Node_Str"));
  }
 else   if (string.startsWith("String_Node_Str") || string.startsWith("String_Node_Str") || string.startsWith("String_Node_Str")|| string.startsWith("String_Node_Str")) {
    return super.append("String_Node_Str").append(string.substring(1));
  }
 else   if (string.endsWith("String_Node_Str")) {
    return super.append(string.substring(0,string.length() - 2)).append("String_Node_Str");
  }
 else   if (string.endsWith("String_Node_Str")) {
    return super.append(string.substring(0,string.length() - 3)).append("String_Node_Str");
  }
 else   if (string.startsWith("String_Node_Str")) {
    return super.append("String_Node_Str").append(string.substring(2));
  }
 else   if (string.endsWith("String_Node_Str")) {
    return super.append(string.substring(0,string.length() - 1)).append("String_Node_Str");
  }
 else {
    return super.append(value);
  }
}
Program: 11735
Project: 11735
Buggy source:
/** 
 * Decorate the given   {@code styledString} by underlying the whole given {@code styledString} with a  {@link SWT#UNDERLINE_ERROR} underline style colored in {@link JFacePreferences#ERROR_COLOR}.
 */
public StyledString decorateStyledText(StyledString styledString,Object object){
  if (styledString == null || object == null) {
    throw new NullPointerException();
  }
  Diagnostic diagnostic=getDecorations().get(object);
  if (diagnostic != null && diagnostic.getSeverity() >= Diagnostic.WARNING) {
    StyledString result=new StyledString();
    StyleRange[] styleRanges=styledString.getStyleRanges();
    String string=styledString.getString();
    if (styleRanges.length == 0) {
      result.append(string,ErrorStyler.INSTANCE);
    }
 else {
      int start=0;
      for (      StyleRange range : styleRanges) {
        if (start < range.start) {
          result.append(string.substring(start,(range.start - start)),ErrorStyler.INSTANCE);
        }
        start=range.start + range.length;
        result.append(string.substring(range.start,start),new ComposedStyler(range,ErrorStyler.INSTANCE));
      }
      if (start < styledString.length()) {
        result.append(string.substring(start,string.length()),ErrorStyler.INSTANCE);
      }
    }
    return result;
  }
  return styledString;
}

Fixed version (ground truth):
/** 
 * Decorate the given   {@code styledString} by underlying the whole given {@code styledString} with a  {@link SWT#UNDERLINE_ERROR} underline style colored in {@link JFacePreferences#ERROR_COLOR}.
 */
@Override public StyledString decorateStyledText(StyledString styledString,Object object){
  if (styledString == null || object == null) {
    throw new NullPointerException();
  }
  Diagnostic diagnostic=getDecorations().get(object);
  if (diagnostic != null && diagnostic.getSeverity() >= Diagnostic.WARNING) {
    StyledString result=new StyledString();
    StyleRange[] styleRanges=styledString.getStyleRanges();
    String string=styledString.getString();
    if (styleRanges.length == 0) {
      result.append(string,ErrorStyler.INSTANCE);
    }
 else {
      int start=0;
      for (      StyleRange range : styleRanges) {
        if (start < range.start) {
          result.append(string.substring(start,(range.start - start)),ErrorStyler.INSTANCE);
        }
        start=range.start + range.length;
        result.append(string.substring(range.start,start),new ComposedStyler(range,ErrorStyler.INSTANCE));
      }
      if (start < styledString.length()) {
        result.append(string.substring(start,string.length()),ErrorStyler.INSTANCE);
      }
    }
    return result;
  }
  return styledString;
}
Program: 11737
Project: 11737
Buggy source:
public FragmentCache(XcoreResource xcoreResource){
  XcoreResource.this.eAdapters.add(this);
}

Fixed version (ground truth):
public FragmentCache(XcoreResource xcoreResource){
  XcoreResource.this.eAdapters().add(this);
}
Program: 11742
Project: 11742
Buggy source:
@Override protected Multimap<Class<?>,Class<?>> simpleComputeExtensionClasses(){
  Multimap<Class<?>,Class<?>> result=super.simpleComputeExtensionClasses();
  result.put(Iterable.class,ECollections.class);
  result.put(Iterable.class,XcoreIterableExtensions.class);
  result.put(Iterator.class,ECollections.class);
  result.put(List.class,ECollections.class);
  result.put(EMap.class,ECollections.class);
  result.put(EList.class,ECollections.class);
  result.put(EList.class,XcoreEListExtensions.class);
  result.put(EObject.class,EcoreUtil.class);
  result.put(EClass.class,EcoreUtil.class);
  result.put(EDataType.class,EcoreUtil.class);
  result.put(EModelElement.class,EcoreUtil.class);
  result.put(EGenericType.class,EcoreUtil.class);
  result.put(Notifier.class,EcoreUtil.class);
  result.put(Resource.class,EcoreUtil.class);
  result.put(ResourceSet.class,EcoreUtil.class);
  return result;
}

Fixed version (ground truth):
@Override protected Multimap<Class<?>,Class<?>> simpleComputeExtensionClasses(){
  Multimap<Class<?>,Class<?>> result=super.simpleComputeExtensionClasses();
  result.put(Object.class,XcoreObjectsExtensions.class);
  result.put(Iterable.class,ECollections.class);
  result.put(Iterable.class,XcoreIterableExtensions.class);
  result.put(Iterator.class,ECollections.class);
  result.put(List.class,ECollections.class);
  result.put(EMap.class,ECollections.class);
  result.put(EList.class,ECollections.class);
  result.put(EList.class,XcoreEListExtensions.class);
  result.put(EObject.class,EcoreUtil.class);
  result.put(EClass.class,EcoreUtil.class);
  result.put(EDataType.class,EcoreUtil.class);
  result.put(EModelElement.class,EcoreUtil.class);
  result.put(EGenericType.class,EcoreUtil.class);
  result.put(Notifier.class,EcoreUtil.class);
  result.put(Resource.class,EcoreUtil.class);
  result.put(ResourceSet.class,EcoreUtil.class);
  return result;
}
Program: 11744
Project: 11744
Buggy source:
@Override protected Multimap<Class<?>,Class<?>> simpleComputeExtensionClasses(){
  Multimap<Class<?>,Class<?>> result=super.simpleComputeExtensionClasses();
  result.put(Object.class,XcoreObjectsExtensions.class);
  result.put(Iterable.class,ECollections.class);
  result.put(Iterable.class,XcoreIterableExtensions.class);
  result.put(Iterator.class,ECollections.class);
  result.put(List.class,ECollections.class);
  result.put(EMap.class,ECollections.class);
  result.put(EList.class,ECollections.class);
  result.put(EList.class,XcoreEListExtensions.class);
  result.put(EObject.class,EcoreUtil.class);
  result.put(EClass.class,EcoreUtil.class);
  result.put(EDataType.class,EcoreUtil.class);
  result.put(EModelElement.class,EcoreUtil.class);
  result.put(EGenericType.class,EcoreUtil.class);
  result.put(Notifier.class,EcoreUtil.class);
  result.put(Resource.class,EcoreUtil.class);
  result.put(ResourceSet.class,EcoreUtil.class);
  return result;
}

Fixed version (ground truth):
@Override protected Multimap<Class<?>,Class<?>> simpleComputeExtensionClasses(){
  Multimap<Class<?>,Class<?>> result=super.simpleComputeExtensionClasses();
  result.put(Iterable.class,ECollections.class);
  result.put(Iterable.class,XcoreIterableExtensions.class);
  result.put(Iterator.class,ECollections.class);
  result.put(List.class,ECollections.class);
  result.put(EMap.class,ECollections.class);
  result.put(EList.class,ECollections.class);
  result.put(EList.class,XcoreEListExtensions.class);
  result.put(EObject.class,EcoreUtil.class);
  result.put(EClass.class,EcoreUtil.class);
  result.put(EDataType.class,EcoreUtil.class);
  result.put(EModelElement.class,EcoreUtil.class);
  result.put(EGenericType.class,EcoreUtil.class);
  result.put(Notifier.class,EcoreUtil.class);
  result.put(Resource.class,EcoreUtil.class);
  result.put(ResourceSet.class,EcoreUtil.class);
  return result;
}
Program: 11745
Project: 11745
Buggy source:
@Override protected Object doGetValue(Object source){
  List<?> list=delegate.getList(source);
  @SuppressWarnings("String_Node_Str") int idx=elementAccess.getReadValueIndex(list);
  if (idx != WriteData.NO_INDEX) {
    return list.get(idx);
  }
  return null;
}

Fixed version (ground truth):
@Override protected Object doGetValue(Object source){
  List<?> list=listFromDelegate(source);
  @SuppressWarnings("String_Node_Str") int idx=elementAccess.getReadValueIndex(list);
  if (idx != WriteData.NO_INDEX) {
    return list.get(idx);
  }
  return null;
}
Program: 11746
Project: 11746
Buggy source:
public String getRawImportedType(){
  if (isFeatureMapType())   return getGenModel().getImportedName(getEffectiveFeatureMapWrapperInterface());
  if (isMapType())   return getGenModel().getImportedName(getEffectiveMapType());
  if (isMapEntryType())   return getGenModel().getImportedName(getEffectiveMapEntryType());
  if (isListType())   return getGenModel().getImportedName(getEffectiveListType());
  if (isEObjectType())   return getGenModel().getImportedName(getEffectiveEObjectType());
  return getImportedType(null,getEcoreTypedElement().getEType(),false);
}

Fixed version (ground truth):
public String getRawImportedType(){
  if (isFeatureMapType())   return getGenModel().getImportedName(getEffectiveFeatureMapWrapperInterface());
  if (isMapType())   return getGenModel().getImportedName(getEffectiveMapType());
  if (isListType())   return getGenModel().getImportedName(getEffectiveListType());
  if (isMapEntryType())   return getGenModel().getImportedName(getEffectiveMapEntryType());
  if (isEObjectType())   return getGenModel().getImportedName(getEffectiveEObjectType());
  return getImportedType(null,getEcoreTypedElement().getEType(),false);
}
Program: 11747
Project: 11747
Buggy source:
public String getListItemType(GenClass context){
  return getImportedType(context,getEcoreTypedElement().getEGenericType(),true);
}

Fixed version (ground truth):
public String getListItemType(GenClass context){
  if (isMapEntryType())   return getGenModel().getImportedName(getEffectiveMapEntryType(context,getEcoreTypedElement().getEGenericType(),getMapEntryTypeGenClass()));
  return getImportedType(context,getEcoreTypedElement().getEGenericType(),true);
}
Program: 11748
Project: 11748
Buggy source:
public String getRawBoundType(){
  if (isFeatureMapType())   return getEffectiveFeatureMapWrapperInterface();
  if (isMapType())   return getEffectiveMapType();
  if (isMapEntryType())   return getEffectiveMapEntryType();
  if (isListType())   return getEffectiveListType();
  if (isEObjectType())   return getEffectiveEObjectType();
  return getType(getContext(),getBoundType(getEcoreTypedElement().getEGenericType()),false,true);
}

Fixed version (ground truth):
public String getRawBoundType(){
  if (isFeatureMapType())   return getEffectiveFeatureMapWrapperInterface();
  if (isMapType())   return getEffectiveMapType();
  if (isListType())   return getEffectiveListType();
  if (isMapEntryType())   return getEffectiveMapEntryType();
  if (isEObjectType())   return getEffectiveEObjectType();
  return getType(getContext(),getBoundType(getEcoreTypedElement().getEGenericType()),false,true);
}
Program: 11749
Project: 11749
Buggy source:
public String getType(GenClass context){
  if (isFeatureMapType())   return getEffectiveFeatureMapWrapperInterface();
  if (isMapType())   return getEffectiveMapType(context,getEcoreTypedElement().getEGenericType(),getMapEntryTypeGenClass());
  if (isMapEntryType())   return getEffectiveMapEntryType(context,getEcoreTypedElement().getEGenericType(),getMapEntryTypeGenClass());
  if (isListType())   return getEffectiveListType(context,getEcoreTypedElement().getEGenericType());
  if (isEObjectType())   return getEffectiveEObjectType();
  if (isListDataType() && getEffectiveComplianceLevel().getValue() >= GenJDKLevel.JDK50) {
    return "String_Node_Str" + getType(context,getListDataType().getEcoreDataType(),true) + "String_Node_Str";
  }
  return getType(context,getEcoreTypedElement().getEGenericType(),false);
}

Fixed version (ground truth):
public String getType(GenClass context){
  if (isFeatureMapType())   return getEffectiveFeatureMapWrapperInterface();
  if (isMapType())   return getEffectiveMapType(context,getEcoreTypedElement().getEGenericType(),getMapEntryTypeGenClass());
  if (isMapEntryType())   if (isListType())   if (getEffectiveComplianceLevel().getValue() < GenJDKLevel.JDK50)   return getEffectiveListType();
 else   return getEffectiveListType() + "String_Node_Str" + getEffectiveMapEntryType(context,getEcoreTypedElement().getEGenericType(),getMapEntryTypeGenClass())+ "String_Node_Str";
 else   return getEffectiveMapEntryType(context,getEcoreTypedElement().getEGenericType(),getMapEntryTypeGenClass());
  if (isListType())   return getEffectiveListType(context,getEcoreTypedElement().getEGenericType());
  if (isEObjectType())   return getEffectiveEObjectType();
  if (isListDataType() && getEffectiveComplianceLevel().getValue() >= GenJDKLevel.JDK50) {
    return "String_Node_Str" + getType(context,getListDataType().getEcoreDataType(),true) + "String_Node_Str";
  }
  return getType(context,getEcoreTypedElement().getEGenericType(),false);
}
Program: 11750
Project: 11750
Buggy source:
public String getRawType(){
  if (isFeatureMapType())   return getEffectiveFeatureMapWrapperInterface();
  if (isMapType())   return getEffectiveMapType();
  if (isMapEntryType())   return getEffectiveMapType();
  if (isListType())   return getEffectiveListType();
  if (isEObjectType())   return getEffectiveEObjectType();
  return getType(getContext(),getEcoreTypedElement().getEType(),false,true);
}

Fixed version (ground truth):
public String getRawType(){
  if (isFeatureMapType())   return getEffectiveFeatureMapWrapperInterface();
  if (isMapType())   return getEffectiveMapType();
  if (isListType())   return getEffectiveListType();
  if (isMapEntryType())   return getEffectiveMapType();
  if (isEObjectType())   return getEffectiveEObjectType();
  return getType(getContext(),getEcoreTypedElement().getEType(),false,true);
}
Program: 11751
Project: 11751
Buggy source:
public String getImportedType(GenClass context){
  if (isFeatureMapType())   return getGenModel().getImportedName(getEffectiveFeatureMapWrapperInterface());
  if (isMapType())   return getGenModel().getImportedName(getEffectiveMapType(context,getEcoreTypedElement().getEGenericType(),getMapEntryTypeGenClass()));
  if (isMapEntryType())   return getGenModel().getImportedName(getEffectiveMapEntryType(context,getEcoreTypedElement().getEGenericType(),getMapEntryTypeGenClass()));
  if (isListType())   return getGenModel().getImportedName(getEffectiveListType(context,getEcoreTypedElement().getEGenericType()));
  if (isEObjectType())   return getGenModel().getImportedName(getEffectiveEObjectType());
  if (isListDataType() && getEffectiveComplianceLevel().getValue() >= GenJDKLevel.JDK50) {
    return getGenModel().getImportedName("String_Node_Str") + "String_Node_Str" + getImportedType(context,getListDataType().getEcoreDataType(),true)+ "String_Node_Str";
  }
  return getImportedType(context,getEcoreTypedElement().getEGenericType(),false);
}

Fixed version (ground truth):
public String getImportedType(GenClass context){
  if (isFeatureMapType())   return getGenModel().getImportedName(getEffectiveFeatureMapWrapperInterface());
  if (isMapType())   return getGenModel().getImportedName(getEffectiveMapType(context,getEcoreTypedElement().getEGenericType(),getMapEntryTypeGenClass()));
  if (isMapEntryType())   if (isListType())   if (getEffectiveComplianceLevel().getValue() < GenJDKLevel.JDK50)   return getGenModel().getImportedName(getEffectiveListType());
 else   return getGenModel().getImportedName(getEffectiveListType() + "String_Node_Str" + getEffectiveMapEntryType(context,getEcoreTypedElement().getEGenericType(),getMapEntryTypeGenClass())+ "String_Node_Str");
 else   return getGenModel().getImportedName(getEffectiveMapEntryType(context,getEcoreTypedElement().getEGenericType(),getMapEntryTypeGenClass()));
  if (isListType())   return getGenModel().getImportedName(getEffectiveListType(context,getEcoreTypedElement().getEGenericType()));
  if (isEObjectType())   return getGenModel().getImportedName(getEffectiveEObjectType());
  if (isListDataType() && getEffectiveComplianceLevel().getValue() >= GenJDKLevel.JDK50) {
    return getGenModel().getImportedName("String_Node_Str") + "String_Node_Str" + getImportedType(context,getListDataType().getEcoreDataType(),true)+ "String_Node_Str";
  }
  return getImportedType(context,getEcoreTypedElement().getEGenericType(),false);
}
Program: 11752
Project: 11752
Buggy source:
public String getObjectType(GenClass context){
  if (isFeatureMapType())   return getGenModel().getImportedName(getEffectiveFeatureMapWrapperInterface());
  if (isMapType())   return getGenModel().getImportedName(getEffectiveMapType(context,getEcoreTypedElement().getEGenericType(),getMapEntryTypeGenClass()));
  if (isMapEntryType())   return getGenModel().getImportedName(getEffectiveMapEntryType(context,getEcoreTypedElement().getEGenericType(),getMapEntryTypeGenClass()));
  if (isListType())   return getGenModel().getImportedName(getEffectiveListType(context,getEcoreTypedElement().getEGenericType()));
  if (isEObjectType())   return getGenModel().getImportedName(getEffectiveEObjectType());
  if (isListDataType() && getEffectiveComplianceLevel().getValue() >= GenJDKLevel.JDK50) {
    return getGenModel().getImportedName("String_Node_Str") + "String_Node_Str" + getImportedType(context,getListDataType().getEcoreDataType(),true)+ "String_Node_Str";
  }
  return getImportedType(context,getEcoreTypedElement().getEGenericType(),true);
}

Fixed version (ground truth):
public String getObjectType(GenClass context){
  if (isFeatureMapType())   return getGenModel().getImportedName(getEffectiveFeatureMapWrapperInterface());
  if (isMapType())   return getGenModel().getImportedName(getEffectiveMapType(context,getEcoreTypedElement().getEGenericType(),getMapEntryTypeGenClass()));
  if (isMapEntryType())   if (isListType())   if (getEffectiveComplianceLevel().getValue() < GenJDKLevel.JDK50)   return getGenModel().getImportedName(getEffectiveListType());
 else   return getGenModel().getImportedName(getEffectiveListType() + "String_Node_Str" + getEffectiveMapEntryType(context,getEcoreTypedElement().getEGenericType(),getMapEntryTypeGenClass())+ "String_Node_Str");
 else   return getGenModel().getImportedName(getEffectiveMapEntryType(context,getEcoreTypedElement().getEGenericType(),getMapEntryTypeGenClass()));
  if (isListType())   return getGenModel().getImportedName(getEffectiveListType(context,getEcoreTypedElement().getEGenericType()));
  if (isEObjectType())   return getGenModel().getImportedName(getEffectiveEObjectType());
  if (isListDataType() && getEffectiveComplianceLevel().getValue() >= GenJDKLevel.JDK50) {
    return getGenModel().getImportedName("String_Node_Str") + "String_Node_Str" + getImportedType(context,getListDataType().getEcoreDataType(),true)+ "String_Node_Str";
  }
  return getImportedType(context,getEcoreTypedElement().getEGenericType(),true);
}
Program: 11753
Project: 11753
Buggy source:
public String getRawImportedBoundType(){
  if (isFeatureMapType())   return getGenModel().getImportedName(getEffectiveFeatureMapWrapperInterface());
  if (isMapType())   return getGenModel().getImportedName(getEffectiveMapType());
  if (isMapEntryType())   return getGenModel().getImportedName(getEffectiveMapEntryType());
  if (isListType())   return getGenModel().getImportedName(getEffectiveListType());
  if (isEObjectType())   return getGenModel().getImportedName(getEffectiveEObjectType());
  return getImportedType(null,getBoundType(getEcoreTypedElement().getEGenericType()),false,true);
}

Fixed version (ground truth):
public String getRawImportedBoundType(){
  if (isFeatureMapType())   return getGenModel().getImportedName(getEffectiveFeatureMapWrapperInterface());
  if (isMapType())   return getGenModel().getImportedName(getEffectiveMapType());
  if (isListType())   return getGenModel().getImportedName(getEffectiveListType());
  if (isMapEntryType())   return getGenModel().getImportedName(getEffectiveMapEntryType());
  if (isEObjectType())   return getGenModel().getImportedName(getEffectiveEObjectType());
  return getImportedType(null,getBoundType(getEcoreTypedElement().getEGenericType()),false,true);
}
Program: 11754
Project: 11754
Buggy source:
public String getImportedInternalType(GenClass context){
  if (isFeatureMapType())   return isBlank(getGenModel().getFeatureMapWrapperInternalInterface()) ? getImportedEffectiveFeatureMapWrapperClass() : getImportedEffectiveFeatureMapWrapperInternalInterface();
  if (isMapType())   return getGenModel().getImportedName("String_Node_Str") + getImportedMapTemplateArguments(context);
  if (isMapEntryType())   return getGenModel().getImportedName("String_Node_Str") + getImportedMapTemplateArguments(context);
  if (isListType())   return getGenModel().getImportedName("String_Node_Str") + getListTemplateArguments(context);
  if (isListDataType() && getEffectiveComplianceLevel().getValue() >= GenJDKLevel.JDK50) {
    return getGenModel().getImportedName("String_Node_Str") + "String_Node_Str" + getImportedType(context,getListDataType().getEcoreDataType(),true)+ "String_Node_Str";
  }
  return getImportedType(context,getEcoreTypedElement().getEGenericType(),false);
}

Fixed version (ground truth):
public String getImportedInternalType(GenClass context){
  if (isFeatureMapType())   return isBlank(getGenModel().getFeatureMapWrapperInternalInterface()) ? getImportedEffectiveFeatureMapWrapperClass() : getImportedEffectiveFeatureMapWrapperInternalInterface();
  if (isMapType())   return getGenModel().getImportedName("String_Node_Str") + getImportedMapTemplateArguments(context);
  if (isMapEntryType())   if (isListType())   if (getEffectiveComplianceLevel().getValue() < GenJDKLevel.JDK50)   return getGenModel().getImportedName("String_Node_Str");
 else   return getGenModel().getImportedName("String_Node_Str") + "String_Node_Str" + getGenModel().getImportedName("String_Node_Str")+ getImportedMapTemplateArguments(context)+ "String_Node_Str";
 else   return getGenModel().getImportedName("String_Node_Str") + getImportedMapTemplateArguments(context);
  if (isListType())   return getGenModel().getImportedName("String_Node_Str") + getListTemplateArguments(context);
  if (isListDataType() && getEffectiveComplianceLevel().getValue() >= GenJDKLevel.JDK50) {
    return getGenModel().getImportedName("String_Node_Str") + "String_Node_Str" + getImportedType(context,getListDataType().getEcoreDataType(),true)+ "String_Node_Str";
  }
  return getImportedType(context,getEcoreTypedElement().getEGenericType(),false);
}
Program: 11755
Project: 11755
Buggy source:
public String getQualifiedListItemType(GenClass context){
  return getType(context,getEcoreTypedElement().getEGenericType(),true).replace('$','.');
}

Fixed version (ground truth):
public String getQualifiedListItemType(GenClass context){
  if (isMapEntryType())   return getEffectiveMapEntryType(context,getEcoreTypedElement().getEGenericType(),getMapEntryTypeGenClass()).replace('$','.');
  return getType(context,getEcoreTypedElement().getEGenericType(),true).replace('$','.');
}
Program: 11756
Project: 11756
Buggy source:
public void discardDerivedState(DerivedStateAwareResource resource){
  EList<EObject> contents=resource.getContents();
  int size=contents.size();
  if (size > 1) {
    for (Iterator<EObject> i=contents.iterator(); i.hasNext(); ) {
      EObject eObject=i.next();
      if (eObject instanceof EPackage || eObject instanceof GenModel || eObject instanceof JvmGenericType) {
        unloader.unloadRoot(eObject);
      }
 else       if (eObject instanceof XPackage) {
        mapper.unsetMapping((XPackage)eObject);
      }
    }
  }
}

Fixed version (ground truth):
public void discardDerivedState(DerivedStateAwareResource resource){
  EList<EObject> contents=resource.getContents();
  int size=contents.size();
  if (size > 1) {
    List<EObject> toBeRemoved=newArrayList();
    for (Iterator<EObject> i=contents.iterator(); i.hasNext(); ) {
      EObject eObject=i.next();
      if (eObject instanceof EPackage || eObject instanceof GenModel || eObject instanceof JvmGenericType) {
        unloader.unloadRoot(eObject);
        toBeRemoved.add(eObject);
      }
 else       if (eObject instanceof XPackage) {
        mapper.unsetMapping((XPackage)eObject);
      }
    }
    contents.removeAll(toBeRemoved);
  }
}
Program: 11759
Project: 11759
Buggy source:
@Override protected List<IEObjectDescription> computeExportedObjects(){
  Resource resource=getResource();
  if (resource instanceof XtextResource) {
    if (resource.isLoaded()) {
      try {
        resource.load(null);
      }
 catch (      IOException e) {
        log.error(e.getMessage(),e);
        return Collections.<IEObjectDescription>emptyList();
      }
    }
    IParseResult parseResult=((XtextResource)resource).getParseResult();
    if (parseResult != null && parseResult.getRootASTElement() != null) {
      final List<IEObjectDescription> result=newArrayList();
      IAcceptor<IEObjectDescription> acceptor=new IAcceptor<IEObjectDescription>(){
        public void accept(        IEObjectDescription description){
          result.add(description);
        }
      }
;
      TreeIterator<EObject> allProperContents=EcoreUtil2.eAll(parseResult.getRootASTElement());
      while (allProperContents.hasNext()) {
        EObject content=allProperContents.next();
        if (!strategy.createEObjectDescriptions(content,acceptor)) {
          allProperContents.prune();
        }
      }
      return result;
    }
  }
  return super.computeExportedObjects();
}

Fixed version (ground truth):
@Override protected List<IEObjectDescription> computeExportedObjects(){
  Resource resource=getResource();
  if (resource instanceof XtextResource) {
    if (!resource.isLoaded()) {
      try {
        resource.load(null);
      }
 catch (      IOException e) {
        log.error(e.getMessage(),e);
        return Collections.<IEObjectDescription>emptyList();
      }
    }
    IParseResult parseResult=((XtextResource)resource).getParseResult();
    if (parseResult != null && parseResult.getRootASTElement() != null) {
      final List<IEObjectDescription> result=newArrayList();
      IAcceptor<IEObjectDescription> acceptor=new IAcceptor<IEObjectDescription>(){
        public void accept(        IEObjectDescription description){
          result.add(description);
        }
      }
;
      TreeIterator<EObject> allProperContents=EcoreUtil2.eAll(parseResult.getRootASTElement());
      while (allProperContents.hasNext()) {
        EObject content=allProperContents.next();
        if (!strategy.createEObjectDescriptions(content,acceptor)) {
          allProperContents.prune();
        }
      }
      return result;
    }
  }
  return super.computeExportedObjects();
}
Program: 11760
Project: 11760
Buggy source:
@Override public boolean createEObjectDescriptions(EObject eObject,IAcceptor<IEObjectDescription> acceptor){
  if (eObject instanceof XClass) {
    QualifiedName qn=nameProvider.getFullyQualifiedName(eObject);
    if (qn != null) {
      createGenModelDescription(eObject.eResource().getURI(),acceptor,qn);
      createEcoreDescription(eObject.eResource().getURI(),acceptor,qn);
      createJvmTypesDescription(eObject.eResource().getURI(),acceptor,qn);
    }
    return false;
  }
  if (eObject instanceof XDataType) {
    QualifiedName qn=nameProvider.getFullyQualifiedName(eObject);
    if (qn != null) {
      GenDataType genDatatype=genFactory.createGenDataType();
      proxyTool.installProxyURI(eObject.eResource().getURI(),genDatatype,qn);
      acceptor.accept(EObjectDescription.create(qn,genDatatype));
    }
    return false;
  }
  return true;
}

Fixed version (ground truth):
@Override public boolean createEObjectDescriptions(EObject eObject,IAcceptor<IEObjectDescription> acceptor){
  if (eObject instanceof XClass) {
    QualifiedName qn=nameProvider.getFullyQualifiedName(eObject);
    if (qn != null) {
      URI uri=eObject.eResource().getURI();
      createGenModelDescription(uri,acceptor,qn);
      createEcoreDescription(uri,acceptor,qn);
      createJvmTypesDescription(uri,acceptor,qn);
    }
    return false;
  }
  if (eObject instanceof XDataType) {
    QualifiedName qn=nameProvider.getFullyQualifiedName(eObject);
    if (qn != null) {
      GenDataType genDatatype=genFactory.createGenDataType();
      proxyTool.installProxyURI(eObject.eResource().getURI(),genDatatype,qn);
      acceptor.accept(EObjectDescription.create(qn,genDatatype));
    }
    return false;
  }
  if (eObject instanceof XAnnotationDirective) {
    QualifiedName qn=nameProvider.getFullyQualifiedName(eObject);
    if (qn != null) {
      acceptor.accept(EObjectDescription.create(qn,eObject));
    }
  }
  return true;
}
Program: 11761
Project: 11761
Buggy source:
public void discardDerivedState(DerivedStateAwareResource resource){
  EList<EObject> contents=resource.getContents();
  int size=contents.size();
  if (size > 1) {
    List<EObject> toBeRemoved=newArrayList();
    for (Iterator<EObject> i=contents.iterator(); i.hasNext(); ) {
      EObject eObject=i.next();
      if (eObject instanceof EPackage || eObject instanceof GenModel || eObject instanceof JvmGenericType) {
        unloader.unloadRoot(eObject);
        toBeRemoved.add(eObject);
      }
 else       if (eObject instanceof XPackage) {
        mapper.unsetMapping((XPackage)eObject);
      }
    }
    contents.removeAll(toBeRemoved);
  }
}

Fixed version (ground truth):
public void discardDerivedState(DerivedStateAwareResource resource){
  EList<EObject> contents=resource.getContents();
  int size=contents.size();
  if (size > 1) {
    List<EObject> toBeRemoved=newArrayList();
    for (Iterator<EObject> i=contents.iterator(); i.hasNext(); ) {
      EObject eObject=i.next();
      if (eObject instanceof XPackage) {
        mapper.unsetMapping((XPackage)eObject);
      }
 else {
        unloader.unloadRoot(eObject);
        toBeRemoved.add(eObject);
      }
    }
    contents.removeAll(toBeRemoved);
  }
}
Program: 11762
Project: 11762
Buggy source:
EOperation getEOperation(XOperation xOperation){
  EOperation eOperation=EcoreFactory.eINSTANCE.createEOperation();
  map(eOperation,xOperation);
  eOperation.setUnique(false);
  handleETypedElement(eOperation,xOperation);
  for (  XTypeParameter xTypeParameter : xOperation.getTypeParameters()) {
    ETypeParameter eTypeParameter=getETypeParameter(xTypeParameter);
    eOperation.getETypeParameters().add(eTypeParameter);
  }
  for (  XParameter xParameter : xOperation.getParameters()) {
    EParameter eParameter=getEParameter(xParameter);
    eOperation.getEParameters().add(eParameter);
  }
  for (  XGenericType exception : xOperation.getExceptions()) {
    EGenericType eException=getEGenericType(exception);
    eOperation.getEGenericExceptions().add(eException);
  }
  XBlockExpression body=xOperation.getBody();
  if (body != null) {
    EAnnotation eAnnotation=EcoreFactory.eINSTANCE.createEAnnotation();
    eAnnotation.setSource(EcorePackage.eNS_URI);
    eAnnotation.getContents().add(EcoreUtil2.cloneWithProxies(body));
    eOperation.getEAnnotations().add(eAnnotation);
  }
  return eOperation;
}

Fixed version (ground truth):
EOperation getEOperation(XOperation xOperation){
  EOperation eOperation=EcoreFactory.eINSTANCE.createEOperation();
  map(eOperation,xOperation);
  eOperation.setUnique(false);
  handleETypedElement(eOperation,xOperation);
  for (  XTypeParameter xTypeParameter : xOperation.getTypeParameters()) {
    ETypeParameter eTypeParameter=getETypeParameter(xTypeParameter);
    eOperation.getETypeParameters().add(eTypeParameter);
  }
  for (  XParameter xParameter : xOperation.getParameters()) {
    EParameter eParameter=getEParameter(xParameter);
    eOperation.getEParameters().add(eParameter);
  }
  for (  XGenericType exception : xOperation.getExceptions()) {
    EGenericType eException=getEGenericType(exception);
    eOperation.getEGenericExceptions().add(eException);
  }
  XBlockExpression body=xOperation.getBody();
  if (body != null) {
    EAnnotation eAnnotation=EcoreFactory.eINSTANCE.createEAnnotation();
    eAnnotation.setSource(EcorePackage.eNS_URI);
    eAnnotation.getReferences().add(body);
    eOperation.getEAnnotations().add(eAnnotation);
  }
  return eOperation;
}
Program: 11763
Project: 11763
Buggy source:
@Override protected void updateInternalState(IParseResult parseResult){
  for (Iterator<EObject> i=getContents().iterator(); i.hasNext(); ) {
    EObject eObject=i.next();
    if (eObject instanceof EPackage || eObject instanceof GenModel || eObject instanceof JvmGenericType) {
      unloader.unloadRoot(eObject);
      i.remove();
    }
  }
  fullyInitialized=false;
  super.updateInternalState(parseResult);
}

Fixed version (ground truth):
@Override protected void updateInternalState(IParseResult parseResult){
  EObject ePackage=null;
  EList<EObject> contents=getContents();
  int size=contents.size();
  if (size > 1) {
    for (Iterator<EObject> i=contents.iterator(); i.hasNext(); ) {
      EObject eObject=i.next();
      if (eObject instanceof EPackage) {
        ePackage=eObject;
      }
 else       if (eObject instanceof GenModel || eObject instanceof JvmGenericType) {
        unloader.unloadRoot(eObject);
        if (ePackage != null) {
          unloader.unloadRoot(ePackage);
          ePackage=null;
        }
      }
    }
    contents.clear();
  }
  super.updateInternalState(parseResult);
  fullyInitialized=false;
}
Program: 11764
Project: 11764
Buggy source:
Mapping(EObject eObject){
  this.eObject=eObject;
}

Fixed version (ground truth):
Mapping(EObject eObject,Mapping other){
  this.eObject=eObject;
  this.other=other;
}