nus-yam/ex-repair huggingface dataset:
Program: 86344
Project: 86344
Buggy source:
private OpacApi initApi(Library lib) throws ClientProtocolException, SocketException, IOException, NotReachableException {
  OpacApi api=null;
  if (lib.getApi().equals("String_Node_Str"))   api=new Bond26();
 else   return null;
  api.init(this,lib.getData());
  return api;
}

Fixed version (ground truth):
private OpacApi initApi(Library lib) throws ClientProtocolException, SocketException, IOException, NotReachableException {
  api=null;
  if (lib.getApi().equals("String_Node_Str"))   api=new Bond26();
 else   return null;
  api.init(this,lib.getData());
  return api;
}
Program: 86345
Project: 86345
Buggy source:
public Account getAccount(){
  if (account != null) {
    if (sp.getLong(PREF_SELECTED_ACCOUNT,0) == account.getId()) {
      return account;
    }
  }
  AccountDataSource data=new AccountDataSource(this);
  data.open();
  Account acc=data.getAccount(sp.getLong(PREF_SELECTED_ACCOUNT,0));
  data.close();
  return acc;
}

Fixed version (ground truth):
public Account getAccount(){
  if (account != null) {
    if (sp.getLong(PREF_SELECTED_ACCOUNT,0) == account.getId()) {
      return account;
    }
  }
  AccountDataSource data=new AccountDataSource(this);
  data.open();
  account=data.getAccount(sp.getLong(PREF_SELECTED_ACCOUNT,0));
  data.close();
  return account;
}
Program: 86346
Project: 86346
Buggy source:
public void setAccount(long id){
  sp.edit().putLong(OpacClient.PREF_SELECTED_ACCOUNT,id).commit();
}

Fixed version (ground truth):
public void setAccount(long id){
  sp.edit().putLong(OpacClient.PREF_SELECTED_ACCOUNT,id).commit();
  account=null;
  api=null;
}
Program: 86347
Project: 86347
Buggy source:
private OpacApi initApi(Library lib) throws ClientProtocolException, SocketException, IOException, NotReachableException {
  OpacApi api=null;
  if (lib.getApi().equals("String_Node_Str"))   api=new Bond26();
 else   return null;
  api.init(this,lib.getData());
  return api;
}

Fixed version (ground truth):
private OpacApi initApi(Library lib) throws ClientProtocolException, SocketException, IOException, NotReachableException {
  api=null;
  if (lib.getApi().equals("String_Node_Str"))   api=new Bond26();
 else   return null;
  api.init(this,lib.getData());
  return api;
}
Program: 86348
Project: 86348
Buggy source:
public boolean isStarred(String bib,String id){
  List<Starred> items=new ArrayList<Starred>();
  String[] selA={bib,id};
  Cursor cursor=database.query("String_Node_Str",allColumns,"String_Node_Str",selA,null,null,null);
  return (cursor.getCount() > 0);
}

Fixed version (ground truth):
public boolean isStarred(String bib,String id){
  List<Starred> items=new ArrayList<Starred>();
  String[] selA={bib,id};
  Cursor cursor=database.query("String_Node_Str",allColumns,"String_Node_Str",selA,null,null,null);
  int c=cursor.getCount();
  cursor.close();
  return (c > 0);
}
Program: 86349
Project: 86349
Buggy source:
public void init() throws ClientProtocolException, IOException, NotReachableException {
  initialised=true;
  HttpGet httpget=new HttpGet(opac_url + "String_Node_Str");
  HttpResponse response=ahc.execute(httpget);
  if (response.getStatusLine().getStatusCode() == 500) {
    throw new NotReachableException();
  }
  response.getEntity().consumeContent();
  HttpPost httppost=new HttpPost(opac_url + "String_Node_Str");
  List<NameValuePair> nameValuePairs=new ArrayList<NameValuePair>(2);
  nameValuePairs.add(new BasicNameValuePair("String_Node_Str","String_Node_Str"));
  nameValuePairs.add(new BasicNameValuePair("String_Node_Str","String_Node_Str"));
  httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
  response=ahc.execute(httppost);
  String html=convertStreamToString(response.getEntity().getContent());
  extract_information(html);
}

Fixed version (ground truth):
public void init() throws ClientProtocolException, IOException, NotReachableException, SocketException {
  initialised=true;
  HttpGet httpget=new HttpGet(opac_url + "String_Node_Str");
  HttpResponse response=ahc.execute(httpget);
  if (response.getStatusLine().getStatusCode() == 500) {
    throw new NotReachableException();
  }
  response.getEntity().consumeContent();
  HttpPost httppost=new HttpPost(opac_url + "String_Node_Str");
  List<NameValuePair> nameValuePairs=new ArrayList<NameValuePair>(2);
  nameValuePairs.add(new BasicNameValuePair("String_Node_Str","String_Node_Str"));
  nameValuePairs.add(new BasicNameValuePair("String_Node_Str","String_Node_Str"));
  httppost.setEntity(new UrlEncodedFormEntity(nameValuePairs));
  response=ahc.execute(httppost);
  String html=convertStreamToString(response.getEntity().getContent());
  extract_information(html);
}
Program: 86351
Project: 86351
Buggy source:
@Override public View getView(int position,View contentView,ViewGroup viewGroup){
  View view=null;
  if (objects.get(position) == null) {
    LayoutInflater layoutInflater=(LayoutInflater)getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    view=layoutInflater.inflate(R.layout.searchresult_listitem,viewGroup,false);
    return view;
  }
  Starred item=objects.get(position);
  if (contentView == null) {
    LayoutInflater layoutInflater=(LayoutInflater)getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    view=layoutInflater.inflate(R.layout.starred_item,viewGroup,false);
  }
 else {
    view=contentView;
  }
  TextView tv=(TextView)view.findViewById(R.id.tvTitle);
  tv.setText(Html.fromHtml(item.getTitle()));
  ImageView iv=(ImageView)view.findViewById(R.id.ivDelete);
  iv.setFocusableInTouchMode(false);
  iv.setFocusable(false);
  iv.setTag(item);
  iv.setOnClickListener(new OnClickListener(){
    @Override public void onClick(    View arg0){
      objects.remove((Starred)arg0.getTag());
      ctx.remove((Starred)arg0.getTag());
      notifyDataSetChanged();
    }
  }
);
  return view;
}

