nus-yam/ex-repair huggingface dataset:
Program: 111762
Project: 111762
Buggy source:
private void loadRows(String query){
  HashMap<String,List<Movie>> movies=VideoProvider.getMovieList();
  ArrayObjectAdapter listRowAdapter=new ArrayObjectAdapter(new CardPresenter());
  for (  HashMap.Entry<String,List<Movie>> entry : movies.entrySet()) {
    for (int i=0; i < entry.getValue().size(); i++) {
      Movie movie=entry.getValue().get(i);
      if (movie.getTitle().toLowerCase(Locale.ENGLISH).indexOf(query.toLowerCase(Locale.ENGLISH)) >= 0 || movie.getDescription().toLowerCase(Locale.ENGLISH).indexOf(query.toLowerCase(Locale.ENGLISH)) >= 0) {
        listRowAdapter.add(movie);
      }
    }
  }
  HeaderItem header=new HeaderItem(0,getResources().getString(R.string.search_results),null);
  mRowsAdapter.add(new ListRow(header,listRowAdapter));
}

Fixed version (ground truth):
private void loadRows(String query){
  HashMap<String,List<Movie>> movies=VideoProvider.getMovieList();
  ArrayObjectAdapter listRowAdapter=new ArrayObjectAdapter(new CardPresenter());
  for (  Map.Entry<String,List<Movie>> entry : movies.entrySet()) {
    for (int i=0; i < entry.getValue().size(); i++) {
      Movie movie=entry.getValue().get(i);
      if (movie.getTitle().toLowerCase(Locale.ENGLISH).indexOf(query.toLowerCase(Locale.ENGLISH)) >= 0 || movie.getDescription().toLowerCase(Locale.ENGLISH).indexOf(query.toLowerCase(Locale.ENGLISH)) >= 0) {
        listRowAdapter.add(movie);
      }
    }
  }
  HeaderItem header=new HeaderItem(0,getResources().getString(R.string.search_results),null);
  mRowsAdapter.add(new ListRow(header,listRowAdapter));
}
Program: 111763
Project: 111763
Buggy source:
@Override protected void onHandleIntent(Intent intent){
  Log.d(TAG,"String_Node_Str");
  HashMap<String,List<Movie>> recommendations=VideoProvider.getMovieList();
  int count=0;
  try {
    RecommendationBuilder builder=new RecommendationBuilder().setContext(getApplicationContext()).setSmallIcon(R.drawable.videos_by_google_icon);
    for (    HashMap.Entry<String,List<Movie>> entry : recommendations.entrySet()) {
      for (int i=0; i < entry.getValue().size(); i++) {
        Movie movie=entry.getValue().get(i);
        Log.d(TAG,"String_Node_Str" + movie.getTitle());
        builder.setBackground(movie.getCardImageUrl()).setId(count + 1).setPriority(MAX_RECOMMENDATIONS - count).setTitle(movie.getTitle()).setDescription(getString(R.string.popular_header)).setImage(movie.getCardImageUrl()).setIntent(buildPendingIntent(movie)).build();
        if (++count >= MAX_RECOMMENDATIONS) {
          break;
        }
      }
      if (++count >= MAX_RECOMMENDATIONS) {
        break;
      }
    }
  }
 catch (  IOException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}

Fixed version (ground truth):
@Override protected void onHandleIntent(Intent intent){
  Log.d(TAG,"String_Node_Str");
  HashMap<String,List<Movie>> recommendations=VideoProvider.getMovieList();
  int count=0;
  try {
    RecommendationBuilder builder=new RecommendationBuilder().setContext(getApplicationContext()).setSmallIcon(R.drawable.videos_by_google_icon);
    for (    Map.Entry<String,List<Movie>> entry : recommendations.entrySet()) {
      for (int i=0; i < entry.getValue().size(); i++) {
        Movie movie=entry.getValue().get(i);
        Log.d(TAG,"String_Node_Str" + movie.getTitle());
        builder.setBackground(movie.getCardImageUrl()).setId(count + 1).setPriority(MAX_RECOMMENDATIONS - count).setTitle(movie.getTitle()).setDescription(getString(R.string.popular_header)).setImage(movie.getCardImageUrl()).setIntent(buildPendingIntent(movie)).build();
        if (++count >= MAX_RECOMMENDATIONS) {
          break;
        }
      }
      if (++count >= MAX_RECOMMENDATIONS) {
        break;
      }
    }
  }
 catch (  IOException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}
Program: 111764
Project: 111764
Buggy source:
private void setupFragment(){
  VerticalGridPresenter gridPresenter=new VerticalGridPresenter();
  gridPresenter.setNumberOfColumns(NUM_COLUMNS);
  setGridPresenter(gridPresenter);
  mAdapter=new ArrayObjectAdapter(new CardPresenter());
  long seed=System.nanoTime();
  HashMap<String,List<Movie>> movies=VideoProvider.getMovieList();
  for (  HashMap.Entry<String,List<Movie>> entry : movies.entrySet()) {
    List<Movie> list=entry.getValue();
    Collections.shuffle(list,new Random(seed));
    for (int j=0; j < list.size(); j++) {
      mAdapter.add(list.get(j));
    }
  }
  setAdapter(mAdapter);
  setOnItemSelectedListener(new OnItemSelectedListener(){
    @Override public void onItemSelected(    Object item,    Row row){
    }
  }
);
  setOnItemClickedListener(new OnItemClickedListener(){
    @Override public void onItemClicked(    Object item,    Row row){
      if (item instanceof Movie) {
        Movie movie=(Movie)item;
        Intent intent=new Intent(getActivity(),DetailsActivity.class);
        intent.putExtra(getString(R.string.movie),movie);
        startActivity(intent);
      }
    }
  }
);
}

Fixed version (ground truth):
private void setupFragment(){
  VerticalGridPresenter gridPresenter=new VerticalGridPresenter();
  gridPresenter.setNumberOfColumns(NUM_COLUMNS);
  setGridPresenter(gridPresenter);
  mAdapter=new ArrayObjectAdapter(new CardPresenter());
  long seed=System.nanoTime();
  HashMap<String,List<Movie>> movies=VideoProvider.getMovieList();
  for (  Map.Entry<String,List<Movie>> entry : movies.entrySet()) {
    List<Movie> list=entry.getValue();
    Collections.shuffle(list,new Random(seed));
    for (int j=0; j < list.size(); j++) {
      mAdapter.add(list.get(j));
    }
  }
  setAdapter(mAdapter);
  setOnItemSelectedListener(new OnItemSelectedListener(){
    @Override public void onItemSelected(    Object item,    Row row){
    }
  }
);
  setOnItemClickedListener(new OnItemClickedListener(){
    @Override public void onItemClicked(    Object item,    Row row){
      if (item instanceof Movie) {
        Movie movie=(Movie)item;
        Intent intent=new Intent(getActivity(),DetailsActivity.class);
        intent.putExtra(getString(R.string.movie),movie);
        startActivity(intent);
      }
    }
  }
);
}
Program: 111766
Project: 111766
Buggy source:
@Override public void onLoadFinished(Loader<HashMap<String,List<Movie>>> arg0,HashMap<String,List<Movie>> data){
  mRowsAdapter=new ArrayObjectAdapter(new ListRowPresenter());
  CardPresenter cardPresenter=new CardPresenter();
  int i=0;
  for (  HashMap.Entry<String,List<Movie>> entry : data.entrySet()) {
    ArrayObjectAdapter listRowAdapter=new ArrayObjectAdapter(cardPresenter);
    List<Movie> list=entry.getValue();
    for (int j=0; j < list.size(); j++) {
      listRowAdapter.add(list.get(j));
    }
    HeaderItem header=new HeaderItem(i,entry.getKey(),null);
    i++;
    mRowsAdapter.add(new ListRow(header,listRowAdapter));
  }
  HeaderItem gridHeader=new HeaderItem(i,getResources().getString(R.string.preferences),null);
  GridItemPresenter gridPresenter=new GridItemPresenter();
  ArrayObjectAdapter gridRowAdapter=new ArrayObjectAdapter(gridPresenter);
  gridRowAdapter.add(getResources().getString(R.string.grid_view));
  gridRowAdapter.add(getResources().getString(R.string.send_feeback));
  gridRowAdapter.add(getResources().getString(R.string.personal_settings));
  mRowsAdapter.add(new ListRow(gridHeader,gridRowAdapter));
  setAdapter(mRowsAdapter);
  updateRecommendations();
}

Fixed version (ground truth):
@Override public void onLoadFinished(Loader<HashMap<String,List<Movie>>> arg0,HashMap<String,List<Movie>> data){
  mRowsAdapter=new ArrayObjectAdapter(new ListRowPresenter());
  CardPresenter cardPresenter=new CardPresenter();
  int i=0;
  for (  Map.Entry<String,List<Movie>> entry : data.entrySet()) {
    ArrayObjectAdapter listRowAdapter=new ArrayObjectAdapter(cardPresenter);
    List<Movie> list=entry.getValue();
    for (int j=0; j < list.size(); j++) {
      listRowAdapter.add(list.get(j));
    }
    HeaderItem header=new HeaderItem(i,entry.getKey(),null);
    i++;
    mRowsAdapter.add(new ListRow(header,listRowAdapter));
  }
  HeaderItem gridHeader=new HeaderItem(i,getResources().getString(R.string.preferences),null);
  GridItemPresenter gridPresenter=new GridItemPresenter();
  ArrayObjectAdapter gridRowAdapter=new ArrayObjectAdapter(gridPresenter);
  gridRowAdapter.add(getResources().getString(R.string.grid_view));
  gridRowAdapter.add(getResources().getString(R.string.send_feeback));
  gridRowAdapter.add(getResources().getString(R.string.personal_settings));
  mRowsAdapter.add(new ListRow(gridHeader,gridRowAdapter));
  setAdapter(mRowsAdapter);
  updateRecommendations();
}
Program: 111767
Project: 111767
Buggy source:
private void loadRows(String query){
  HashMap<String,List<Movie>> movies=VideoProvider.getMovieList();
  ArrayObjectAdapter listRowAdapter=new ArrayObjectAdapter(new CardPresenter());
  for (  HashMap.Entry<String,List<Movie>> entry : movies.entrySet()) {
    for (int i=0; i < entry.getValue().size(); i++) {
      Movie movie=entry.getValue().get(i);
      if (movie.getTitle().toLowerCase(Locale.ENGLISH).indexOf(query.toLowerCase(Locale.ENGLISH)) >= 0 || movie.getDescription().toLowerCase(Locale.ENGLISH).indexOf(query.toLowerCase(Locale.ENGLISH)) >= 0) {
        listRowAdapter.add(movie);
      }
    }
  }
  HeaderItem header=new HeaderItem(0,getResources().getString(R.string.search_results),null);
  mRowsAdapter.add(new ListRow(header,listRowAdapter));
}

Fixed version (ground truth):
private void loadRows(String query){
  HashMap<String,List<Movie>> movies=VideoProvider.getMovieList();
  ArrayObjectAdapter listRowAdapter=new ArrayObjectAdapter(new CardPresenter());
  for (  Map.Entry<String,List<Movie>> entry : movies.entrySet()) {
    for (int i=0; i < entry.getValue().size(); i++) {
      Movie movie=entry.getValue().get(i);
      if (movie.getTitle().toLowerCase(Locale.ENGLISH).indexOf(query.toLowerCase(Locale.ENGLISH)) >= 0 || movie.getDescription().toLowerCase(Locale.ENGLISH).indexOf(query.toLowerCase(Locale.ENGLISH)) >= 0) {
        listRowAdapter.add(movie);
      }
    }
  }
  HeaderItem header=new HeaderItem(0,getResources().getString(R.string.search_results),null);
  mRowsAdapter.add(new ListRow(header,listRowAdapter));
}
Program: 111768
Project: 111768
Buggy source:
@Override protected void onHandleIntent(Intent intent){
  Log.d(TAG,"String_Node_Str");
  HashMap<String,List<Movie>> recommendations=VideoProvider.getMovieList();
  int count=0;
  try {
    RecommendationBuilder builder=new RecommendationBuilder().setContext(getApplicationContext()).setSmallIcon(R.drawable.videos_by_google_icon);
    for (    HashMap.Entry<String,List<Movie>> entry : recommendations.entrySet()) {
      for (int i=0; i < entry.getValue().size(); i++) {
        Movie movie=entry.getValue().get(i);
        Log.d(TAG,"String_Node_Str" + movie.getTitle());
        builder.setBackground(movie.getCardImageUrl()).setId(count + 1).setPriority(MAX_RECOMMENDATIONS - count).setTitle(movie.getTitle()).setDescription(getString(R.string.popular_header)).setImage(movie.getCardImageUrl()).setIntent(buildPendingIntent(movie)).build();
        if (++count >= MAX_RECOMMENDATIONS) {
          break;
        }
      }
      if (++count >= MAX_RECOMMENDATIONS) {
        break;
      }
    }
  }
 catch (  IOException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}

Fixed version (ground truth):
@Override protected void onHandleIntent(Intent intent){
  Log.d(TAG,"String_Node_Str");
  HashMap<String,List<Movie>> recommendations=VideoProvider.getMovieList();
  int count=0;
  try {
    RecommendationBuilder builder=new RecommendationBuilder().setContext(getApplicationContext()).setSmallIcon(R.drawable.videos_by_google_icon);
    for (    Map.Entry<String,List<Movie>> entry : recommendations.entrySet()) {
      for (int i=0; i < entry.getValue().size(); i++) {
        Movie movie=entry.getValue().get(i);
        Log.d(TAG,"String_Node_Str" + movie.getTitle());
        builder.setBackground(movie.getCardImageUrl()).setId(count + 1).setPriority(MAX_RECOMMENDATIONS - count).setTitle(movie.getTitle()).setDescription(getString(R.string.popular_header)).setImage(movie.getCardImageUrl()).setIntent(buildPendingIntent(movie)).build();
        if (++count >= MAX_RECOMMENDATIONS) {
          break;
        }
      }
      if (++count >= MAX_RECOMMENDATIONS) {
        break;
      }
    }
  }
 catch (  IOException e) {
    Log.e(TAG,"String_Node_Str",e);
  }
}
Program: 111769
Project: 111769
Buggy source:
private void setupFragment(){
  VerticalGridPresenter gridPresenter=new VerticalGridPresenter();
  gridPresenter.setNumberOfColumns(NUM_COLUMNS);
  setGridPresenter(gridPresenter);
  mAdapter=new ArrayObjectAdapter(new CardPresenter());
  long seed=System.nanoTime();
  HashMap<String,List<Movie>> movies=VideoProvider.getMovieList();
  for (  HashMap.Entry<String,List<Movie>> entry : movies.entrySet()) {
    List<Movie> list=entry.getValue();
    Collections.shuffle(list,new Random(seed));
    for (int j=0; j < list.size(); j++) {
      mAdapter.add(list.get(j));
    }
  }
  setAdapter(mAdapter);
  setOnItemSelectedListener(new OnItemSelectedListener(){
    @Override public void onItemSelected(    Object item,    Row row){
    }
  }
);
  setOnItemClickedListener(new OnItemClickedListener(){
    @Override public void onItemClicked(    Object item,    Row row){
      if (item instanceof Movie) {
        Movie movie=(Movie)item;
        Intent intent=new Intent(getActivity(),DetailsActivity.class);
        intent.putExtra(getString(R.string.movie),movie);
        startActivity(intent);
      }
    }
  }
);
}

Fixed version (ground truth):
private void setupFragment(){
  VerticalGridPresenter gridPresenter=new VerticalGridPresenter();
  gridPresenter.setNumberOfColumns(NUM_COLUMNS);
  setGridPresenter(gridPresenter);
  mAdapter=new ArrayObjectAdapter(new CardPresenter());
  long seed=System.nanoTime();
  HashMap<String,List<Movie>> movies=VideoProvider.getMovieList();
  for (  Map.Entry<String,List<Movie>> entry : movies.entrySet()) {
    List<Movie> list=entry.getValue();
    Collections.shuffle(list,new Random(seed));
    for (int j=0; j < list.size(); j++) {
      mAdapter.add(list.get(j));
    }
  }
  setAdapter(mAdapter);
  setOnItemSelectedListener(new OnItemSelectedListener(){
    @Override public void onItemSelected(    Object item,    Row row){
    }
  }
);
  setOnItemClickedListener(new OnItemClickedListener(){
    @Override public void onItemClicked(    Object item,    Row row){
      if (item instanceof Movie) {
        Movie movie=(Movie)item;
        Intent intent=new Intent(getActivity(),DetailsActivity.class);
        intent.putExtra(getString(R.string.movie),movie);
        startActivity(intent);
      }
    }
  }
);
}
Program: 111770
Project: 111770
Buggy source:
/** 
 * Finds   {@link VirtualFile} instances for the specific {@link Pattern} and caches them.
 * @param project current project
 * @param pattern to handle
 * @return matched files list
 */
@NotNull public Collection<VirtualFile> getFilesForPattern(@NotNull final Project project,@NotNull Pattern pattern){
  final GlobalSearchScope scope=GlobalSearchScope.allScope(project);
  final String[] parts=MatcherUtil.getParts(pattern);
  if (parts.length > 0) {
    final String key=StringUtil.join(parts,Constants.DOLLAR);
    if (cacheMap.get(key) == null) {
      final THashSet<VirtualFile> files=new THashSet<VirtualFile>(1000);
      ProjectRootManager.getInstance(project).getFileIndex().iterateContent(new ContentIterator(){
        @Override public boolean processFile(        VirtualFile fileOrDir){
          final String name=fileOrDir.getName();
          if (MatcherUtil.matchAnyPart(parts,name)) {
            for (            VirtualFile file : FilenameIndex.getVirtualFilesByName(project,name,scope)) {
              if (file.isValid() && MatcherUtil.matchAllParts(parts,file.getPath())) {
                files.add(file);
              }
            }
          }
          return true;
        }
      }
);
      cacheMap.put(key,files);
    }
    return cacheMap.get(key);
  }
  return ContainerUtil.newArrayList();
}

Fixed version (ground truth):
/** 
 * Finds   {@link VirtualFile} instances for the specific {@link Pattern} and caches them.
 * @param project current project
 * @param pattern to handle
 * @return matched files list
 */
@NotNull public Collection<VirtualFile> getFilesForPattern(@NotNull final Project project,@NotNull Pattern pattern){
  final GlobalSearchScope scope=IgnoreSearchScope.get(project);
  final String[] parts=MatcherUtil.getParts(pattern);
  if (parts.length > 0) {
    final String key=StringUtil.join(parts,Constants.DOLLAR);
    if (cacheMap.get(key) == null) {
      final THashSet<VirtualFile> files=new THashSet<VirtualFile>(1000);
      ProjectRootManager.getInstance(project).getFileIndex().iterateContent(new ContentIterator(){
        @Override public boolean processFile(        VirtualFile fileOrDir){
          final String name=fileOrDir.getName();
          if (MatcherUtil.matchAnyPart(parts,name)) {
            for (            VirtualFile file : FilenameIndex.getVirtualFilesByName(project,name,scope)) {
              if (file.isValid() && MatcherUtil.matchAllParts(parts,file.getPath())) {
                files.add(file);
              }
            }
          }
          return true;
        }
      }
);
      cacheMap.put(key,files);
    }
    return cacheMap.get(key);
  }
  return ContainerUtil.newArrayList();
}
Program: 111772
Project: 111772
Buggy source:
/** 
 * Returns collection of indexed   {@link IgnoreEntryOccurrence} for given {@link Project} and {@link IgnoreFileType}.
 * @param project  current project
 * @param fileType filetype
 * @return {@link IgnoreEntryOccurrence} collection
 */
@NotNull public static List<IgnoreEntryOccurrence> getEntries(@NotNull Project project,@NotNull IgnoreFileType fileType){
  try {
    final GlobalSearchScope scope=IgnoreSearchScope.projectScope(project);
    return FileBasedIndex.getInstance().getValues(IgnoreFilesIndex.KEY,new IgnoreFileTypeKey(fileType),scope);
  }
 catch (  RuntimeException e) {
    return ContainerUtil.emptyList();
  }
}

Fixed version (ground truth):
/** 
 * Returns collection of indexed   {@link IgnoreEntryOccurrence} for given {@link Project} and {@link IgnoreFileType}.
 * @param project  current project
 * @param fileType filetype
 * @return {@link IgnoreEntryOccurrence} collection
 */
@NotNull public static List<IgnoreEntryOccurrence> getEntries(@NotNull Project project,@NotNull IgnoreFileType fileType){
  try {
    final GlobalSearchScope scope=IgnoreSearchScope.get(project);
    return FileBasedIndex.getInstance().getValues(IgnoreFilesIndex.KEY,new IgnoreFileTypeKey(fileType),scope);
  }
 catch (  RuntimeException e) {
    return ContainerUtil.emptyList();
  }
}
Program: 111774
Project: 111774
Buggy source:
/** 
 * Returns gitignore templates directory
 * @return Resources directory
 */
public static File getResource(String path){
}

Fixed version (ground truth):
/** 
 * Returns gitignore templates directory
 * @return Resources directory
 */
@Nullable public static File getResource(@NotNull String path){
  URL resource=Resources.class.getResource(path);
  if (resource == null) {
    return null;
  }
  return new File(resource.getPath());
}
Program: 111775
Project: 111775
Buggy source:
/** 
 * Reads resource file and returns its content as a String
 * @param path Resource path
 * @return Content
 */
public static String getResourceContent(String path){
  return convertStreamToString(Resources.class.getResourceAsStream(path));
}

Fixed version (ground truth):
/** 
 * Reads resource file and returns its content as a String
 * @param path Resource path
 * @return Content
 */
@Nullable public static String getResourceContent(@NotNull String path){
  return convertStreamToString(Resources.class.getResourceAsStream(path));
}
Program: 111776
Project: 111776
Buggy source:
/** 
 * Returns list of gitignore templates
 * @return Gitignore templates list
 */
public static List<Template> getGitignoreTemplates(){
  if (resourceTemplates == null) {
    resourceTemplates=ContainerUtil.newArrayList();
    try {
      String list=getResourceContent(GITIGNORE_TEMPLATES_PATH);
      BufferedReader br=new BufferedReader(new StringReader(list));
      for (String line; (line=br.readLine()) != null; ) {
        line="String_Node_Str" + line;
        File file=getResource(line);
        String content=getResourceContent(line);
        resourceTemplates.add(new Template(file,content));
      }
    }
 catch (    FileNotFoundException e) {
      e.printStackTrace();
    }
catch (    IOException e) {
      e.printStackTrace();
    }
  }
  final List<Template> templates=ContainerUtil.newArrayList();
  templates.addAll(resourceTemplates);
  IgnoreSettings settings=IgnoreSettings.getInstance();
  for (  IgnoreSettings.UserTemplate userTemplate : settings.getUserTemplates()) {
    templates.add(new Template(userTemplate));
  }
  return templates;
}

Fixed version (ground truth):
/** 
 * Returns list of gitignore templates
 * @return Gitignore templates list
 */
@NotNull public static List<Template> getGitignoreTemplates(){
  final List<Template> templates=ContainerUtil.newArrayList();
  if (resourceTemplates == null) {
    resourceTemplates=ContainerUtil.newArrayList();
    try {
      String list=getResourceContent(GITIGNORE_TEMPLATES_PATH);
      if (list == null) {
        return templates;
      }
      BufferedReader br=new BufferedReader(new StringReader(list));
      for (String line; (line=br.readLine()) != null; ) {
        line="String_Node_Str" + line;
        File file=getResource(line);
        String content=getResourceContent(line);
        resourceTemplates.add(new Template(file,content));
      }
    }
 catch (    FileNotFoundException e) {
      e.printStackTrace();
    }
catch (    IOException e) {
      e.printStackTrace();
    }
  }
  templates.addAll(resourceTemplates);
  IgnoreSettings settings=IgnoreSettings.getInstance();
  for (  IgnoreSettings.UserTemplate userTemplate : settings.getUserTemplates()) {
    templates.add(new Template(userTemplate));
  }
  return templates;
}
Program: 111777
Project: 111777
Buggy source:
/** 
 * Converts InputStream resource to String
 * @param inputStream Input stream
 * @return Content
 */
protected static String convertStreamToString(InputStream inputStream){
  Scanner s=new Scanner(inputStream).useDelimiter("String_Node_Str");
  return s.hasNext() ? s.next() : "String_Node_Str";
}

Fixed version (ground truth):
/** 
 * Converts InputStream resource to String
 * @param inputStream Input stream
 * @return Content
 */
@Nullable protected static String convertStreamToString(@Nullable InputStream inputStream){
  if (inputStream == null) {
    return null;
  }
  Scanner s=new Scanner(inputStream).useDelimiter("String_Node_Str");
  return s.hasNext() ? s.next() : "String_Node_Str";
}
Program: 111778
Project: 111778
Buggy source:
/** 
 * Returns list of gitignore templates
 * @return Gitignore templates list
 */
@NotNull public static List<Template> getGitignoreTemplates(){
  final List<Template> templates=ContainerUtil.newArrayList();
  if (resourceTemplates == null) {
    resourceTemplates=ContainerUtil.newArrayList();
    try {
      String list=getResourceContent(GITIGNORE_TEMPLATES_PATH);
      if (list == null) {
        return templates;
      }
      BufferedReader br=new BufferedReader(new StringReader(list));
      for (String line; (line=br.readLine()) != null; ) {
        line="String_Node_Str" + line;
        File file=getResource(line);
        String content=getResourceContent(line);
        resourceTemplates.add(new Template(file,content));
      }
    }
 catch (    FileNotFoundException e) {
      e.printStackTrace();
    }
catch (    IOException e) {
      e.printStackTrace();
    }
  }
  templates.addAll(resourceTemplates);
  IgnoreSettings settings=IgnoreSettings.getInstance();
  for (  IgnoreSettings.UserTemplate userTemplate : settings.getUserTemplates()) {
    templates.add(new Template(userTemplate));
  }
  return templates;
}

Fixed version (ground truth):
/** 
 * Returns list of gitignore templates
 * @return Gitignore templates list
 */
@NotNull public static List<Template> getGitignoreTemplates(){
  final List<Template> templates=ContainerUtil.newArrayList();
  if (resourceTemplates == null) {
    resourceTemplates=ContainerUtil.newArrayList();
    try {
      String list=getResourceContent(GITIGNORE_TEMPLATES_PATH);
      if (list != null) {
        BufferedReader br=new BufferedReader(new StringReader(list));
        for (String line; (line=br.readLine()) != null; ) {
          line="String_Node_Str" + line;
          File file=getResource(line);
          if (file != null) {
            String content=getResourceContent(line);
            resourceTemplates.add(new Template(file,content));
          }
        }
      }
    }
 catch (    FileNotFoundException e) {
      e.printStackTrace();
    }
catch (    IOException e) {
      e.printStackTrace();
    }
  }
  templates.addAll(resourceTemplates);
  IgnoreSettings settings=IgnoreSettings.getInstance();
  for (  IgnoreSettings.UserTemplate userTemplate : settings.getUserTemplates()) {
    templates.add(new Template(userTemplate));
  }
  return templates;
}
Program: 111779
Project: 111779
Buggy source:
@Override public FileReference createFileReference(TextRange range,int index,String text){
  return new GitReference(this,range,index,text);
}

Fixed version (ground truth):
@Override public FileReference createFileReference(TextRange range,int index,String text){
  return new GitignoreReference(this,range,index,text);
}
Program: 111780
Project: 111780
Buggy source:
private void walk(Collection<ResolveResult> result,Pattern pattern,VirtualFile directory){
  PsiManager psiManager=getElement().getManager();
  for (  VirtualFile file : directory.getChildren()) {
    if (pattern.matcher(file.getName()).matches()) {
      PsiFileSystemItem psiFileSystemItem=FileReferenceHelper.getPsiFileSystemItem(psiManager,file);
      if (psiFileSystemItem != null) {
        result.add(new PsiElementResolveResult(psiFileSystemItem));
      }
    }
    if (file.isDirectory() && !file.is(VFileProperty.SYMLINK)) {
      walk(result,pattern,file);
    }
  }
}

Fixed version (ground truth):
private void walk(Collection<ResolveResult> result,Pattern pattern,VirtualFile directory){
  PsiManager manager=getElement().getManager();
  for (  VirtualFile file : directory.getChildren()) {
    if (pattern.matcher(file.getName()).matches()) {
      PsiFileSystemItem psiFileSystemItem=getPsiFileSystemItem(manager,file);
      if (psiFileSystemItem != null) {
        result.add(new PsiElementResolveResult(psiFileSystemItem));
      }
    }
    if (file.isDirectory() && !file.is(VFileProperty.SYMLINK)) {
      walk(result,pattern,file);
    }
  }
}
Program: 111781
Project: 111781
Buggy source:
@Override public void invoke(@NotNull Project project,@NotNull PsiFile psiFile,@NotNull PsiElement startElement,@NotNull PsiElement endElement){
  if (startElement instanceof GitignoreEntry) {
    LeafPsiElement crlf=(LeafPsiElement)startElement.getNextSibling();
    if (crlf == null || !crlf.getElementType().equals(GitignoreTypes.CRLF)) {
      crlf=(LeafPsiElement)startElement.getPrevSibling();
    }
    if (crlf != null && crlf.getElementType().equals(GitignoreTypes.CRLF)) {
      crlf.delete();
    }
    startElement.delete();
  }
}

Fixed version (ground truth):
@Override public void invoke(@NotNull Project project,@NotNull PsiFile psiFile,@NotNull PsiElement startElement,@NotNull PsiElement endElement){
  if (startElement instanceof GitignoreEntry) {
    ASTNode crlf=TreeUtil.findSibling(startElement.getNode(),GitignoreTypes.CRLF);
    if (crlf == null) {
      crlf=TreeUtil.findSiblingBackward(startElement.getNode(),GitignoreTypes.CRLF);
    }
    if (crlf != null) {
      crlf.getPsi().delete();
    }
    startElement.delete();
  }
}
Program: 111783
Project: 111783
Buggy source:
/** 
 * As   {@link #testFilterSortDesc} but with a filter that cannot be pusheddown to Druid. 
 */
@Test public void testNonPushableFilterSortDesc(){
  final String sql="String_Node_Str" + "String_Node_Str" + "String_Node_Str";
  final String druidQuery="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  sql(sql).limit(4).returns(new Function<ResultSet,Void>(){
    public Void apply(    ResultSet resultSet){
      try {
        for (int i=0; i < 4; i++) {
          assertTrue(resultSet.next());
          assertThat(resultSet.getString("String_Node_Str"),is("String_Node_Str"));
        }
        assertFalse(resultSet.next());
        return null;
      }
 catch (      SQLException e) {
        throw new RuntimeException(e);
      }
    }
  }
).queryContains(druidChecker(druidQuery));
}

Fixed version (ground truth):
/** 
 * As   {@link #testFilterSortDescNumeric()} but with a filter that cannotbe pushed down to Druid. 
 */
@Test public void testNonPushableFilterSortDesc(){
  final String sql="String_Node_Str" + "String_Node_Str" + "String_Node_Str";
  final String druidQuery="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  sql(sql).limit(4).returns(new Function<ResultSet,Void>(){
    public Void apply(    ResultSet resultSet){
      try {
        for (int i=0; i < 4; i++) {
          assertTrue(resultSet.next());
          assertThat(resultSet.getString("String_Node_Str"),is("String_Node_Str"));
        }
        assertFalse(resultSet.next());
        return null;
      }
 catch (      SQLException e) {
        throw new RuntimeException(e);
      }
    }
  }
).queryContains(druidChecker(druidQuery));
}
Program: 111784
Project: 111784
Buggy source:
@Override protected RelDataType deriveRowType(){
  return getCluster().getTypeFactory().leastRestrictive(new AbstractList<RelDataType>(){
    @Override public RelDataType get(    int index){
      return inputs.get(index).getRowType();
    }
    @Override public int size(){
      return inputs.size();
    }
  }
);
}

