nus-yam/ex-repair huggingface dataset:
Program: 93269
Project: 93269
Buggy source:
/** 
 * This implementation caches the previous results
 */
@Override public Optional<ModelCoordinate> suggest(final ProjectCoordinate pc,final String modelType){
  Pair<ProjectCoordinate,String> key=Pair.newPair(pc,modelType);
  try {
    return cache.get(key,new Callable<Optional<ModelCoordinate>>(){
      @Override public Optional<ModelCoordinate> call(){
        for (        Entry<String,Pair<File,IModelIndex>> entry : delegates.entrySet()) {
          IModelIndex index=entry.getValue().getSecond();
          Optional<ModelCoordinate> suggest=index.suggest(pc,modelType);
          if (suggest.isPresent()) {
            ModelCoordinate mc=suggest.get();
            mc.setHint(ModelCoordinate.HINT_REPOSITORY_URL,entry.getKey());
            return of(mc);
          }
        }
        return absent();
      }
    }
);
  }
 catch (  ExecutionException e) {
    log.error("String_Node_Str",e);
    return absent();
  }
}

Fixed version (ground truth):
/** 
 * This implementation caches the previous results
 */
@Override public Optional<ModelCoordinate> suggest(final ProjectCoordinate pc,final String modelType){
  Pair<ProjectCoordinate,String> key=Pair.newPair(pc,modelType);
  try {
    return cache.get(key,new Callable<Optional<ModelCoordinate>>(){
      @Override public Optional<ModelCoordinate> call(){
        for (        String remote : prefs.remotes) {
          Pair<File,IModelIndex> pair=delegates.get(remote);
          if (pair == null) {
            return absent();
          }
          IModelIndex index=pair.getSecond();
          Optional<ModelCoordinate> suggest=index.suggest(pc,modelType);
          if (suggest.isPresent()) {
            ModelCoordinate mc=suggest.get();
            mc.setHint(ModelCoordinate.HINT_REPOSITORY_URL,remote);
            return of(mc);
          }
        }
        return absent();
      }
    }
);
  }
 catch (  ExecutionException e) {
    log.error("String_Node_Str",e);
    return absent();
  }
}
Program: 93270
Project: 93270
Buggy source:
@Override public Optional<ModelCoordinate> call(){
  for (  Entry<String,Pair<File,IModelIndex>> entry : delegates.entrySet()) {
    IModelIndex index=entry.getValue().getSecond();
    Optional<ModelCoordinate> suggest=index.suggest(pc,modelType);
    if (suggest.isPresent()) {
      ModelCoordinate mc=suggest.get();
      mc.setHint(ModelCoordinate.HINT_REPOSITORY_URL,entry.getKey());
      return of(mc);
    }
  }
  return absent();
}

Fixed version (ground truth):
@Override public Optional<ModelCoordinate> call(){
  for (  String remote : prefs.remotes) {
    Pair<File,IModelIndex> pair=delegates.get(remote);
    if (pair == null) {
      return absent();
    }
    IModelIndex index=pair.getSecond();
    Optional<ModelCoordinate> suggest=index.suggest(pc,modelType);
    if (suggest.isPresent()) {
      ModelCoordinate mc=suggest.get();
      mc.setHint(ModelCoordinate.HINT_REPOSITORY_URL,remote);
      return of(mc);
    }
  }
  return absent();
}
Program: 93271
Project: 93271
Buggy source:
private void doOpen(String remoteUrl,boolean scheduleIndexUpdate) throws IOException {
  File indexLocation=new File(basedir,Urls.mangle(remoteUrl));
  IModelIndex modelIndex=new ModelIndex(indexLocation);
  delegates.put(remoteUrl,Pair.newPair(indexLocation,modelIndex));
  if (!indexAlreadyDownloaded(indexLocation) || scheduleIndexUpdate) {
    triggerIndexDownload(remoteUrl);
    return;
  }
  modelIndex.open();
  bus.post(new ModelIndexOpenedEvent());
}

Fixed version (ground truth):
private void doOpen(String remoteUrl,boolean scheduleIndexUpdate) throws IOException {
  File indexLocation=new File(basedir,Urls.mangle(remoteUrl));
  IModelIndex modelIndex=createModelIndex(indexLocation);
  delegates.put(remoteUrl,Pair.newPair(indexLocation,modelIndex));
  if (!indexAlreadyDownloaded(indexLocation) || scheduleIndexUpdate) {
    triggerIndexDownload(remoteUrl);
    return;
  }
  modelIndex.open();
  bus.post(new ModelIndexOpenedEvent());
}
Program: 93272
Project: 93272
Buggy source:
public void storeProviderEnablement(final List<ApidocProvider> providers){
  final String[] disabledProviderNames=getDisabledProviderNames(providers);
  final String toSave=createString(disabledProviderNames);
  pluginPreferences.put(DISABLED_PROVIDERS,toSave);
  flush();
}

Fixed version (ground truth):
public void storeProviderEnablement(final List<ApidocProvider> providers){
  final String[] disabledProviderNames=getDisabledProviderNames(providers);
  final String toSave=Joiner.on(',').join(disabledProviderNames);
  pluginPreferences.put(DISABLED_PROVIDERS,toSave);
  flush();
}
Program: 93274
Project: 93274
Buggy source:
@Override public void mouseExit(final MouseEvent e){
  System.out.println(e);
}

Fixed version (ground truth):
@Override public void mouseExit(final MouseEvent e){
}
Program: 93275
Project: 93275
Buggy source:
@Override public void mouseEnter(final MouseEvent e){
  System.out.println(e);
}

Fixed version (ground truth):
@Override public void mouseEnter(final MouseEvent e){
}
Program: 93276
Project: 93276
Buggy source:
public DefinitionKind getReceiverDefinitionType(){
  if (defKind == null) {
    findCalls();
    if (defKind == DefinitionKind.UNKNOWN) {
      IMethodName def=ctx.getMethodDef().orNull();
      if (def == null) {
        if (isReceiverNameImplicitThis() || isReceiverNameThis() || isReceiverNameSuper()) {
          defKind=THIS;
          setReceiverToSupertype();
        }
 else {
          defKind=FIELD;
        }
      }
 else       if (def != null) {
        defKind=RETURN;
        definedBy=def;
      }
    }
  }
  return defKind;
}