Fixed version (ground truth):
@Override public View getView(int position,View contentView,ViewGroup viewGroup){
  View view=null;
  if (objects.get(position) == null) {
    LayoutInflater layoutInflater=(LayoutInflater)getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    view=layoutInflater.inflate(R.layout.searchresult_listitem,viewGroup,false);
    return view;
  }
  Starred item=objects.get(position);
  if (contentView == null) {
    LayoutInflater layoutInflater=(LayoutInflater)getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
    view=layoutInflater.inflate(R.layout.starred_item,viewGroup,false);
  }
 else {
    view=contentView;
  }
  TextView tv=(TextView)view.findViewById(R.id.tvTitle);
  if (item.getTitle() != null)   tv.setText(Html.fromHtml(item.getTitle()));
 else   tv.setText("String_Node_Str");
  ImageView iv=(ImageView)view.findViewById(R.id.ivDelete);
  iv.setFocusableInTouchMode(false);
  iv.setFocusable(false);
  iv.setTag(item);
  iv.setOnClickListener(new OnClickListener(){
    @Override public void onClick(    View arg0){
      objects.remove((Starred)arg0.getTag());
      ctx.remove((Starred)arg0.getTag());
      notifyDataSetChanged();
    }
  }
);
  return view;
}
Program: 86352
Project: 86352
Buggy source:
/** 
 * Initialize the transformation for a collaborative modeling project
 * @param traceabilityMap 
 * @param references 
 * @param targetObject 
 * @param sourceObject 
 * @param scaffoldType 
 * @param scaffoldInfo 
 * @throws InitializerException Exception thrown if a problem occured during initialization
 */
public void initialize(ScaffoldInfo scaffoldInfo,ScaffoldType scaffoldType,EObject sourceObject,EObject targetObject,Iterable<EObject> references,Map<EObject,EObject> traceabilityMap) throws InitializerException {
  Collection<CDOObject> elementsToLock=new ArrayList<CDOObject>();
  elementsToLock.add(scaffoldInfo);
  if (targetObject instanceof CDOObject) {
    elementsToLock.add((CDOObject)targetObject);
  }
  Collection<CDOObject> lockedElements=null;
  try {
    lockedElements=CDOLockManager.INSTANCE.acquireLock(elementsToLock,false,true);
  }
 catch (  LockedInstanceException e) {
    throw new InitializerException("String_Node_Str");
  }
  for (  CDOObject elementToLock : elementsToLock) {
    if (!lockedElements.contains(elementToLock)) {
      throw new InitializerException("String_Node_Str");
    }
  }
}

Fixed version (ground truth):
/** 
 * Initialize the transformation for a collaborative modeling project
 * @param traceabilityMap 
 * @param references 
 * @param targetObject 
 * @param sourceObject 
 * @param scaffoldType 
 * @param scaffoldInfo 
 * @throws InitializerException Exception thrown if a problem occured during initialization
 */
public void initialize(ScaffoldInfo scaffoldInfo,ScaffoldType scaffoldType,EObject sourceObject,EObject targetObject,Iterable<EObject> references,Map<EObject,EObject> traceabilityMap) throws InitializerException {
  Collection<CDOObject> elementsToLock=new ArrayList<CDOObject>();
  elementsToLock.add(scaffoldInfo);
  if (targetObject instanceof CDOObject) {
    elementsToLock.add((CDOObject)targetObject);
  }
  try {
    Collection<CDOObject> lockedElements=CDOLockManager.INSTANCE.acquireLock(elementsToLock,false,true);
  }
 catch (  LockedInstanceException e) {
    throw new InitializerException("String_Node_Str");
  }
}
Program: 86353
Project: 86353
Buggy source:
@Test public void sequencesTest(){
  List<Sequence> sequences=new DataBaseServices().sequences(dataBase);
  assertEquals(8,sequences.size());
}

Fixed version (ground truth):
@Test public void sequencesTest(){
  List<Sequence> sequences=new DataBaseServices().localSequences(dataBase);
  assertEquals(8,sequences.size());
}
Program: 86354
Project: 86354
Buggy source:
/** 
 * Return the foreign key associated with the index if there is one
 * @return
 */
public ForeignKey getAssociatedForeignKey(){
  List<Column> columns=getColumns();
  if (columns.isEmpty()) {
    return null;
  }
  Column column=columns.get(0);
  for (  ForeignKey fk : column.getForeignKeys()) {
    List<Column> fkColumns=new ForeignKeyQuery(fk).getFKColumns();
    if (fkColumns.containsAll(columns) && columns.containsAll(fkColumns)) {
      return fk;
    }
  }
  return null;
}

Fixed version (ground truth):
/** 
 * Return the foreign key associated with the index if there is one
 * @return
 */
public ForeignKey getAssociatedForeignKey(){
  List<Column> columns=getColumns();
  if (columns.isEmpty()) {
    return null;
  }
  for (  Column column : columns) {
    if (column != null) {
      for (      ForeignKey fk : column.getForeignKeys()) {
        List<Column> fkColumns=new ForeignKeyQuery(fk).getFKColumns();
        if (fkColumns.containsAll(columns) && columns.containsAll(fkColumns)) {
          return fk;
        }
      }
    }
  }
  return null;
}
Program: 86355
Project: 86355
Buggy source:
/** 
 * This can be used to update the resource set's package registry with all needed EPackages.
 * @param resourceSet The resource set which registry has to be updated.
 * @generated
 */
@Override public void registerPackages(ResourceSet resourceSet){
  super.registerPackages(resourceSet);
  if (!isInWorkspace(org.eclipse.emf.compare.ComparePackage.class)) {
    resourceSet.getPackageRegistry().put(org.eclipse.emf.compare.ComparePackage.eINSTANCE.getNsURI(),org.eclipse.emf.compare.ComparePackage.eINSTANCE);
  }
  if (!isInWorkspace(org.obeonetwork.dsl.database.dbevolution.DbevolutionPackage.class)) {
    resourceSet.getPackageRegistry().put(org.obeonetwork.dsl.database.dbevolution.DbevolutionPackage.eINSTANCE.getNsURI(),org.obeonetwork.dsl.database.dbevolution.DbevolutionPackage.eINSTANCE);
  }
}

Fixed version (ground truth):
/** 
 * This can be used to update the resource set's package registry with all needed EPackages.
 * @param resourceSet The resource set which registry has to be updated.
 * @generated
 */
@Override public void registerPackages(ResourceSet resourceSet){
  super.registerPackages(resourceSet);
}
Program: 86357
Project: 86357
Buggy source:
@Override public void buildTables(){
  super.buildTables();
  buildSequences(metaData,tableContainer);
}