Fixed version (ground truth):
@Override protected RelDataType deriveRowType(){
  final List<RelDataType> inputRowTypes=Lists.transform(inputs,new Function<RelNode,RelDataType>(){
    public RelDataType apply(    RelNode input){
      return input.getRowType();
    }
  }
);
  final RelDataType rowType=getCluster().getTypeFactory().leastRestrictive(inputRowTypes);
  if (rowType == null) {
    throw new IllegalArgumentException("String_Node_Str" + "String_Node_Str" + Util.sepList(inputRowTypes,"String_Node_Str"));
  }
  return rowType;
}
Program: 111785
Project: 111785
Buggy source:
/** 
 * Creates a relational expression for a table scan, aggregate, filter. It is equivalent to <pre> SELECT deptno, count(*) AS c, sum(sal) AS s FROM emp GROUP BY deptno HAVING count(*) > 10</pre>
 */
private RelBuilder example3(RelBuilder builder){
  return builder.scan("String_Node_Str").aggregate(builder.groupKey("String_Node_Str"),builder.count(false,"String_Node_Str"),builder.sum(false,"String_Node_Str",builder.field("String_Node_Str"))).filter(builder.call(SqlStdOperatorTable.GREATER_THAN,builder.field("String_Node_Str"),builder.literal(10)));
}