Fixed version (ground truth):
public DefinitionKind getReceiverDefinitionType(){
  if (defKind == null) {
    findCalls();
    if (defKind == DefinitionKind.UNKNOWN) {
      IMethodName def=ctx.getMethodDef().orNull();
      if (def == null) {
        if (isReceiverNameImplicitThis() || isReceiverNameThis() || isReceiverNameSuper()) {
          defKind=THIS;
          setReceiverToSupertype();
        }
 else {
          defKind=FIELD;
        }
      }
 else {
        defKind=RETURN;
        definedBy=def;
      }
    }
  }
  return defKind;
}
Program: 93277
Project: 93277
Buggy source:
public Set<IType> findTypesBySimpleName(char[] simpleTypeName){
  final Set<IType> result=Sets.newHashSet();
  try {
    final JavaProject project=(JavaProject)rCtx.getProject();
    SearchableEnvironment environment=project.newSearchableNameEnvironment(DefaultWorkingCopyOwner.PRIMARY);
    environment.findExactTypes(simpleTypeName,false,IJavaSearchConstants.TYPE,new ISearchRequestor(){
      @Override public void acceptConstructor(      int modifiers,      char[] simpleTypeName,      int parameterCount,      char[] signature,      char[][] parameterTypes,      char[][] parameterNames,      int typeModifiers,      char[] packageName,      int extraFlags,      String path,      AccessRestriction access){
      }
      @Override public void acceptType(      char[] packageName,      char[] typeName,      char[][] enclosingTypeNames,      int modifiers,      AccessRestriction accessRestriction){
        IType res;
        try {
          res=project.findType(String.valueOf(packageName),String.valueOf(typeName));
          if (res != null) {
            result.add(res);
          }
        }
 catch (        JavaModelException e) {
          e.printStackTrace();
        }
      }
      @Override public void acceptPackage(      char[] packageName){
      }
    }
);
  }
 catch (  JavaModelException e) {
    Throws.throwUnhandledException(e);
  }
  return result;
}