Fixed version (ground truth):
@Override public void buildTables(){
  super.buildTables();
  buildSequences(tableContainer);
}
Program: 86358
Project: 86358
Buggy source:
public boolean test(Object receiver,String property,Object[] args,Object expectedValue){
  if (receiver instanceof IEditorPart) {
    if (receiver instanceof EnhancedRequirementEditor) {
      return true;
    }
    IEditorInput editorInput=((IEditorPart)receiver).getEditorInput();
    if (editorInput instanceof SessionEditorInput) {
      SessionEditorInput sessionEditorInput=(SessionEditorInput)editorInput;
      Session session=sessionEditorInput.getSession();
      if (session != null) {
        TransactionalEditingDomain ted=session.getTransactionalEditingDomain();
        if (ted != null) {
          return containsRequirementsModel(ted.getResourceSet());
        }
      }
    }
  }
  return false;
}

Fixed version (ground truth):
public boolean test(Object receiver,String property,Object[] args,Object expectedValue){
  if (receiver instanceof IEditorPart) {
    if (receiver instanceof RequirementEditor) {
      return true;
    }
    IEditorInput editorInput=((IEditorPart)receiver).getEditorInput();
    if (editorInput instanceof SessionEditorInput) {
      SessionEditorInput sessionEditorInput=(SessionEditorInput)editorInput;
      Session session=sessionEditorInput.getSession();
      if (session != null) {
        TransactionalEditingDomain ted=session.getTransactionalEditingDomain();
        if (ted != null) {
          return containsRequirementsModel(ted.getResourceSet());
        }
      }
    }
  }
  return false;
}
Program: 86359
Project: 86359
Buggy source:
public Map<String,String> getOldURIToPackageMap(){
  if (oldUriToNewUri == null) {
    oldUriToNewUri=new HashMap<String,String>();
    oldUriToNewUri.put(ENVIRONMENT_URI_OLD,ENVIRONMENT_URI_NEW);
    oldUriToNewUri.put(ENTITY_URI_OLD,ENTITY_URI_NEW);
    oldUriToNewUri.put(SOA_URI_OLD,SOA_URI_NEW);
  }
  return oldUriToNewUri;
}

Fixed version (ground truth):
public Map<String,String> getOldURIToPackageMap(){
  if (oldUriToNewUri == null) {
    oldUriToNewUri=new HashMap<String,String>();
    oldUriToNewUri.put(ENVIRONMENT_URI_OLD,ENVIRONMENT_URI_NEW);
    oldUriToNewUri.put(ENTITY_URI_OLD,ENTITY_URI_NEW);
    oldUriToNewUri.put(SOA_URI_OLD,SOA_URI_NEW);
    oldUriToNewUri.put(GRAAL_URI_OLD,GRAAL_URI_NEW);
  }
  return oldUriToNewUri;
}
Program: 86360
Project: 86360
Buggy source:
@Override public boolean isConcernedByUserStory(UserStory userStory){
  Task referencedTask=getTask();
  if (referencedTask != null) {
    referencedTask.isConcernedByUserStory(userStory);
  }
  return false;
}

Fixed version (ground truth):
@Override public boolean isConcernedByUserStory(UserStory userStory){
  Task referencedTask=getTask();
  if (referencedTask != null) {
    return referencedTask.isConcernedByUserStory(userStory);
  }
  return false;
}
Program: 86361
Project: 86361
Buggy source:
@Override public void notifyChanged(Notification msg){
  if (msg instanceof CDONotification) {
    return;
  }
  if (msg.getNotifier() instanceof ObeoDSMObject) {
    ObeoDSMObject notifier=(ObeoDSMObject)msg.getNotifier();
    if (!EnvironmentUtil.isResourceLoading(notifier)) {
      Date currentDate=new Date();
      if (!msg.getFeature().equals(EnvironmentPackage.Literals.OBEO_DSM_OBJECT__MODIFIED_ON) && !msg.getFeature().equals(EnvironmentPackage.Literals.OBEO_DSM_OBJECT__CREATED_ON)) {
switch (msg.getEventType()) {
case Notification.MOVE:
case Notification.SET:
case Notification.UNSET:
case Notification.ADD:
case Notification.ADD_MANY:
case Notification.REMOVE:
case Notification.REMOVE_MANY:
          notifier.setModifiedOn(currentDate);
        if (notifier.getCreatedOn() == null) {
          notifier.setCreatedOn(currentDate);
        }
      break;
  }
}
}
}
}

Fixed version (ground truth):
@Override public void notifyChanged(Notification msg){
  if (msg instanceof CDONotification) {
    return;
  }
  if (msg.getNotifier() instanceof ObeoDSMObject) {
    ObeoDSMObject notifier=(ObeoDSMObject)msg.getNotifier();
    if (!EnvironmentUtil.isResourceLoading(notifier)) {
      Date currentDate=new Date();
      if (msg != null && msg.getFeature() != null && !msg.getFeature().equals(EnvironmentPackage.Literals.OBEO_DSM_OBJECT__MODIFIED_ON) && !msg.getFeature().equals(EnvironmentPackage.Literals.OBEO_DSM_OBJECT__CREATED_ON)) {
switch (msg.getEventType()) {
case Notification.MOVE:
case Notification.SET:
case Notification.UNSET:
case Notification.ADD:
case Notification.ADD_MANY:
case Notification.REMOVE:
case Notification.REMOVE_MANY:
          notifier.setModifiedOn(currentDate);
        if (notifier.getCreatedOn() == null) {
          notifier.setCreatedOn(currentDate);
        }
      break;
  }
}
}
}
}
Program: 86362
Project: 86362
Buggy source:
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated NOT
 */
protected ObeoDSMObjectImpl(){
  super();
  eAdapters().add(new AdapterImpl(){
    @Override public void notifyChanged(    Notification msg){
      if (msg instanceof CDONotification) {
        return;
      }
      if (msg.getNotifier() instanceof ObeoDSMObject) {
        ObeoDSMObject notifier=(ObeoDSMObject)msg.getNotifier();
        if (!EnvironmentUtil.isResourceLoading(notifier)) {
          Date currentDate=new Date();
          if (!msg.getFeature().equals(EnvironmentPackage.Literals.OBEO_DSM_OBJECT__MODIFIED_ON) && !msg.getFeature().equals(EnvironmentPackage.Literals.OBEO_DSM_OBJECT__CREATED_ON)) {
switch (msg.getEventType()) {
case Notification.MOVE:
case Notification.SET:
case Notification.UNSET:
case Notification.ADD:
case Notification.ADD_MANY:
case Notification.REMOVE:
case Notification.REMOVE_MANY:
              notifier.setModifiedOn(currentDate);
            if (notifier.getCreatedOn() == null) {
              notifier.setCreatedOn(currentDate);
            }
          break;
      }
    }
  }
}
}
}
);
}