Fixed version (ground truth):
/** 
 * Creates a relational expression for a table scan, aggregate, filter. It is equivalent to <pre> SELECT deptno, count(*) AS c, sum(sal) AS s FROM emp GROUP BY deptno HAVING count(*) &gt; 10</pre>
 */
private RelBuilder example3(RelBuilder builder){
  return builder.scan("String_Node_Str").aggregate(builder.groupKey("String_Node_Str"),builder.count(false,"String_Node_Str"),builder.sum(false,"String_Node_Str",builder.field("String_Node_Str"))).filter(builder.call(SqlStdOperatorTable.GREATER_THAN,builder.field("String_Node_Str"),builder.literal(10)));
}
Program: 111786
Project: 111786
Buggy source:
/** 
 * Creates a program, depending on variant: <ol> <li><code>select (x + y) + (x + 1) as a, (x + x) as b from t(x, y)</code> <li><code>select (x + y) + (x + 1) as a, (x + (x + 1)) as b from t(x, y)</code> <li><code>select (x + y) + (x + 1) as a, (x + x) as b from t(x, y) where ((x + y) > 1) and ((x + y) > 1)</code> <li><code>select (x + y) + (x + 1) as a, (x + x) as b from t(x, y) where not case when x + 1 > 5 then true when y is null then null else false end</code> </ol>
 */