Fixed version (ground truth):
public Set<IType> findTypesBySimpleName(char[] simpleTypeName){
  final Set<IType> result=Sets.newHashSet();
  try {
    final JavaProject project=(JavaProject)rCtx.getProject();
    SearchableEnvironment environment=project.newSearchableNameEnvironment(DefaultWorkingCopyOwner.PRIMARY);
    environment.findExactTypes(simpleTypeName,false,IJavaSearchConstants.TYPE,new ISearchRequestor(){
      @Override public void acceptConstructor(      int modifiers,      char[] simpleTypeName,      int parameterCount,      char[] signature,      char[][] parameterTypes,      char[][] parameterNames,      int typeModifiers,      char[] packageName,      int extraFlags,      String path,      AccessRestriction access){
      }
      @Override public void acceptType(      char[] packageName,      char[] typeName,      char[][] enclosingTypeNames,      int modifiers,      AccessRestriction accessRestriction){
        IType res;
        try {
          res=project.findType(String.valueOf(packageName),String.valueOf(typeName));
          if (res != null) {
            result.add(res);
          }
        }
 catch (        JavaModelException e) {
          log.error("String_Node_Str",e);
        }
      }
      @Override public void acceptPackage(      char[] packageName){
      }
    }
);
  }
 catch (  JavaModelException e) {
    Throws.throwUnhandledException(e);
  }
  return result;
}
Program: 93278
Project: 93278
Buggy source:
@Override public void acceptType(char[] packageName,char[] typeName,char[][] enclosingTypeNames,int modifiers,AccessRestriction accessRestriction){
  IType res;
  try {
    res=project.findType(String.valueOf(packageName),String.valueOf(typeName));
    if (res != null) {
      result.add(res);
    }
  }
 catch (  JavaModelException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
@Override public void acceptType(char[] packageName,char[] typeName,char[][] enclosingTypeNames,int modifiers,AccessRestriction accessRestriction){
  IType res;
  try {
    res=project.findType(String.valueOf(packageName),String.valueOf(typeName));
    if (res != null) {
      result.add(res);
    }
  }
 catch (  JavaModelException e) {
    log.error("String_Node_Str",e);
  }
}
Program: 93279
Project: 93279
Buggy source:
@Override public Optional<ICallModel> acquireModel(UniqueTypeName key){
  try {
    ICallModel net=cache.get(key.getName());
    net.reset();
    return of(net);
  }
 catch (  ExecutionException e) {
    e.printStackTrace();
    return Optional.absent();
  }
}

Fixed version (ground truth):
@Override public Optional<ICallModel> acquireModel(UniqueTypeName key){
  try {
    ICallModel net=cache.get(key.getName());
    net.reset();
    return of(net);
  }
 catch (  ExecutionException e) {
    LOG.error("String_Node_Str" + key,e);
    return Optional.absent();
  }
}
Program: 93280
Project: 93280
Buggy source:
private boolean initializeRequiredContext(final ContentAssistInvocationContext context){
  JavaContentAssistInvocationContext jdtCtx=castOrNull(context);
  if (jdtCtx == null) {
    return false;
  }
  ctx=new RecommendersCompletionContext(jdtCtx,astProvider);
  if (ctx == null) {
    return false;
  }
  final Optional<Scope> optionalScope=ScopeAccessWorkaround.resolveScope(ctx);
  if (!optionalScope.isPresent()) {
    return false;
  }
  scope=optionalScope.get();
  return true;
}

Fixed version (ground truth):
private boolean initializeRequiredContext(final ContentAssistInvocationContext context){
  JavaContentAssistInvocationContext jdtCtx=castOrNull(context);
  if (jdtCtx == null) {
    return false;
  }
  ctx=new RecommendersCompletionContext(jdtCtx,astProvider);
  final Optional<Scope> optionalScope=ScopeAccessWorkaround.resolveScope(ctx);
  if (!optionalScope.isPresent()) {
    return false;
  }
  scope=optionalScope.get();
  return true;
}
Program: 93281
Project: 93281
Buggy source:
@Parameters public static Collection<Object[]> scenarios(){
  LinkedList<Object[]> scenarios=Lists.newLinkedList();
  scenarios.add(new Object[]{"String_Node_Str","String_Node_Str"});
  scenarios.add(new Object[]{"String_Node_Str","String_Node_Str"});
  scenarios.add(new Object[]{"String_Node_Str","String_Node_Str"});
  scenarios.add(new Object[]{"String_Node_Str","String_Node_Str"});
  scenarios.add(new Object[]{"String_Node_Str","String_Node_Str"});
  scenarios.add(new Object[]{"String_Node_Str","String_Node_Str"});
  scenarios.add(new Object[]{"String_Node_Str","String_Node_Str"});
  scenarios.add(new Object[]{"String_Node_Str","String_Node_Str"});
  return scenarios;
}

Fixed version (ground truth):
@Parameters public static Collection<Object[]> scenarios(){
  LinkedList<Object[]> scenarios=Lists.newLinkedList();
  scenarios.add(new Object[]{"String_Node_Str","String_Node_Str"});
  scenarios.add(new Object[]{"String_Node_Str","String_Node_Str"});
  scenarios.add(new Object[]{"String_Node_Str","String_Node_Str"});
  scenarios.add(new Object[]{"String_Node_Str","String_Node_Str"});
  scenarios.add(new Object[]{"String_Node_Str","String_Node_Str"});
  scenarios.add(new Object[]{"String_Node_Str","String_Node_Str"});
  scenarios.add(new Object[]{"String_Node_Str","String_Node_Str"});
  scenarios.add(new Object[]{"String_Node_Str","String_Node_Str"});
  scenarios.add(new Object[]{"String_Node_Str","String_Node_Str"});
  scenarios.add(new Object[]{"String_Node_Str","String_Node_Str"});
  scenarios.add(new Object[]{"String_Node_Str","String_Node_Str"});
  scenarios.add(new Object[]{"String_Node_Str","String_Node_Str"});
  scenarios.add(new Object[]{"String_Node_Str","String_Node_Str"});
  scenarios.add(new Object[]{"String_Node_Str","String_Node_Str"});
  scenarios.add(new Object[]{"String_Node_Str","String_Node_Str"});
  return scenarios;
}
Program: 93282
Project: 93282
Buggy source:
@Parameters public static Collection<Object[]> scenarios(){
  LinkedList<Object[]> scenarios=Lists.newLinkedList();
  scenarios.add(new Object[]{"String_Node_Str","String_Node_Str"});
  scenarios.add(new Object[]{"String_Node_Str","String_Node_Str"});
  scenarios.add(new Object[]{"String_Node_Str","String_Node_Str"});
  scenarios.add(new Object[]{"String_Node_Str","String_Node_Str"});
  scenarios.add(new Object[]{"String_Node_Str","String_Node_Str"});
  scenarios.add(new Object[]{"String_Node_Str","String_Node_Str"});
  scenarios.add(new Object[]{"String_Node_Str","String_Node_Str"});
  scenarios.add(new Object[]{"String_Node_Str","String_Node_Str"});
  return scenarios;
}

Fixed version (ground truth):
@Parameters public static Collection<Object[]> scenarios(){
  LinkedList<Object[]> scenarios=Lists.newLinkedList();
  scenarios.add(new Object[]{"String_Node_Str","String_Node_Str"});
  scenarios.add(new Object[]{"String_Node_Str","String_Node_Str"});
  scenarios.add(new Object[]{"String_Node_Str","String_Node_Str"});
  scenarios.add(new Object[]{"String_Node_Str","String_Node_Str"});
  scenarios.add(new Object[]{"String_Node_Str","String_Node_Str"});
  scenarios.add(new Object[]{"String_Node_Str","String_Node_Str"});
  scenarios.add(new Object[]{"String_Node_Str","String_Node_Str"});
  scenarios.add(new Object[]{"String_Node_Str","String_Node_Str"});
  scenarios.add(new Object[]{"String_Node_Str","String_Node_Str"});
  scenarios.add(new Object[]{"String_Node_Str","String_Node_Str"});
  scenarios.add(new Object[]{"String_Node_Str","String_Node_Str"});
  scenarios.add(new Object[]{"String_Node_Str","String_Node_Str"});
  scenarios.add(new Object[]{"String_Node_Str","String_Node_Str"});
  scenarios.add(new Object[]{"String_Node_Str","String_Node_Str"});
  scenarios.add(new Object[]{"String_Node_Str","String_Node_Str"});
  return scenarios;
}
Program: 93283
Project: 93283
Buggy source:
private static String getExecutionEnvironmentId(final IJavaProject javaProject){
  try {
    for (    IClasspathEntry entry : javaProject.getRawClasspath()) {
      if (entry.getEntryKind() == IClasspathEntry.CPE_CONTAINER) {
        return JavaRuntime.getExecutionEnvironmentId(entry.getPath());
      }
    }
  }
 catch (  JavaModelException e) {
    e.printStackTrace();
  }
  return "String_Node_Str";
}

Fixed version (ground truth):
private static Optional<String> getExecutionEnvironmentId(final IJavaProject javaProject){
  try {
    for (    IClasspathEntry entry : javaProject.getRawClasspath()) {
      if (entry.getEntryKind() == IClasspathEntry.CPE_CONTAINER) {
        return fromNullable(JavaRuntime.getExecutionEnvironmentId(entry.getPath()));
      }
    }
    return absent();
  }
 catch (  JavaModelException e) {
    return absent();
  }
}
Program: 93284
Project: 93284
Buggy source:
public static Optional<DependencyInfo> createJREDependencyInfo(final IJavaProject javaProject){
  String executionEnvironmentId=getExecutionEnvironmentId(javaProject);
  try {
    IVMInstall vmInstall=JavaRuntime.getVMInstall(javaProject);
    File javaHome=vmInstall.getInstallLocation();
    Map<String,String> attributes=Maps.newHashMap();
    attributes.put(DependencyInfo.EXECUTION_ENVIRONMENT,executionEnvironmentId);
    return fromNullable(new DependencyInfo(javaHome,DependencyType.JRE,attributes));
  }
 catch (  CoreException e) {
    return absent();
  }
}

Fixed version (ground truth):
public static Optional<DependencyInfo> createJREDependencyInfo(final IJavaProject javaProject){
  Optional<String> executionEnvironmentId=getExecutionEnvironmentId(javaProject);
  try {
    IVMInstall vmInstall=getVMInstall(javaProject);
    if (vmInstall == null) {
      return absent();
    }
    File javaHome=vmInstall.getInstallLocation();
    Map<String,String> hints=Maps.newHashMap();
    if (executionEnvironmentId.isPresent()) {
      hints.put(DependencyInfo.EXECUTION_ENVIRONMENT,executionEnvironmentId.get());
    }
    return of(new DependencyInfo(javaHome,DependencyType.JRE,hints));
  }
 catch (  CoreException e) {
    return absent();
  }
}
Program: 93285
Project: 93285
Buggy source:
private void registerDependencyForJAR(final JarPackageFragmentRoot root){
  Optional<IJavaProject> optionalJavaProject=getIJavaProjectForPackageFragmentRoot(root);
  if (!optionalJavaProject.isPresent()) {
    return;
  }
  IJavaProject javaProject=optionalJavaProject.get();
  DependencyInfo dependencyInfoForProject=createDependencyInfoForProject(javaProject);
  if (!isJREOfProjectIsKnown(dependencyInfoForProject)) {
    workspaceDependenciesByProject.removeAll(dependencyInfoForProject);
    registerDependenciesForJavaProject(javaProject);
  }
  if (!isPartOfTheJRE(root)) {
    DependencyInfo dependencyInfo=createDependencyInfoForJAR(root);
    workspaceDependenciesByProject.put(dependencyInfoForProject,dependencyInfo);
  }
}

Fixed version (ground truth):
private void registerDependencyForJAR(final JarPackageFragmentRoot root){
  Optional<IJavaProject> optionalJavaProject=getJavaProjectForPackageFragmentRoot(root);
  if (!optionalJavaProject.isPresent()) {
    return;
  }
  IJavaProject javaProject=optionalJavaProject.get();
  DependencyInfo dependencyInfoForProject=createDependencyInfoForProject(javaProject);
  if (!isJREOfProjectIsKnown(dependencyInfoForProject)) {
    workspaceDependenciesByProject.removeAll(dependencyInfoForProject);
    registerDependenciesForJavaProject(javaProject);
  }
  if (!isPartOfTheJRE(root)) {
    DependencyInfo dependencyInfo=createDependencyInfoForJAR(root);
    workspaceDependenciesByProject.put(dependencyInfoForProject,dependencyInfo);
  }
}
Program: 93286
Project: 93286
Buggy source:
private boolean isPartOfTheJRE(final IPackageFragmentRoot packageFragmentRoot){
  Optional<IJavaProject> optionalJavaProject=getIJavaProjectForPackageFragmentRoot(packageFragmentRoot);
  if (optionalJavaProject.isPresent()) {
    if (jrePackageFragmentRoots.containsEntry(createDependencyInfoForProject(optionalJavaProject.get()),packageFragmentRoot)) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean isPartOfTheJRE(final IPackageFragmentRoot pfr){
  Optional<IJavaProject> optionalJavaProject=getJavaProjectForPackageFragmentRoot(pfr);
  if (optionalJavaProject.isPresent()) {
    if (jrePackageFragmentRoots.containsEntry(createDependencyInfoForProject(optionalJavaProject.get()),pfr)) {
      return true;
    }
  }
  return false;
}
Program: 93287
Project: 93287
Buggy source:
private void deregisterDependencyForJAR(final JarPackageFragmentRoot root){
  Optional<IJavaProject> optionalJavaProject=getIJavaProjectForPackageFragmentRoot(root);
  if (!optionalJavaProject.isPresent()) {
    return;
  }
  IJavaProject javaProject=optionalJavaProject.get();
  if (isPartOfTheJRE(root)) {
    deregisterJREDependenciesForProject(javaProject);
  }
 else {
    DependencyInfo dependencyInfo=createDependencyInfoForJAR(root);
    DependencyInfo projectDependencyInfo=createDependencyInfoForProject(javaProject);
    workspaceDependenciesByProject.remove(projectDependencyInfo,dependencyInfo);
    if (!workspaceDependenciesByProject.containsKey(projectDependencyInfo)) {
      jrePackageFragmentRoots.removeAll(projectDependencyInfo);
    }
  }
}

Fixed version (ground truth):
private void deregisterDependencyForJAR(final JarPackageFragmentRoot pfr){
  Optional<IJavaProject> optionalJavaProject=getJavaProjectForPackageFragmentRoot(pfr);
  if (!optionalJavaProject.isPresent()) {
    return;
  }
  IJavaProject javaProject=optionalJavaProject.get();
  if (isPartOfTheJRE(pfr)) {
    deregisterJREDependenciesForProject(javaProject);
  }
 else {
    DependencyInfo dependencyInfo=createDependencyInfoForJAR(pfr);
    DependencyInfo projectDependencyInfo=createDependencyInfoForProject(javaProject);
    workspaceDependenciesByProject.remove(projectDependencyInfo,dependencyInfo);
    if (!workspaceDependenciesByProject.containsKey(projectDependencyInfo)) {
      jrePackageFragmentRoots.removeAll(projectDependencyInfo);
    }
  }
}
Program: 93288
Project: 93288
Buggy source:
private DependencyInfo createDependencyInfoForJAR(final JarPackageFragmentRoot root){
  File file=root.getPath().toFile();
  DependencyInfo dependencyInfo=new DependencyInfo(file,DependencyType.JAR);
  return dependencyInfo;
}

Fixed version (ground truth):
private DependencyInfo createDependencyInfoForJAR(final JarPackageFragmentRoot pfr){
  File file=ensureIsNotNull(getLocation(pfr).orNull(),"String_Node_Str",pfr);
  DependencyInfo dependencyInfo=new DependencyInfo(file,DependencyType.JAR);
  return dependencyInfo;
}
Program: 93289
Project: 93289
Buggy source:
public DependencyInfo(File file,DependencyType type,Map<String,String> hint){
  this.file=ensureIsNotNull(file);
  checkArgument(file.isAbsolute());
  this.type=type;
  hints=ensureIsNotNull(hint);
}

Fixed version (ground truth):
public DependencyInfo(File file,DependencyType type,Map<String,String> hint){
  this.file=ensureIsNotNull(file);
  ensureIsTrue(file.isAbsolute());
  this.type=type;
  hints=ensureIsNotNull(hint);
}
Program: 93290
Project: 93290
Buggy source:
/** 
 * @return the given file or raises an exception
 */
public static File ensureExists(final File file){
  ensureIsNotNull(file);
  if (!file.exists()) {
    try {
      file.getCanonicalFile();
    }
 catch (    final IOException e) {
      e.printStackTrace();
    }
    throwIllegalArgumentException("String_Node_Str",file.getAbsolutePath());
  }
  return file;
}

Fixed version (ground truth):
/** 
 * @return the given file or raises an exception
 */
public static File ensureExists(final File file){
  ensureIsNotNull(file);
  if (!file.exists()) {
    throwIllegalArgumentException("String_Node_Str",file.getAbsolutePath());
  }
  return file;
}
Program: 93291
Project: 93291
Buggy source:
private void registerDependencyForJAR(final JarPackageFragmentRoot root){
  Optional<IJavaProject> optionalJavaProject=getIJavaProjectForPackageFragmentRoot(root);
  if (!optionalJavaProject.isPresent()) {
    return;
  }
  IJavaProject javaProject=optionalJavaProject.get();
  DependencyInfo dependencyInfoForProject=createDependencyInfoForProject(javaProject);
  if (!isJREOfProjectIsKnown(dependencyInfoForProject)) {
    workspaceDependenciesByProject.removeAll(dependencyInfoForProject);
    registerDependenciesForJavaProject(javaProject);
  }
  if (!isPartOfTheJRE(root)) {
    DependencyInfo dependencyInfo=createDependencyInfoForJAR(root);
    workspaceDependenciesByProject.put(dependencyInfoForProject,dependencyInfo);
  }
}

Fixed version (ground truth):
private void registerDependencyForJAR(final JarPackageFragmentRoot root){
  Optional<IJavaProject> optionalJavaProject=getJavaProjectForPackageFragmentRoot(root);
  if (!optionalJavaProject.isPresent()) {
    return;
  }
  IJavaProject javaProject=optionalJavaProject.get();
  DependencyInfo dependencyInfoForProject=createDependencyInfoForProject(javaProject);
  if (!isJREOfProjectIsKnown(dependencyInfoForProject)) {
    workspaceDependenciesByProject.removeAll(dependencyInfoForProject);
    registerDependenciesForJavaProject(javaProject);
  }
  if (!isPartOfTheJRE(root)) {
    DependencyInfo dependencyInfo=createDependencyInfoForJAR(root);
    workspaceDependenciesByProject.put(dependencyInfoForProject,dependencyInfo);
  }
}
Program: 93292
Project: 93292
Buggy source:
private boolean isPartOfTheJRE(final IPackageFragmentRoot packageFragmentRoot){
  Optional<IJavaProject> optionalJavaProject=getIJavaProjectForPackageFragmentRoot(packageFragmentRoot);
  if (optionalJavaProject.isPresent()) {
    if (jrePackageFragmentRoots.containsEntry(createDependencyInfoForProject(optionalJavaProject.get()),packageFragmentRoot)) {
      return true;
    }
  }
  return false;
}

Fixed version (ground truth):
private boolean isPartOfTheJRE(final IPackageFragmentRoot pfr){
  Optional<IJavaProject> optionalJavaProject=getJavaProjectForPackageFragmentRoot(pfr);
  if (optionalJavaProject.isPresent()) {
    if (jrePackageFragmentRoots.containsEntry(createDependencyInfoForProject(optionalJavaProject.get()),pfr)) {
      return true;
    }
  }
  return false;
}
Program: 93293
Project: 93293
Buggy source:
private void deregisterDependencyForJAR(final JarPackageFragmentRoot root){
  Optional<IJavaProject> optionalJavaProject=getIJavaProjectForPackageFragmentRoot(root);
  if (!optionalJavaProject.isPresent()) {
    return;
  }
  IJavaProject javaProject=optionalJavaProject.get();
  if (isPartOfTheJRE(root)) {
    deregisterJREDependenciesForProject(javaProject);
  }
 else {
    DependencyInfo dependencyInfo=createDependencyInfoForJAR(root);
    DependencyInfo projectDependencyInfo=createDependencyInfoForProject(javaProject);
    workspaceDependenciesByProject.remove(projectDependencyInfo,dependencyInfo);
    if (!workspaceDependenciesByProject.containsKey(projectDependencyInfo)) {
      jrePackageFragmentRoots.removeAll(projectDependencyInfo);
    }
  }
}

Fixed version (ground truth):
private void deregisterDependencyForJAR(final JarPackageFragmentRoot pfr){
  Optional<IJavaProject> optionalJavaProject=getJavaProjectForPackageFragmentRoot(pfr);
  if (!optionalJavaProject.isPresent()) {
    return;
  }
  IJavaProject javaProject=optionalJavaProject.get();
  if (isPartOfTheJRE(pfr)) {
    deregisterJREDependenciesForProject(javaProject);
  }
 else {
    DependencyInfo dependencyInfo=createDependencyInfoForJAR(pfr);
    DependencyInfo projectDependencyInfo=createDependencyInfoForProject(javaProject);
    workspaceDependenciesByProject.remove(projectDependencyInfo,dependencyInfo);
    if (!workspaceDependenciesByProject.containsKey(projectDependencyInfo)) {
      jrePackageFragmentRoots.removeAll(projectDependencyInfo);
    }
  }
}
Program: 93294
Project: 93294
Buggy source:
private DependencyInfo createDependencyInfoForJAR(final JarPackageFragmentRoot root){
  File file=root.getPath().toFile();
  DependencyInfo dependencyInfo=new DependencyInfo(file,DependencyType.JAR);
  return dependencyInfo;
}

Fixed version (ground truth):
private DependencyInfo createDependencyInfoForJAR(final JarPackageFragmentRoot pfr){
  File file=ensureIsNotNull(getLocation(pfr).orNull(),"String_Node_Str",pfr);
  DependencyInfo dependencyInfo=new DependencyInfo(file,DependencyType.JAR);
  return dependencyInfo;
}
Program: 93295
Project: 93295
Buggy source:
public DependencyInfo(File file,DependencyType type,Map<String,String> hint){
  this.file=ensureIsNotNull(file);
  checkArgument(file.isAbsolute());
  this.type=type;
  hints=ensureIsNotNull(hint);
}

Fixed version (ground truth):
public DependencyInfo(File file,DependencyType type,Map<String,String> hint){
  this.file=ensureIsNotNull(file);
  ensureIsTrue(file.isAbsolute());
  this.type=type;
  hints=ensureIsNotNull(hint);
}
Program: 93296
Project: 93296
Buggy source:
/** 
 * @return the given file or raises an exception
 */
public static File ensureExists(final File file){
  ensureIsNotNull(file);
  if (!file.exists()) {
    try {
      file.getCanonicalFile();
    }
 catch (    final IOException e) {
      e.printStackTrace();
    }
    throwIllegalArgumentException("String_Node_Str",file.getAbsolutePath());
  }
  return file;
}

Fixed version (ground truth):
/** 
 * @return the given file or raises an exception
 */
public static File ensureExists(final File file){
  ensureIsNotNull(file);
  if (!file.exists()) {
    throwIllegalArgumentException("String_Node_Str",file.getAbsolutePath());
  }
  return file;
}
Program: 93297
Project: 93297
Buggy source:
public static DependencyInfo createDependencyInfoForProject(final IJavaProject project){
  File file=project.getPath().toFile();
  DependencyInfo dependencyInfo=new DependencyInfo(file,DependencyType.PROJECT);
  return dependencyInfo;
}

Fixed version (ground truth):
public static DependencyInfo createDependencyInfoForProject(final IJavaProject project){
  File file=workspace.findMember(project.getPath()).getLocation().toFile();
  DependencyInfo dependencyInfo=new DependencyInfo(file,DependencyType.PROJECT);
  return dependencyInfo;
}
Program: 93298
Project: 93298
Buggy source:
@Override protected void configure(){
  bind(IProjectCoordinateProvider.class).to(ProjectCoordinateProvider.class).in(Scopes.SINGLETON);
  bind(IModelRepository.class).to(EclipseModelRepository.class).in(Scopes.SINGLETON);
  bind(ManualMappingStrategy.class).in(Scopes.SINGLETON);
  bindRepository();
  createAndBindNamedFile("String_Node_Str",MANUAL_MAPPINGS);
  createAndBindNamedFile("String_Node_Str",IDENTIFIED_PACKAGE_FRAGMENT_ROOTS);
}

Fixed version (ground truth):
@Override protected void configure(){
  requestStaticInjection(Dependencies.class);
  bind(IProjectCoordinateProvider.class).to(ProjectCoordinateProvider.class).in(Scopes.SINGLETON);
  bind(IModelRepository.class).to(EclipseModelRepository.class).in(Scopes.SINGLETON);
  bind(ManualMappingStrategy.class).in(Scopes.SINGLETON);
  bindRepository();
  createAndBindNamedFile("String_Node_Str",MANUAL_MAPPINGS);
  createAndBindNamedFile("String_Node_Str",IDENTIFIED_PACKAGE_FRAGMENT_ROOTS);
}
Program: 93299
Project: 93299
Buggy source:
@Override public String getColumnText(final Object obj,final int index){
  if (obj instanceof DependencyInfo) {
    DependencyInfo dependencyInfo=(DependencyInfo)obj;
switch (index) {
case COLUMN_LOCATION:
      if (dependencyInfo.getType() == DependencyType.JRE) {
        Optional<String> executionEnvironment=dependencyInfo.getAttribute(DependencyInfo.EXECUTION_ENVIRONMENT);
        if (executionEnvironment.isPresent()) {
          return executionEnvironment.get();
        }
      }
    return dependencyInfo.getFile().getName();
case COLUMN_COORDINATE:
  Optional<ProjectCoordinate> optionalProjectCoordinate=mappingProvider.searchForProjectCoordinate(dependencyInfo);
if (optionalProjectCoordinate.isPresent()) {
  return optionalProjectCoordinate.get().toString();
}
default :
return "String_Node_Str";
}
}
return "String_Node_Str";
}

Fixed version (ground truth):
@Override public String getColumnText(final Object obj,final int index){
  if (obj instanceof DependencyInfo) {
    DependencyInfo dependencyInfo=(DependencyInfo)obj;
switch (index) {
case COLUMN_LOCATION:
      if (dependencyInfo.getType() == DependencyType.JRE) {
        Optional<String> executionEnvironment=dependencyInfo.getHint(DependencyInfo.EXECUTION_ENVIRONMENT);
        if (executionEnvironment.isPresent()) {
          return executionEnvironment.get();
        }
      }
    return dependencyInfo.getFile().getName();
case COLUMN_COORDINATE:
  Optional<ProjectCoordinate> optionalProjectCoordinate=mappingProvider.searchForProjectCoordinate(dependencyInfo);
if (optionalProjectCoordinate.isPresent()) {
  return optionalProjectCoordinate.get().toString();
}
default :
return "String_Node_Str";
}
}
return "String_Node_Str";
}
Program: 93300
Project: 93300
Buggy source:
@Override public int hashCode(){
  return new HashCodeBuilder().append(file).append(type).append(attributes).toHashCode();
}

Fixed version (ground truth):
@Override public int hashCode(){
  return new HashCodeBuilder().append(file).append(type).append(hints).toHashCode();
}
Program: 93301
Project: 93301
Buggy source:
@Override public boolean equals(Object obj){
  if (obj instanceof DependencyInfo) {
    final DependencyInfo other=(DependencyInfo)obj;
    return new EqualsBuilder().append(file,other.file).append(type,other.type).append(attributes,other.attributes).isEquals();
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
@Override public boolean equals(Object obj){
  if (obj instanceof DependencyInfo) {
    final DependencyInfo other=(DependencyInfo)obj;
    return new EqualsBuilder().append(file,other.file).append(type,other.type).append(hints,other.hints).isEquals();
  }
 else {
    return false;
  }
}
Program: 93302
Project: 93302
Buggy source:
@Override public String toString(){
  return Objects.toStringHelper("String_Node_Str").addValue(file).addValue(type).addValue(attributes).toString();
}

Fixed version (ground truth):
@Override public String toString(){
  return Objects.toStringHelper("String_Node_Str").addValue(file).addValue(type).addValue(hints).toString();
}
Program: 93303
Project: 93303
Buggy source:
public DependencyInfo(File file,DependencyType type,Map<String,String> attributes){
  this.file=file;
  this.type=type;
  this.attributes=Checks.ensureIsNotNull(attributes);
}

Fixed version (ground truth):
public DependencyInfo(File file,DependencyType type,Map<String,String> hint){
  this.file=ensureIsNotNull(file);
  checkArgument(file.isAbsolute());
  this.type=type;
  this.hints=ensureIsNotNull(hint);
}
Program: 93304
Project: 93304
Buggy source:
@Override protected Optional<ProjectCoordinate> extractProjectCoordinateInternal(DependencyInfo dependencyInfo){
  Optional<String> optionalExecutionEnvironment=dependencyInfo.getAttribute(DependencyInfo.EXECUTION_ENVIRONMENT);
  if (optionalExecutionEnvironment.isPresent()) {
    ProjectCoordinate projectCoordinate=lookUpTable.get(optionalExecutionEnvironment.get());
    if (projectCoordinate != null) {
      return fromNullable(projectCoordinate);
    }
  }
  return absent();
}

Fixed version (ground truth):
@Override protected Optional<ProjectCoordinate> extractProjectCoordinateInternal(DependencyInfo dependencyInfo){
  String optionalExecutionEnvironment=dependencyInfo.getHint(DependencyInfo.EXECUTION_ENVIRONMENT).orNull();
  if (optionalExecutionEnvironment != null) {
    ProjectCoordinate projectCoordinate=lookUpTable.get(optionalExecutionEnvironment);
    if (projectCoordinate != null) {
      return fromNullable(projectCoordinate);
    }
  }
  return absent();
}
Program: 93305
Project: 93305
Buggy source:
@Test public void returnAbsentWhenNoMappingExist() throws IOException {
  ManualMappingStrategy sut=new ManualMappingStrategy(createPersistenceFile());
  Optional<ProjectCoordinate> projectCoordinate=sut.searchForProjectCoordinate(EXAMPLE_DEPENDENCY_INFO);
  assertFalse(projectCoordinate.isPresent());
  sut.close();
}

Fixed version (ground truth):
@Test public void returnAbsentWhenNoMappingExist() throws IOException {
  ManualMappingStrategy sut=new ManualMappingStrategy(persistenceFile);
  Optional<ProjectCoordinate> projectCoordinate=sut.searchForProjectCoordinate(exampleDependencyInfo);
  assertFalse(projectCoordinate.isPresent());
  sut.close();
}
Program: 93306
Project: 93306
Buggy source:
@Test public void returnManualMappingsCorrectForMoreMappings() throws IOException {
  ManualMappingStrategy sut=new ManualMappingStrategy(createPersistenceFile());
  sut.setManualMapping(EXAMPLE_DEPENDENCY_INFO,EXPECTED_PROJECT_COORDINATE);
  sut.setManualMapping(ANOTHER_EXAMPLE_DEPENDENCY_INFO,ANOTHER_EXPECTED_PROJECT_COORDINATE);
  Optional<ProjectCoordinate> projectCoordinate=sut.searchForProjectCoordinate(EXAMPLE_DEPENDENCY_INFO);
  assertEquals(EXPECTED_PROJECT_COORDINATE,projectCoordinate.get());
  Optional<ProjectCoordinate> anotherProjectCoordinate=sut.searchForProjectCoordinate(ANOTHER_EXAMPLE_DEPENDENCY_INFO);
  assertEquals(ANOTHER_EXPECTED_PROJECT_COORDINATE,anotherProjectCoordinate.get());
  sut.close();
}

Fixed version (ground truth):
@Test public void returnManualMappingsCorrectForMoreMappings() throws IOException {
  ManualMappingStrategy sut=new ManualMappingStrategy(persistenceFile);
  sut.setManualMapping(exampleDependencyInfo,EXPECTED_PROJECT_COORDINATE);
  sut.setManualMapping(anotherExampleDependencyInfo,ANOTHER_EXPECTED_PROJECT_COORDINATE);
  Optional<ProjectCoordinate> projectCoordinate=sut.searchForProjectCoordinate(exampleDependencyInfo);
  assertEquals(EXPECTED_PROJECT_COORDINATE,projectCoordinate.get());
  Optional<ProjectCoordinate> anotherProjectCoordinate=sut.searchForProjectCoordinate(anotherExampleDependencyInfo);
  assertEquals(ANOTHER_EXPECTED_PROJECT_COORDINATE,anotherProjectCoordinate.get());
  sut.close();
}
Program: 93307
Project: 93307
Buggy source:
@Test public void returnManualMappingCorrect() throws IOException {
  ManualMappingStrategy sut=new ManualMappingStrategy(createPersistenceFile());
  sut.setManualMapping(EXAMPLE_DEPENDENCY_INFO,EXPECTED_PROJECT_COORDINATE);
  Optional<ProjectCoordinate> projectCoordinate=sut.searchForProjectCoordinate(EXAMPLE_DEPENDENCY_INFO);
  assertEquals(EXPECTED_PROJECT_COORDINATE,projectCoordinate.get());
  sut.close();
}

Fixed version (ground truth):
@Test public void returnManualMappingCorrect() throws IOException {
  ManualMappingStrategy sut=new ManualMappingStrategy(persistenceFile);
  sut.setManualMapping(exampleDependencyInfo,EXPECTED_PROJECT_COORDINATE);
  Optional<ProjectCoordinate> projectCoordinate=sut.searchForProjectCoordinate(exampleDependencyInfo);
  assertEquals(EXPECTED_PROJECT_COORDINATE,projectCoordinate.get());
  sut.close();
}
Program: 93308
Project: 93308
Buggy source:
@Test public void storageOfManualMappingsWorksCorrect() throws IOException {
  File persistenceFile=createPersistenceFile();
  ManualMappingStrategy sut=new ManualMappingStrategy(persistenceFile);
  sut.open();
  sut.setManualMapping(EXAMPLE_DEPENDENCY_INFO,EXPECTED_PROJECT_COORDINATE);
  sut.setManualMapping(ANOTHER_EXAMPLE_DEPENDENCY_INFO,ANOTHER_EXPECTED_PROJECT_COORDINATE);
  sut.close();
  sut=new ManualMappingStrategy(persistenceFile);
  sut.open();
  Optional<ProjectCoordinate> projectCoordinate=sut.searchForProjectCoordinate(EXAMPLE_DEPENDENCY_INFO);
  assertEquals(EXPECTED_PROJECT_COORDINATE,projectCoordinate.get());
  Optional<ProjectCoordinate> anotherProjectCoordinate=sut.searchForProjectCoordinate(ANOTHER_EXAMPLE_DEPENDENCY_INFO);
  assertEquals(ANOTHER_EXPECTED_PROJECT_COORDINATE,anotherProjectCoordinate.get());
  sut.close();
}

Fixed version (ground truth):
@Test public void storageOfManualMappingsWorksCorrect() throws IOException {
  ManualMappingStrategy sut=new ManualMappingStrategy(persistenceFile);
  sut.setManualMapping(exampleDependencyInfo,EXPECTED_PROJECT_COORDINATE);
  sut.setManualMapping(anotherExampleDependencyInfo,ANOTHER_EXPECTED_PROJECT_COORDINATE);
  sut.close();
  sut=new ManualMappingStrategy(persistenceFile);
  sut.open();
  Optional<ProjectCoordinate> projectCoordinate=sut.searchForProjectCoordinate(exampleDependencyInfo);
  assertEquals(EXPECTED_PROJECT_COORDINATE,projectCoordinate.get());
  Optional<ProjectCoordinate> anotherProjectCoordinate=sut.searchForProjectCoordinate(anotherExampleDependencyInfo);
  assertEquals(ANOTHER_EXPECTED_PROJECT_COORDINATE,anotherProjectCoordinate.get());
  sut.close();
}
Program: 93309
Project: 93309
Buggy source:
@Test public void testInvalidDependencyType(){
  FingerprintStrategy sut=new FingerprintStrategy(null);
  sut.searchForProjectCoordinate(new DependencyInfo(null,DependencyType.PROJECT));
}

Fixed version (ground truth):
@Test public void testInvalidDependencyType(){
  FingerprintStrategy sut=new FingerprintStrategy(null);
  sut.searchForProjectCoordinate(new DependencyInfo(exampleFile,DependencyType.PROJECT));
}
Program: 93310
Project: 93310
Buggy source:
@Test public void testMissingInformation() throws IOException {
  File jar=folder.newFile("String_Node_Str");
  SimpleIndexSearcher mockedIndexer=mock(SimpleIndexSearcher.class);
  when(mockedIndexer.searchByFingerprint(Fingerprints.sha1(jar))).thenReturn(fromNullable("String_Node_Str"));
  FingerprintStrategy sut=new FingerprintStrategy(mockedIndexer);
  Optional<ProjectCoordinate> optionalProjectCoordinate=sut.searchForProjectCoordinate(new DependencyInfo(jar,DependencyType.JAR));
  Assert.assertFalse(optionalProjectCoordinate.isPresent());
}

Fixed version (ground truth):
@Test public void testMissingInformation() throws IOException {
  SimpleIndexSearcher mockedIndexer=mock(SimpleIndexSearcher.class);
  when(mockedIndexer.searchByFingerprint(Fingerprints.sha1(exampleFile))).thenReturn(fromNullable("String_Node_Str"));
  FingerprintStrategy sut=new FingerprintStrategy(mockedIndexer);
  Optional<ProjectCoordinate> optionalProjectCoordinate=sut.searchForProjectCoordinate(new DependencyInfo(exampleFile,DependencyType.JAR));
  Assert.assertFalse(optionalProjectCoordinate.isPresent());
}
Program: 93311
Project: 93311
Buggy source:
@Test public void testValidJAR() throws IOException {
  File jar=folder.newFile("String_Node_Str");
  SimpleIndexSearcher mockedIndexer=mock(SimpleIndexSearcher.class);
  when(mockedIndexer.searchByFingerprint(Fingerprints.sha1(jar))).thenReturn(Optional.fromNullable("String_Node_Str"));
  FingerprintStrategy sut=new FingerprintStrategy(mockedIndexer);
  Optional<ProjectCoordinate> optionalProjectCoordinate=sut.searchForProjectCoordinate(new DependencyInfo(jar,DependencyType.JAR));
  Assert.assertEquals(EXPECTED_PROJECT_COORDINATE,optionalProjectCoordinate.get());
}

Fixed version (ground truth):
@Test public void testValidJAR() throws IOException {
  SimpleIndexSearcher mockedIndexer=mock(SimpleIndexSearcher.class);
  when(mockedIndexer.searchByFingerprint(Fingerprints.sha1(exampleFile))).thenReturn(Optional.fromNullable("String_Node_Str"));
  FingerprintStrategy sut=new FingerprintStrategy(mockedIndexer);
  Optional<ProjectCoordinate> optionalProjectCoordinate=sut.searchForProjectCoordinate(new DependencyInfo(exampleFile,DependencyType.JAR));
  Assert.assertEquals(EXPECTED_PROJECT_COORDINATE,optionalProjectCoordinate.get());
}
Program: 93312
Project: 93312
Buggy source:
private Collection<IMethodName> getCallsForDefinition(final ICallModel model,final IMethodName definition){
  boolean constructorAdded=false;
  final TreeSet<IMethodName> calls=Sets.newTreeSet();
  final List<Recommendation<IMethodName>> rec=Recommendations.top(model.recommendCalls(),100,0.1d);
  if (rec.isEmpty()) {
    return Collections.emptyList();
  }
  if (requiresConstructor && definition.isInit()) {
    calls.add(definition);
    constructorAdded=true;
  }
  if (requiresConstructor && !constructorAdded) {
    return Collections.emptyList();
  }
  for (  final Recommendation<IMethodName> pair : rec) {
    calls.add(pair.getProposal());
  }
  if (!containsCallWithMethodPrefix(calls)) {
    return Collections.emptyList();
  }
  return calls;
}

Fixed version (ground truth):
private Collection<IMethodName> getCallsForDefinition(final ICallModel model,final IMethodName definition){
  boolean constructorAdded=false;
  final TreeSet<IMethodName> calls=Sets.newTreeSet();
  final List<Recommendation<IMethodName>> rec=Recommendations.top(model.recommendCalls(),100,0.1d);
  if (rec.isEmpty()) {
    return Lists.newLinkedList();
  }
  if (requiresConstructor && definition.isInit()) {
    calls.add(definition);
    constructorAdded=true;
  }
  if (requiresConstructor && !constructorAdded) {
    return Lists.newLinkedList();
  }
  for (  final Recommendation<IMethodName> pair : rec) {
    calls.add(pair.getProposal());
  }
  if (!containsCallWithMethodPrefix(calls)) {
    return Lists.newLinkedList();
  }
  return calls;
}
Program: 93313
Project: 93313
Buggy source:
public static DependencyInfo createDependencyInfoForProject(final IJavaProject project){
  File file=project.getPath().toFile();
  DependencyInfo dependencyInfo=new DependencyInfo(file,DependencyType.PROJECT);
  return dependencyInfo;
}

Fixed version (ground truth):
public static DependencyInfo createDependencyInfoForProject(final IJavaProject project){
  File file=workspace.findMember(project.getPath()).getLocation().toFile();
  DependencyInfo dependencyInfo=new DependencyInfo(file,DependencyType.PROJECT);
  return dependencyInfo;
}
Program: 93314
Project: 93314
Buggy source:
@Override protected void configure(){
  bind(IProjectCoordinateProvider.class).to(ProjectCoordinateProvider.class).in(Scopes.SINGLETON);
  bind(IModelRepository.class).to(EclipseModelRepository.class).in(Scopes.SINGLETON);
  bind(ManualMappingStrategy.class).in(Scopes.SINGLETON);
  bindRepository();
  createAndBindNamedFile("String_Node_Str",MANUAL_MAPPINGS);
  createAndBindNamedFile("String_Node_Str",IDENTIFIED_PACKAGE_FRAGMENT_ROOTS);
}

Fixed version (ground truth):
@Override protected void configure(){
  requestStaticInjection(Dependencies.class);
  bind(IProjectCoordinateProvider.class).to(ProjectCoordinateProvider.class).in(Scopes.SINGLETON);
  bind(IModelRepository.class).to(EclipseModelRepository.class).in(Scopes.SINGLETON);
  bind(ManualMappingStrategy.class).in(Scopes.SINGLETON);
  bindRepository();
  createAndBindNamedFile("String_Node_Str",MANUAL_MAPPINGS);
  createAndBindNamedFile("String_Node_Str",IDENTIFIED_PACKAGE_FRAGMENT_ROOTS);
}
Program: 93315
Project: 93315
Buggy source:
@Override public String getColumnText(final Object obj,final int index){
  if (obj instanceof DependencyInfo) {
    DependencyInfo dependencyInfo=(DependencyInfo)obj;
switch (index) {
case COLUMN_LOCATION:
      if (dependencyInfo.getType() == DependencyType.JRE) {
        Optional<String> executionEnvironment=dependencyInfo.getAttribute(DependencyInfo.EXECUTION_ENVIRONMENT);
        if (executionEnvironment.isPresent()) {
          return executionEnvironment.get();
        }
      }
    return dependencyInfo.getFile().getName();
case COLUMN_COORDINATE:
  Optional<ProjectCoordinate> optionalProjectCoordinate=mappingProvider.searchForProjectCoordinate(dependencyInfo);
if (optionalProjectCoordinate.isPresent()) {
  return optionalProjectCoordinate.get().toString();
}
default :
return "String_Node_Str";
}
}
return "String_Node_Str";
}

Fixed version (ground truth):
@Override public String getColumnText(final Object obj,final int index){
  if (obj instanceof DependencyInfo) {
    DependencyInfo dependencyInfo=(DependencyInfo)obj;
switch (index) {
case COLUMN_LOCATION:
      if (dependencyInfo.getType() == DependencyType.JRE) {
        Optional<String> executionEnvironment=dependencyInfo.getHint(DependencyInfo.EXECUTION_ENVIRONMENT);
        if (executionEnvironment.isPresent()) {
          return executionEnvironment.get();
        }
      }
    return dependencyInfo.getFile().getName();
case COLUMN_COORDINATE:
  Optional<ProjectCoordinate> optionalProjectCoordinate=mappingProvider.searchForProjectCoordinate(dependencyInfo);
if (optionalProjectCoordinate.isPresent()) {
  return optionalProjectCoordinate.get().toString();
}
default :
return "String_Node_Str";
}
}
return "String_Node_Str";
}
Program: 93316
Project: 93316
Buggy source:
@Override public int hashCode(){
  return new HashCodeBuilder().append(file).append(type).append(attributes).toHashCode();
}

Fixed version (ground truth):
@Override public int hashCode(){
  return new HashCodeBuilder().append(file).append(type).append(hints).toHashCode();
}
Program: 93317
Project: 93317
Buggy source:
@Override public boolean equals(Object obj){
  if (obj instanceof DependencyInfo) {
    final DependencyInfo other=(DependencyInfo)obj;
    return new EqualsBuilder().append(file,other.file).append(type,other.type).append(attributes,other.attributes).isEquals();
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
@Override public boolean equals(Object obj){
  if (obj instanceof DependencyInfo) {
    final DependencyInfo other=(DependencyInfo)obj;
    return new EqualsBuilder().append(file,other.file).append(type,other.type).append(hints,other.hints).isEquals();
  }
 else {
    return false;
  }
}