Fixed version (ground truth):
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated NOT
 */
protected ObeoDSMObjectImpl(){
  super();
  eAdapters().add(new AdapterImpl(){
    @Override public void notifyChanged(    Notification msg){
      if (msg instanceof CDONotification) {
        return;
      }
      if (msg.getNotifier() instanceof ObeoDSMObject) {
        ObeoDSMObject notifier=(ObeoDSMObject)msg.getNotifier();
        if (!EnvironmentUtil.isResourceLoading(notifier)) {
          Date currentDate=new Date();
          if (msg != null && msg.getFeature() != null && !msg.getFeature().equals(EnvironmentPackage.Literals.OBEO_DSM_OBJECT__MODIFIED_ON) && !msg.getFeature().equals(EnvironmentPackage.Literals.OBEO_DSM_OBJECT__CREATED_ON)) {
switch (msg.getEventType()) {
case Notification.MOVE:
case Notification.SET:
case Notification.UNSET:
case Notification.ADD:
case Notification.ADD_MANY:
case Notification.REMOVE:
case Notification.REMOVE_MANY:
              notifier.setModifiedOn(currentDate);
            if (notifier.getCreatedOn() == null) {
              notifier.setCreatedOn(currentDate);
            }
          break;
      }
    }
  }
}
}
}
);
}
Program: 86363
Project: 86363
Buggy source:
@Override public void setOppositeOf(Reference newOppositeOf){
  Reference oldOppositeOf=getOppositeOf();
  super.setOppositeOf(newOppositeOf);
  if (oldOppositeOf != null && !oldOppositeOf.equals(newOppositeOf)) {
    oldOppositeOf.setOppositeOf(null);
  }
  if (newOppositeOf != null && (newOppositeOf.getOppositeOf() == null || !newOppositeOf.getOppositeOf().equals(this))) {
    newOppositeOf.setOppositeOf(this);
  }
  if (eNotificationRequired())   eNotify(new ENotificationImpl(this,Notification.SET,EnvironmentPackage.REFERENCE__OPPOSITE_OF,oldOppositeOf,getOppositeOf()));
}

Fixed version (ground truth):
@Override public void setOppositeOf(Reference newOppositeOf){
  Reference oldOppositeOf=getOppositeOf();
  super.setOppositeOf(newOppositeOf);
  if (oldOppositeOf != null && !oldOppositeOf.equals(newOppositeOf)) {
    oldOppositeOf.setOppositeOf(null);
  }
  if (newOppositeOf != null && !newOppositeOf.eIsProxy() && (newOppositeOf.getOppositeOf() == null || !newOppositeOf.getOppositeOf().equals(this))) {
    newOppositeOf.setOppositeOf(this);
  }
}
Program: 86364
Project: 86364
Buggy source:
@Override public void setType(DTO newType){
  DTO oldType=getType();
  super.setType(newType);
  if (getOppositeOf() != null && (newType == null || getOppositeOf().getDto() == null || !getOppositeOf().getDto().isSubtypeOf(newType))) {
    setOppositeOf(null);
  }
  if (eNotificationRequired())   eNotify(new ENotificationImpl(this,Notification.SET,EnvironmentPackage.REFERENCE__TYPE,oldType,getType()));
}

Fixed version (ground truth):
@Override public void setType(DTO newType){
  super.setType(newType);
  if (getOppositeOf() != null && !newType.eIsProxy() && (newType == null || getOppositeOf().getDto() == null || !getOppositeOf().getDto().isSubtypeOf(newType))) {
    setOppositeOf(null);
  }
}
Program: 86365
Project: 86365
Buggy source:
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated NOT
 */
public EList<TaskReference> getReferencedBy(){
  Collection<Setting> referencingTasksReferences=new GraalUsageCrossReferencer(){
    @Override protected boolean crossReference(    EObject eObject,    EReference eReference,    EObject crossReferencedEObject){
      return eReference == GraalPackage.Literals.TASK_REFERENCE__TASK;
    }
    @Override protected boolean containment(    EObject eObject){
      return (eObject instanceof System) || (eObject instanceof TasksGroup) || (eObject instanceof Task)|| (eObject instanceof Loop)|| (eObject instanceof TaskReference);
    }
  }
.findUsage(this);
  List<TaskReference> foundTasksReferences=new ArrayList<TaskReference>();
  for (  Setting setting : referencingTasksReferences) {
    foundTasksReferences.add((TaskReference)setting.getEObject());
  }
  return ECollections.unmodifiableEList(new BasicEList<TaskReference>(foundTasksReferences));
}

Fixed version (ground truth):
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated NOT
 */
public EList<TaskReference> getReferencedBy(){
  Collection<Setting> referencingTasksReferences=new GraalUsageCrossReferencer(){
    @Override protected boolean crossReference(    EObject eObject,    EReference eReference,    EObject crossReferencedEObject){
      return eReference == GraalPackage.Literals.TASK_REFERENCE__TASK;
    }
    @Override protected boolean containment(    EObject eObject){
      return (eObject instanceof Resource) || (eObject instanceof System) || (eObject instanceof TasksGroup)|| (eObject instanceof Task)|| (eObject instanceof Loop)|| (eObject instanceof TaskReference);
    }
  }
.findUsage(this);
  List<TaskReference> foundTasksReferences=new ArrayList<TaskReference>();
  for (  Setting setting : referencingTasksReferences) {
    foundTasksReferences.add((TaskReference)setting.getEObject());
  }
  return ECollections.unmodifiableEList(new BasicEList<TaskReference>(foundTasksReferences));
}
Program: 86366
Project: 86366
Buggy source:
@Override public void notifyChanged(Notification msg){
  if (msg instanceof CDONotification) {
    return;
  }
  if (msg.getNotifier() instanceof ObeoDSMObject) {
    ObeoDSMObject notifier=(ObeoDSMObject)msg.getNotifier();
    if (!EnvironmentUtil.isResourceLoading(notifier)) {
      Date currentDate=new Date();
      if (!msg.getFeature().equals(EnvironmentPackage.Literals.OBEO_DSM_OBJECT__MODIFIED_ON) && !msg.getFeature().equals(EnvironmentPackage.Literals.OBEO_DSM_OBJECT__CREATED_ON)) {
switch (msg.getEventType()) {
case Notification.MOVE:
case Notification.SET:
case Notification.UNSET:
case Notification.ADD:
case Notification.ADD_MANY:
case Notification.REMOVE:
case Notification.REMOVE_MANY:
          notifier.setModifiedOn(currentDate);
        if (notifier.getCreatedOn() == null) {
          notifier.setCreatedOn(currentDate);
        }
      break;
  }
}
}
}
}