private RexProgramBuilder createProg(int variant){
}

Fixed version (ground truth):
/** 
 * Creates a program, depending on variant: <ol> <li><code>select (x + y) + (x + 1) as a, (x + x) as b from t(x, y)</code> <li><code>select (x + y) + (x + 1) as a, (x + (x + 1)) as b from t(x, y)</code> <li><code>select (x + y) + (x + 1) as a, (x + x) as b from t(x, y) where ((x + y) &gt; 1) and ((x + y) &gt; 1)</code> <li><code>select (x + y) + (x + 1) as a, (x + x) as b from t(x, y) where not case when x + 1 &gt; 5 then true when y is null then null else false end</code> </ol>
 */
private RexProgramBuilder createProg(int variant){
}
Program: 111787
Project: 111787
Buggy source:
@Override public boolean equals(Object obj){
  if (this == obj) {
    return true;
  }
  if (obj == null || !(obj instanceof RpcMetadataResponse)) {
    return false;
  }
  RpcMetadataResponse other=(RpcMetadataResponse)obj;
  if (serverAddress == null) {
    if (other.serverAddress != null) {
      return false;
    }
  }
  return serverAddress.equals(other.serverAddress);
}

Fixed version (ground truth):
@Override public boolean equals(Object obj){
  return this == obj || (obj instanceof RpcMetadataResponse && Objects.equals(serverAddress,((RpcMetadataResponse)obj).serverAddress));
}
Program: 111788
Project: 111788
Buggy source:
@Test public void testFilter(){
  final PigRelBuilder builder=PigRelBuilder.create(config().build());
  final RelNode root=builder.load("String_Node_Str",null,null).filter(builder.isNotNull(builder.field("String_Node_Str"))).build();
  assertThat(RelOptUtil.toString(root),is("String_Node_Str" + "String_Node_Str"));
}