Fixed version (ground truth):
@Override public void notifyChanged(Notification msg){
  if (msg instanceof CDONotification) {
    return;
  }
  if (msg.getNotifier() instanceof ObeoDSMObject) {
    ObeoDSMObject notifier=(ObeoDSMObject)msg.getNotifier();
    if (!EnvironmentUtil.isResourceLoading(notifier)) {
      Date currentDate=new Date();
      if (msg != null && msg.getFeature() != null && !msg.getFeature().equals(EnvironmentPackage.Literals.OBEO_DSM_OBJECT__MODIFIED_ON) && !msg.getFeature().equals(EnvironmentPackage.Literals.OBEO_DSM_OBJECT__CREATED_ON)) {
switch (msg.getEventType()) {
case Notification.MOVE:
case Notification.SET:
case Notification.UNSET:
case Notification.ADD:
case Notification.ADD_MANY:
case Notification.REMOVE:
case Notification.REMOVE_MANY:
          notifier.setModifiedOn(currentDate);
        if (notifier.getCreatedOn() == null) {
          notifier.setCreatedOn(currentDate);
        }
      break;
  }
}
}
}
}
Program: 86367
Project: 86367
Buggy source:
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated NOT
 */
protected ObeoDSMObjectImpl(){
  super();
  eAdapters().add(new AdapterImpl(){
    @Override public void notifyChanged(    Notification msg){
      if (msg instanceof CDONotification) {
        return;
      }
      if (msg.getNotifier() instanceof ObeoDSMObject) {
        ObeoDSMObject notifier=(ObeoDSMObject)msg.getNotifier();
        if (!EnvironmentUtil.isResourceLoading(notifier)) {
          Date currentDate=new Date();
          if (!msg.getFeature().equals(EnvironmentPackage.Literals.OBEO_DSM_OBJECT__MODIFIED_ON) && !msg.getFeature().equals(EnvironmentPackage.Literals.OBEO_DSM_OBJECT__CREATED_ON)) {
switch (msg.getEventType()) {
case Notification.MOVE:
case Notification.SET:
case Notification.UNSET:
case Notification.ADD:
case Notification.ADD_MANY:
case Notification.REMOVE:
case Notification.REMOVE_MANY:
              notifier.setModifiedOn(currentDate);
            if (notifier.getCreatedOn() == null) {
              notifier.setCreatedOn(currentDate);
            }
          break;
      }
    }
  }
}
}
}
);
}

Fixed version (ground truth):
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated NOT
 */
protected ObeoDSMObjectImpl(){
  super();
  eAdapters().add(new AdapterImpl(){
    @Override public void notifyChanged(    Notification msg){
      if (msg instanceof CDONotification) {
        return;
      }
      if (msg.getNotifier() instanceof ObeoDSMObject) {
        ObeoDSMObject notifier=(ObeoDSMObject)msg.getNotifier();
        if (!EnvironmentUtil.isResourceLoading(notifier)) {
          Date currentDate=new Date();
          if (msg != null && msg.getFeature() != null && !msg.getFeature().equals(EnvironmentPackage.Literals.OBEO_DSM_OBJECT__MODIFIED_ON) && !msg.getFeature().equals(EnvironmentPackage.Literals.OBEO_DSM_OBJECT__CREATED_ON)) {
switch (msg.getEventType()) {
case Notification.MOVE:
case Notification.SET:
case Notification.UNSET:
case Notification.ADD:
case Notification.ADD_MANY:
case Notification.REMOVE:
case Notification.REMOVE_MANY:
              notifier.setModifiedOn(currentDate);
            if (notifier.getCreatedOn() == null) {
              notifier.setCreatedOn(currentDate);
            }
          break;
      }
    }
  }
}
}
}
);
}
Program: 86368
Project: 86368
Buggy source:
@Override public void setOppositeOf(Reference newOppositeOf){
  Reference oldOppositeOf=getOppositeOf();
  super.setOppositeOf(newOppositeOf);
  if (oldOppositeOf != null && !oldOppositeOf.equals(newOppositeOf)) {
    oldOppositeOf.setOppositeOf(null);
  }
  if (newOppositeOf != null && (newOppositeOf.getOppositeOf() == null || !newOppositeOf.getOppositeOf().equals(this))) {
    newOppositeOf.setOppositeOf(this);
  }
  if (eNotificationRequired())   eNotify(new ENotificationImpl(this,Notification.SET,EnvironmentPackage.REFERENCE__OPPOSITE_OF,oldOppositeOf,getOppositeOf()));
}

Fixed version (ground truth):
@Override public void setOppositeOf(Reference newOppositeOf){
  Reference oldOppositeOf=getOppositeOf();
  super.setOppositeOf(newOppositeOf);
  if (oldOppositeOf != null && !oldOppositeOf.equals(newOppositeOf)) {
    oldOppositeOf.setOppositeOf(null);
  }
  if (newOppositeOf != null && !newOppositeOf.eIsProxy() && (newOppositeOf.getOppositeOf() == null || !newOppositeOf.getOppositeOf().equals(this))) {
    newOppositeOf.setOppositeOf(this);
  }
}
Program: 86369
Project: 86369
Buggy source:
@Override public void setType(DTO newType){
  DTO oldType=getType();
  super.setType(newType);
  if (getOppositeOf() != null && (newType == null || getOppositeOf().getDto() == null || !getOppositeOf().getDto().isSubtypeOf(newType))) {
    setOppositeOf(null);
  }
  if (eNotificationRequired())   eNotify(new ENotificationImpl(this,Notification.SET,EnvironmentPackage.REFERENCE__TYPE,oldType,getType()));
}

Fixed version (ground truth):
@Override public void setType(DTO newType){
  super.setType(newType);
  if (getOppositeOf() != null && !newType.eIsProxy() && (newType == null || getOppositeOf().getDto() == null || !getOppositeOf().getDto().isSubtypeOf(newType))) {
    setOppositeOf(null);
  }
}
Program: 86370
Project: 86370
Buggy source:
/** 
 * Deletes a collection of transitions
 * @param transitions Transitions to be deleted
 */
private void deleteTransitions(Collection<Transition> transitions){
  for (  Transition transition : transitions) {
    EcoreUtil.delete(transition);
  }
}

Fixed version (ground truth):
/** 
 * Deletes a collection of transitions
 * @param transitions Transitions to be deleted
 */
private void deleteTransitions(Collection<Transition> transitions){
  Collection<Transition> lTransitions=new ArrayList<Transition>(transitions);
  for (  Transition transition : lTransitions) {
    EcoreUtil.delete(transition);
  }
}
Program: 86371
Project: 86371
Buggy source:
public List<org.obeonetwork.dsl.entity.Reference> getEntityOppositeReferences(EObject context,List<org.obeonetwork.dsl.entity.Reference> references){
  Map<String,org.obeonetwork.dsl.entity.Reference> map=new HashMap<String,org.obeonetwork.dsl.entity.Reference>();
  for (  org.obeonetwork.dsl.entity.Reference ref : references) {
    if (ref.getOppositeOf() != null) {
      String key1=ref.getOppositeOf().hashCode() + "String_Node_Str" + ref.hashCode();
      String key2=ref.hashCode() + "String_Node_Str" + ref.getOppositeOf().hashCode();
      if (map.get(key1) == null && map.get(key2) == null) {
        map.put(key1,ref);
      }
    }
  }
  return new ArrayList<org.obeonetwork.dsl.entity.Reference>(map.values());
}

Fixed version (ground truth):
public List<org.obeonetwork.dsl.entity.Reference> getEntityOppositeReferences(EObject context,List<org.obeonetwork.dsl.entity.Reference> references){
  Map<String,org.obeonetwork.dsl.entity.Reference> map=new HashMap<String,org.obeonetwork.dsl.entity.Reference>();
  for (  org.obeonetwork.dsl.entity.Reference ref : references) {
    if (ref.getOppositeOf() != null) {
      String key1=ref.getOppositeOf().hashCode() + "String_Node_Str" + ref.hashCode();
      String key2=ref.hashCode() + "String_Node_Str" + ref.getOppositeOf().hashCode();
      if (map.get(key1) == null && map.get(key2) == null) {
        if (key1.compareTo(key2) > 0) {
          map.put(key1,ref);
        }
 else {
          map.put(key2,ref.getOppositeOf());
        }
      }
    }
  }
  return new ArrayList<org.obeonetwork.dsl.entity.Reference>(map.values());
}
Program: 86372
Project: 86372
Buggy source:
public List<Reference> getDtoOppositeReferences(EObject context,List<Reference> references){
  Map<String,Reference> map=new HashMap<String,Reference>();
  for (  Reference ref : references) {
    if (ref.getOppositeOf() != null) {
      String key1=ref.getOppositeOf().hashCode() + "String_Node_Str" + ref.hashCode();
      String key2=ref.hashCode() + "String_Node_Str" + ref.getOppositeOf().hashCode();
      if (map.get(key1) == null && map.get(key2) == null) {
        map.put(key1,ref);
      }
    }
  }
  return new ArrayList<Reference>(map.values());
}

Fixed version (ground truth):
public List<Reference> getDtoOppositeReferences(EObject context,List<Reference> references){
  Map<String,Reference> map=new HashMap<String,Reference>();
  for (  Reference ref : references) {
    if (ref.getOppositeOf() != null) {
      String key1=ref.getOppositeOf().hashCode() + "String_Node_Str" + ref.hashCode();
      String key2=ref.hashCode() + "String_Node_Str" + ref.getOppositeOf().hashCode();
      if (map.get(key1) == null && map.get(key2) == null) {
        if (key1.compareTo(key2) > 0) {
          map.put(key1,ref);
        }
 else {
          map.put(key2,ref.getOppositeOf());
        }
      }
    }
  }
  return new ArrayList<Reference>(map.values());
}
Program: 86373
Project: 86373
Buggy source:
public void deleteDtoReferences(List<org.obeonetwork.dsl.environment.Reference> references){
  for (  org.obeonetwork.dsl.environment.Reference reference : references) {
    EcoreUtil.delete(reference,true);
  }
}

Fixed version (ground truth):
public void deleteDtoReferences(List<Reference> references){
  for (  Reference reference : references) {
    EcoreUtil.delete(reference,true);
  }
}
Program: 86374
Project: 86374
Buggy source:
/** 
 * Deletes a collection of transitions
 * @param transitions Transitions to be deleted
 */
private void deleteTransitions(Collection<Transition> transitions){
  for (  Transition transition : transitions) {
    EcoreUtil.delete(transition);
  }
}

Fixed version (ground truth):
/** 
 * Deletes a collection of transitions
 * @param transitions Transitions to be deleted
 */
private void deleteTransitions(Collection<Transition> transitions){
  Collection<Transition> lTransitions=new ArrayList<Transition>(transitions);
  for (  Transition transition : lTransitions) {
    EcoreUtil.delete(transition);
  }
}
Program: 86375
Project: 86375
Buggy source:
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated NOT
 */
public EList<TaskReference> getReferencedBy(){
  Collection<Setting> referencingTasksReferences=new GraalUsageCrossReferencer(){
    @Override protected boolean crossReference(    EObject eObject,    EReference eReference,    EObject crossReferencedEObject){
      return eReference == GraalPackage.Literals.TASK_REFERENCE__TASK;
    }
    @Override protected boolean containment(    EObject eObject){
      return (eObject instanceof System) || (eObject instanceof TasksGroup) || (eObject instanceof Task)|| (eObject instanceof Loop)|| (eObject instanceof TaskReference);
    }
  }
.findUsage(this);
  List<TaskReference> foundTasksReferences=new ArrayList<TaskReference>();
  for (  Setting setting : referencingTasksReferences) {
    foundTasksReferences.add((TaskReference)setting.getEObject());
  }
  return ECollections.unmodifiableEList(new BasicEList<TaskReference>(foundTasksReferences));
}

Fixed version (ground truth):
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated NOT
 */