Fixed version (ground truth):
@Test public void testFilter(){
  final PigRelBuilder builder=PigRelBuilder.create(config().build());
  final RelNode root=builder.load("String_Node_Str",null,null).filter(builder.isNotNull(builder.field("String_Node_Str"))).build();
  final String plan="String_Node_Str" + "String_Node_Str";
  assertThat(str(root),is(plan));
}
Program: 111789
Project: 111789
Buggy source:
@Test public void testGroup2(){
  final PigRelBuilder builder=PigRelBuilder.create(config().build());
  final RelNode root=builder.scan("String_Node_Str").scan("String_Node_Str").group(null,null,-1,builder.groupKey("String_Node_Str").alias("String_Node_Str"),builder.groupKey("String_Node_Str").alias("String_Node_Str")).build();
  final String plan="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  assertThat(RelOptUtil.toString(root),is(plan));
}

Fixed version (ground truth):
@Test public void testGroup2(){
  final PigRelBuilder builder=PigRelBuilder.create(config().build());
  final RelNode root=builder.scan("String_Node_Str").scan("String_Node_Str").group(null,null,-1,builder.groupKey("String_Node_Str").alias("String_Node_Str"),builder.groupKey("String_Node_Str").alias("String_Node_Str")).build();
  final String plan="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  assertThat(str(root),is(plan));
}
Program: 111790
Project: 111790
Buggy source:
@Test public void testDistinct(){
  final PigRelBuilder builder=PigRelBuilder.create(config().build());
  final RelNode root=builder.scan("String_Node_Str").distinct().build();
  final String plan="String_Node_Str" + "String_Node_Str";
  assertThat(RelOptUtil.toString(root),is(plan));
}