public EList<TaskReference> getReferencedBy(){
  Collection<Setting> referencingTasksReferences=new GraalUsageCrossReferencer(){
    @Override protected boolean crossReference(    EObject eObject,    EReference eReference,    EObject crossReferencedEObject){
      return eReference == GraalPackage.Literals.TASK_REFERENCE__TASK;
    }
    @Override protected boolean containment(    EObject eObject){
      return (eObject instanceof Resource) || (eObject instanceof System) || (eObject instanceof TasksGroup)|| (eObject instanceof Task)|| (eObject instanceof Loop)|| (eObject instanceof TaskReference);
    }
  }
.findUsage(this);
  List<TaskReference> foundTasksReferences=new ArrayList<TaskReference>();
  for (  Setting setting : referencingTasksReferences) {
    foundTasksReferences.add((TaskReference)setting.getEObject());
  }
  return ECollections.unmodifiableEList(new BasicEList<TaskReference>(foundTasksReferences));
}
Program: 86376
Project: 86376
Buggy source:
@Override protected boolean containment(EObject eObject){
  return (eObject instanceof System) || (eObject instanceof UseCase);
}

Fixed version (ground truth):
@Override protected boolean containment(EObject eObject){
  return (eObject instanceof Resource) || (eObject instanceof System) || (eObject instanceof UseCase);
}
Program: 86377
Project: 86377
Buggy source:
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated NOT
 */
public UseCase getUseCase(){
  Collection<Setting> useCaseReferences=new GraalUsageCrossReferencer(){
    @Override protected boolean crossReference(    EObject eObject,    EReference eReference,    EObject crossReferencedEObject){
      return eReference == GraalPackage.Literals.USE_CASE__TASKS;
    }
    @Override protected boolean containment(    EObject eObject){
      return (eObject instanceof System) || (eObject instanceof UseCase);
    }
  }
.findUsage(this);
  UseCase useCase=null;
  for (  Setting setting : useCaseReferences) {
    useCase=(UseCase)setting.getEObject();
    break;
  }
  return useCase;
}

Fixed version (ground truth):
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated NOT
 */
public UseCase getUseCase(){
  Collection<Setting> useCaseReferences=new GraalUsageCrossReferencer(){
    @Override protected boolean crossReference(    EObject eObject,    EReference eReference,    EObject crossReferencedEObject){
      return eReference == GraalPackage.Literals.USE_CASE__TASKS;
    }
    @Override protected boolean containment(    EObject eObject){
      return (eObject instanceof Resource) || (eObject instanceof System) || (eObject instanceof UseCase);
    }
  }
.findUsage(this);
  UseCase useCase=null;
  for (  Setting setting : useCaseReferences) {
    useCase=(UseCase)setting.getEObject();
    break;
  }
  return useCase;
}
Program: 86378
Project: 86378
Buggy source:
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated NOT
 */
public EList<Task> getUsedBy(){
  Collection<Setting> usingTasksSettings=new GraalUsageCrossReferencer(){
    @Override protected boolean crossReference(    EObject eObject,    EReference eReference,    EObject crossReferencedEObject){
      return eReference == GraalPackage.Literals.TASK__USES;
    }
    @Override protected boolean containment(    EObject eObject){
      return (eObject instanceof System) || (eObject instanceof TasksGroup) || (eObject instanceof Task);
    }
  }
.findUsage(this);
  List<Task> foundTasks=new ArrayList<Task>();
  for (  Setting setting : usingTasksSettings) {
    foundTasks.add((Task)setting.getEObject());
  }
  return ECollections.unmodifiableEList(new BasicEList<Task>(foundTasks));
}

Fixed version (ground truth):
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated NOT
 */
public EList<Task> getUsedBy(){
  Collection<Setting> usingTasksSettings=new GraalUsageCrossReferencer(){
    @Override protected boolean crossReference(    EObject eObject,    EReference eReference,    EObject crossReferencedEObject){
      return eReference == GraalPackage.Literals.TASK__USES;
    }
    @Override protected boolean containment(    EObject eObject){
      return (eObject instanceof Resource) || (eObject instanceof System) || (eObject instanceof TasksGroup)|| (eObject instanceof Task);
    }
  }
.findUsage(this);
  List<Task> foundTasks=new ArrayList<Task>();
  for (  Setting setting : usingTasksSettings) {
    foundTasks.add((Task)setting.getEObject());
  }
  return ECollections.unmodifiableEList(new BasicEList<Task>(foundTasks));
}
Program: 86379
Project: 86379
Buggy source:
@Override protected boolean containment(EObject eObject){
  return (eObject instanceof System) || (eObject instanceof UseCase);
}

Fixed version (ground truth):
@Override protected boolean containment(EObject eObject){
  return (eObject instanceof Resource) || (eObject instanceof System) || (eObject instanceof UseCase);
}
Program: 86380
Project: 86380
Buggy source:
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated NOT
 */
public UseCase getUseCase(){
  Collection<Setting> useCaseReferences=new GraalUsageCrossReferencer(){
    @Override protected boolean crossReference(    EObject eObject,    EReference eReference,    EObject crossReferencedEObject){
      return eReference == GraalPackage.Literals.USE_CASE__TASKS;
    }
    @Override protected boolean containment(    EObject eObject){
      return (eObject instanceof System) || (eObject instanceof UseCase);
    }
  }
.findUsage(this);
  UseCase useCase=null;
  for (  Setting setting : useCaseReferences) {
    useCase=(UseCase)setting.getEObject();
    break;
  }
  return useCase;
}

Fixed version (ground truth):
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated NOT
 */
public UseCase getUseCase(){
  Collection<Setting> useCaseReferences=new GraalUsageCrossReferencer(){
    @Override protected boolean crossReference(    EObject eObject,    EReference eReference,    EObject crossReferencedEObject){
      return eReference == GraalPackage.Literals.USE_CASE__TASKS;
    }
    @Override protected boolean containment(    EObject eObject){
      return (eObject instanceof Resource) || (eObject instanceof System) || (eObject instanceof UseCase);
    }
  }
.findUsage(this);
  UseCase useCase=null;
  for (  Setting setting : useCaseReferences) {
    useCase=(UseCase)setting.getEObject();
    break;
  }
  return useCase;
}
Program: 86381
Project: 86381
Buggy source:
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated NOT
 */