Fixed version (ground truth):
@Test public void testDistinct(){
  final PigRelBuilder builder=PigRelBuilder.create(config().build());
  final RelNode root=builder.scan("String_Node_Str").distinct().build();
  final String plan="String_Node_Str" + "String_Node_Str";
  assertThat(str(root),is(plan));
}
Program: 111791
Project: 111791
Buggy source:
@Test public void testScan(){
  final PigRelBuilder builder=PigRelBuilder.create(config().build());
  final RelNode root=builder.scan("String_Node_Str").build();
  assertThat(RelOptUtil.toString(root),is("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void testScan(){
  final PigRelBuilder builder=PigRelBuilder.create(config().build());
  final RelNode root=builder.scan("String_Node_Str").build();
  assertThat(str(root),is("String_Node_Str"));
}
Program: 111792
Project: 111792
Buggy source:
@Test public void testGroup(){
  final PigRelBuilder builder=PigRelBuilder.create(config().build());
  final RelNode root=builder.scan("String_Node_Str").group(null,null,-1,builder.groupKey("String_Node_Str","String_Node_Str").alias("String_Node_Str")).build();
  final String plan="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str";
  assertThat(RelOptUtil.toString(root),is(plan));
}

Fixed version (ground truth):
@Test public void testGroup(){
  final PigRelBuilder builder=PigRelBuilder.create(config().build());
  final RelNode root=builder.scan("String_Node_Str").group(null,null,-1,builder.groupKey("String_Node_Str","String_Node_Str").alias("String_Node_Str")).build();
  final String plan="String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str";
  assertThat(str(root),is(plan));
}
Program: 111793
Project: 111793
Buggy source:
@Test public void testLoad(){
  final PigRelBuilder builder=PigRelBuilder.create(config().build());
  final RelNode root=builder.load("String_Node_Str",null,null).build();
  assertThat(RelOptUtil.toString(root),is("String_Node_Str"));
}

Fixed version (ground truth):
@Test public void testLoad(){
  final PigRelBuilder builder=PigRelBuilder.create(config().build());
  final RelNode root=builder.load("String_Node_Str",null,null).build();
  assertThat(str(root),is("String_Node_Str"));
}
Program: 111794
Project: 111794
Buggy source:
public Fluent explainContains(String expected) throws ParseException {
  final Ast.Program program=parseProgram(pig);
  final PigRelBuilder builder=PigRelBuilder.create(PigRelBuilderTest.config().build());
  new Handler(builder).handle(program);
  assertThat(RelOptUtil.toString(builder.peek()),is(expected));
  return this;
}

Fixed version (ground truth):
public Fluent explainContains(String expected) throws ParseException {
  final Ast.Program program=parseProgram(pig);
  final PigRelBuilder builder=PigRelBuilder.create(PigRelBuilderTest.config().build());
  new Handler(builder).handle(program);
  assertThat(Util.toLinux(RelOptUtil.toString(builder.peek())),is(expected));
  return this;
}
Program: 111795
Project: 111795
Buggy source:
public Fluent returns(Function<String,Void> checker) throws ParseException {
  final Ast.Program program=parseProgram(pig);
  final PigRelBuilder builder=PigRelBuilder.create(PigRelBuilderTest.config().build());
  final StringWriter sw=new StringWriter();
  new CalciteHandler(builder,sw).handle(program);
  checker.apply(sw.toString());
  return this;
}

Fixed version (ground truth):
public Fluent returns(Function<String,Void> checker) throws ParseException {
  final Ast.Program program=parseProgram(pig);
  final PigRelBuilder builder=PigRelBuilder.create(PigRelBuilderTest.config().build());
  final StringWriter sw=new StringWriter();
  new CalciteHandler(builder,sw).handle(program);
  checker.apply(Util.toLinux(sw.toString()));
  return this;
}
Program: 111796
Project: 111796
Buggy source:
public Fluent parseContains(String expected) throws ParseException {
  final Ast.Program program=parseProgram(pig);
  assertThat(Ast.toString(program),is(expected));
  return this;
}

Fixed version (ground truth):
public Fluent parseContains(String expected) throws ParseException {
  final Ast.Program program=parseProgram(pig);
  assertThat(Util.toLinux(Ast.toString(program)),is(expected));
  return this;
}
Program: 111797
Project: 111797
Buggy source:
/** 
 * Returns a  {@link org.apache.calcite.adapter.enumerable.RexToLixTranslator}suitable to transform the arguments.
 */
RexToLixTranslator rowTranslator();

Fixed version (ground truth):
/** 
 * Returns a  {@link org.apache.calcite.adapter.enumerable.RexToLixTranslator}suitable to transform the arguments.
 * @return {@link RexToLixTranslator} suitable to transform the arguments
 */
RexToLixTranslator rowTranslator();
Program: 111798
Project: 111798
Buggy source:
/** 
 * Returns the parameter types of the aggregate as  {@link java.lang.reflect.Type}.
 */
List<? extends Type> parameterTypes();

Fixed version (ground truth):
/** 
 * Returns the parameter types of the aggregate as  {@link java.lang.reflect.Type}.
 * @return Parameter types of the aggregate
 */
List<? extends Type> parameterTypes();
Program: 111799
Project: 111799
Buggy source:
/** 
 * Returns the parameter types of the aggregate as  {@link org.apache.calcite.rel.type.RelDataType}. This can be helpful to test  {@link org.apache.calcite.rel.type.RelDataType#isNullable()}.
 */
List<? extends RelDataType> parameterRelTypes();

Fixed version (ground truth):
/** 
 * Returns the parameter types of the aggregate as  {@link org.apache.calcite.rel.type.RelDataType}. This can be helpful to test  {@link org.apache.calcite.rel.type.RelDataType#isNullable()}.
 * @return Parameter types of the aggregate
 */
List<? extends RelDataType> parameterRelTypes();
Program: 111800
Project: 111800
Buggy source:
/** 
 * Updates intermediate values to account for the newly added value.  {@link AggResetContext#accumulator()} should be used to referencethe state variables.
 * @param info aggregate context
 * @param add add context
 */
void implementAdd(AggContext info,AggAddContext add);

Fixed version (ground truth):
/** 
 * Updates intermediate values to account for the newly added value.  {@link AggResetContext#accumulator()} should be used to referencethe state variables.
 * @param info Aggregate context
 * @param add Add context
 */
void implementAdd(AggContext info,AggAddContext add);
Program: 111801
Project: 111801
Buggy source:
/** 
 * Implements reset of the intermediate variables to the initial state.  {@link AggResetContext#accumulator()} should be used to referencethe state variables. For instance, to zero the count use the following code: {@code reset.currentBlock().add(Expressions.statement(Expressions.assign(reset.accumulator().get(0), Expressions.constant(0)));}
 * @param info aggregate context
 * @param reset reset context
 */
void implementReset(AggContext info,AggResetContext reset);

Fixed version (ground truth):
/** 
 * Implements reset of the intermediate variables to the initial state.  {@link AggResetContext#accumulator()} should be used to referencethe state variables. For instance, to zero the count use the following code: {@code reset.currentBlock().add(Expressions.statement(Expressions.assign(reset.accumulator().get(0), Expressions.constant(0)));}
 * @param info Aggregate context
 * @param reset Reset context
 */
void implementReset(AggContext info,AggResetContext reset);
Program: 111802
Project: 111802
Buggy source:
/** 
 * Calculates the resulting value based on the intermediate variables. Note: this method must NOT destroy the intermediate variables as calcite might reuse the state when calculating sliding aggregates.  {@link AggResetContext#accumulator()} should be used to referencethe state variables.
 * @param info aggregate context
 * @param result result context
 */
Expression implementResult(AggContext info,AggResultContext result);

Fixed version (ground truth):
/** 
 * Calculates the resulting value based on the intermediate variables. Note: this method must NOT destroy the intermediate variables as calcite might reuse the state when calculating sliding aggregates.  {@link AggResetContext#accumulator()} should be used to referencethe state variables.
 * @param info Aggregate context
 * @param result Result context
 * @return Expression that is a result of calculating final value ofthe aggregate being implemented
 */
Expression implementResult(AggContext info,AggResultContext result);
Program: 111803
Project: 111803
Buggy source:
/** 
 * Returns the types of the intermediate variables used by the aggregate implementation. <p>For instance, for "concatenate to string" this can be  {@link java.lang.StringBuilder}. Calcite calls this method before all other   {@code implement*} methods.
 * @param info aggregate context
 * @return types of the intermediate variables used by the aggregateimplementation
 */
List<Type> getStateType(AggContext info);

Fixed version (ground truth):
/** 
 * Returns the types of the intermediate variables used by the aggregate implementation. <p>For instance, for "concatenate to string" this can be  {@link java.lang.StringBuilder}. Calcite calls this method before all other   {@code implement*} methods.
 * @param info Aggregate context
 * @return Types of the intermediate variables used by the aggregateimplementation
 */
List<Type> getStateType(AggContext info);
Program: 111804
Project: 111804
Buggy source:
/** 
 * Implements a call. 
 */
Expression implement(RexToLixTranslator translator,RexCall call,RexImpTable.NullAs nullAs);

Fixed version (ground truth):
/** 
 * Implements a call.
 * @param translator Translator for the call
 * @param call Call that should be implemented
 * @param nullAs The desired mode of {@code null} translation
 * @return Translated call
 */
Expression implement(RexToLixTranslator translator,RexCall call,RexImpTable.NullAs nullAs);
Program: 111805
Project: 111805
Buggy source:
/** 
 * Creates an EnumerableInterpreterRel. 
 */
public EnumerableInterpreter(RelOptCluster cluster,RelTraitSet traitSet,RelNode input,double factor){
  super(cluster,traitSet,input);
  this.factor=factor;
}

Fixed version (ground truth):
/** 
 * Creates an EnumerableInterpreter.
 * @param cluster Cluster
 * @param traitSet Traits
 * @param input Input relation
 * @param factor Cost multiply factor
 */
public EnumerableInterpreter(RelOptCluster cluster,RelTraitSet traitSet,RelNode input,double factor){
  super(cluster,traitSet,input);
  this.factor=factor;
}
Program: 111806
Project: 111806
Buggy source:
/** 
 * Creates a plan for this expression according to a calling convention.
 * @param implementor Implementor
 * @param pref Preferred representation for rows in result expression
 */
Result implement(EnumerableRelImplementor implementor,Prefer pref);

Fixed version (ground truth):
/** 
 * Creates a plan for this expression according to a calling convention.
 * @param implementor Implementor
 * @param pref Preferred representation for rows in result expression
 * @return Plan for this expression according to a calling convention
 */
Result implement(EnumerableRelImplementor implementor,Prefer pref);
Program: 111807
Project: 111807
Buggy source:
/** 
 * Returns the expression with which to access the  {@link org.apache.calcite.DataContext}. 
 */
public ParameterExpression getRootExpression(){
  return DataContext.ROOT;
}

Fixed version (ground truth):
/** 
 * Returns the expression used to access  {@link org.apache.calcite.DataContext}.
 * @return expression used to access {@link org.apache.calcite.DataContext}.
 */
public ParameterExpression getRootExpression(){
  return DataContext.ROOT;
}