public EList<Task> getUsedBy(){
  Collection<Setting> usingTasksSettings=new GraalUsageCrossReferencer(){
    @Override protected boolean crossReference(    EObject eObject,    EReference eReference,    EObject crossReferencedEObject){
      return eReference == GraalPackage.Literals.TASK__USES;
    }
    @Override protected boolean containment(    EObject eObject){
      return (eObject instanceof System) || (eObject instanceof TasksGroup) || (eObject instanceof Task);
    }
  }
.findUsage(this);
  List<Task> foundTasks=new ArrayList<Task>();
  for (  Setting setting : usingTasksSettings) {
    foundTasks.add((Task)setting.getEObject());
  }
  return ECollections.unmodifiableEList(new BasicEList<Task>(foundTasks));
}

Fixed version (ground truth):
/** 
 * <!-- begin-user-doc --> <!-- end-user-doc -->
 * @generated NOT
 */
public EList<Task> getUsedBy(){
  Collection<Setting> usingTasksSettings=new GraalUsageCrossReferencer(){
    @Override protected boolean crossReference(    EObject eObject,    EReference eReference,    EObject crossReferencedEObject){
      return eReference == GraalPackage.Literals.TASK__USES;
    }
    @Override protected boolean containment(    EObject eObject){
      return (eObject instanceof Resource) || (eObject instanceof System) || (eObject instanceof TasksGroup)|| (eObject instanceof Task);
    }
  }
.findUsage(this);
  List<Task> foundTasks=new ArrayList<Task>();
  for (  Setting setting : usingTasksSettings) {
    foundTasks.add((Task)setting.getEObject());
  }
  return ECollections.unmodifiableEList(new BasicEList<Task>(foundTasks));
}
Program: 86382
Project: 86382
Buggy source:
private boolean shouldGetChildren(Object item){
  return item instanceof RequirementResourceImpl || item instanceof Repository || item instanceof Category;
}

Fixed version (ground truth):
private boolean shouldGetChildren(Object item){
  return item instanceof Resource || item instanceof Repository || item instanceof Category;
}
Program: 86383
Project: 86383
Buggy source:
/** 
 * Translates one of a color RGB values. This method is used to always get different colors
 * @param initialValue Red, Green or Blue value
 * @param index Index of the color to be picked
 * @param translation value used to translate the value
 * @return
 */
private int translateColorValue(int initialValue,int index,int translation){
  return (initialValue + (index / colorsRgbValues.length) * translation) % 256;
}

Fixed version (ground truth):
/** 
 * Translates one of a color RGB values. This method is used to always get different colors
 * @param initialValue Red, Green or Blue value
 * @param index Index of the color to be picked
 * @param translation value used to translate the value
 * @return
 */
private int translateColorValue(int initialValue,int index,int translation){
  int value=(initialValue + (index / colorsRgbValues.length) * translation) % 256;
  if (value < 0) {
    value=value + 256;
  }
  return value;
}
Program: 86384
Project: 86384
Buggy source:
private boolean shouldGetChildren(Object item){
  return item instanceof RequirementResourceImpl || item instanceof Repository || item instanceof Category;
}

Fixed version (ground truth):
private boolean shouldGetChildren(Object item){
  return item instanceof Resource || item instanceof Repository || item instanceof Category;
}
Program: 86385
Project: 86385
Buggy source:
@Override public boolean isConcernedByUserStory(UserStory userStory){
  return getTask().isConcernedByUserStory(userStory);
}

Fixed version (ground truth):
@Override public boolean isConcernedByUserStory(UserStory userStory){
  Task referencedTask=getTask();
  if (referencedTask != null) {
    return referencedTask.isConcernedByUserStory(userStory);
  }
  return false;
}
Program: 86386
Project: 86386
Buggy source:
/** 
 * Translates one of a color RGB values. This method is used to always get different colors
 * @param initialValue Red, Green or Blue value
 * @param index Index of the color to be picked
 * @param translation value used to translate the value
 * @return
 */
private int translateColorValue(int initialValue,int index,int translation){
  return (initialValue + (index / colorsRgbValues.length) * translation) % 256;
}

Fixed version (ground truth):
/** 
 * Translates one of a color RGB values. This method is used to always get different colors
 * @param initialValue Red, Green or Blue value
 * @param index Index of the color to be picked
 * @param translation value used to translate the value
 * @return
 */
private int translateColorValue(int initialValue,int index,int translation){
  int value=(initialValue + (index / colorsRgbValues.length) * translation) % 256;
  if (value < 0) {
    value=value + 256;
  }
  return value;
}
Program: 86387
Project: 86387
Buggy source:
@Override public boolean isConcernedByUserStory(UserStory userStory){
  return getTask().isConcernedByUserStory(userStory);
}

Fixed version (ground truth):
@Override public boolean isConcernedByUserStory(UserStory userStory){
  Task referencedTask=getTask();
  if (referencedTask != null) {
    referencedTask.isConcernedByUserStory(userStory);
  }
  return false;
}
Program: 86388
Project: 86388
Buggy source:
@Override public DatabaseElement caseColumn(Column column){
  int pos=editedLabelContent.indexOf(':');
  if (pos != -1) {
    String attributeName=editedLabelContent.substring(0,pos - 1).trim();
    column.setName(attributeName);
    String typeDef=editedLabelContent.substring(pos + 1).trim();
    DataBase database=getDataBase(column);
    if (database != null) {
      Collection<NativeTypesLibrary> nativeTypesLibraries=new ArrayList<NativeTypesLibrary>();
      for (      TypesLibrary library : database.getUsedLibraries()) {
        if (library instanceof NativeTypesLibrary) {
          nativeTypesLibraries.add((NativeTypesLibrary)library);
        }
      }
      setType(column,typeDef,nativeTypesLibraries);
    }
  }
 else {
    return super.caseNamedElement(column);
  }
  return column;
}

Fixed version (ground truth):
@Override public DatabaseElement caseColumn(Column column){
  int pos=editedLabelContent.indexOf(':');
  if (pos != -1) {
    String attributeName=editedLabelContent.substring(0,pos).trim();
    column.setName(attributeName);
    String typeDef=editedLabelContent.substring(pos + 1).trim();
    DataBase database=getDataBase(column);
    if (database != null) {
      Collection<NativeTypesLibrary> nativeTypesLibraries=new ArrayList<NativeTypesLibrary>();
      for (      TypesLibrary library : database.getUsedLibraries()) {
        if (library instanceof NativeTypesLibrary) {
          nativeTypesLibraries.add((NativeTypesLibrary)library);
        }
      }
      setType(column,typeDef,nativeTypesLibraries);
    }
  }
 else {
    return super.caseNamedElement(column);
  }
  return column;
}