nus-yam/ex-repair huggingface dataset:
Program: 38970
Project: 38970
Buggy source:
/** 
 * Set the display gamma calibration for a specific control
 * @param idx the control to set
 * @param rgb RGB color calibration.  Each value must be between{@link getDisplayGammaCalibrationMin()} and {@link getDisplayGammaCalibrationMax()}, inclusive.
 * @return true on success, false otherwise.
 */
@Deprecated public boolean setDisplayGammaCalibration(int idx,int[] rgb){
  try {
    return getService().setDisplayGammaCalibration(idx,rgb);
  }
 catch (  RemoteException e) {
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Set the display gamma calibration for a specific control
 * @param idx the control to set
 * @param rgb RGB color calibration.  Each value must be between{@link getDisplayGammaCalibrationMin()} and {@link getDisplayGammaCalibrationMax()}, inclusive.
 * @return true on success, false otherwise.
 */
@Deprecated public boolean setDisplayGammaCalibration(int idx,int[] rgb){
  try {
    if (checkService()) {
      return sService.setDisplayGammaCalibration(idx,rgb);
    }
  }
 catch (  RemoteException e) {
  }
  return false;
}
Program: 38971
Project: 38971
Buggy source:
private int[] getDisplayColorCalibrationArray(){
  try {
    return getService().getDisplayColorCalibration();
  }
 catch (  RemoteException e) {
  }
  return null;
}

Fixed version (ground truth):
private int[] getDisplayColorCalibrationArray(){
  try {
    if (checkService()) {
      return sService.getDisplayColorCalibration();
    }
  }
 catch (  RemoteException e) {
  }
  return null;
}
Program: 38972
Project: 38972
Buggy source:
private int[] getDisplayGammaCalibrationArray(int idx){
  try {
    return getService().getDisplayGammaCalibration(idx);
  }
 catch (  RemoteException e) {
  }
  return null;
}

Fixed version (ground truth):
private int[] getDisplayGammaCalibrationArray(int idx){
  try {
    if (checkService()) {
      return sService.getDisplayGammaCalibration(idx);
    }
  }
 catch (  RemoteException e) {
  }
  return null;
}
Program: 38973
Project: 38973
Buggy source:
/** 
 * @return the number of RGB controls the device supports
 */
@Deprecated public int getNumGammaControls(){
  try {
    return getService().getNumGammaControls();
  }
 catch (  RemoteException e) {
  }
  return 0;
}

Fixed version (ground truth):
/** 
 * @return the number of RGB controls the device supports
 */
@Deprecated public int getNumGammaControls(){
  try {
    if (checkService()) {
      return sService.getNumGammaControls();
    }
  }
 catch (  RemoteException e) {
  }
  return 0;
}
Program: 38974
Project: 38974
Buggy source:
/** 
 * Determine if the given feature is enabled or disabled. Only used for features which have simple enable/disable controls.
 * @param feature the CM Hardware feature to query
 * @return true if the feature is enabled, false otherwise.
 */
public boolean get(int feature){
  if (!BOOLEAN_FEATURES.contains(feature)) {
    throw new IllegalArgumentException(feature + "String_Node_Str");
  }
  try {
    return getService().get(feature);
  }
 catch (  RemoteException e) {
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Determine if the given feature is enabled or disabled. Only used for features which have simple enable/disable controls.
 * @param feature the CM Hardware feature to query
 * @return true if the feature is enabled, false otherwise.
 */
public boolean get(int feature){
  if (!BOOLEAN_FEATURES.contains(feature)) {
    throw new IllegalArgumentException(feature + "String_Node_Str");
  }
  try {
    if (checkService()) {
      return sService.get(feature);
    }
  }
 catch (  RemoteException e) {
  }
  return false;
}
Program: 38975
Project: 38975
Buggy source:
/** 
 * @return the interval, in milliseconds, to trigger LTO data download
 */
public long getLtoDownloadInterval(){
  try {
    return getService().getLtoDownloadInterval();
  }
 catch (  RemoteException e) {
  }
  return 0;
}

Fixed version (ground truth):
/** 
 * @return the interval, in milliseconds, to trigger LTO data download
 */
public long getLtoDownloadInterval(){
  try {
    if (checkService()) {
      return sService.getLtoDownloadInterval();
    }
  }
 catch (  RemoteException e) {
  }
  return 0;
}
Program: 38976
Project: 38976
Buggy source:
/** 
 * @return the serial number to display instead of ro.serialno, or null on failure
 */
public String getSerialNumber(){
  try {
    return getService().getSerialNumber();
  }
 catch (  RemoteException e) {
  }
  return null;
}

Fixed version (ground truth):
/** 
 * @return the serial number to display instead of ro.serialno, or null on failure
 */
public String getSerialNumber(){
  try {
    if (checkService()) {
      return sService.getSerialNumber();
    }
  }
 catch (  RemoteException e) {
  }
  return null;
}
Program: 38977
Project: 38977
Buggy source:
/** 
 * Enable or disable the given feature Only used for features which have simple enable/disable controls.
 * @param feature the CM Hardware feature to set
 * @param enable true to enable, false to disale
 * @return true if the feature is enabled, false otherwise.
 */
public boolean set(int feature,boolean enable){
  if (!BOOLEAN_FEATURES.contains(feature)) {
    throw new IllegalArgumentException(feature + "String_Node_Str");
  }
  try {
    return getService().set(feature,enable);
  }
 catch (  RemoteException e) {
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Enable or disable the given feature Only used for features which have simple enable/disable controls.
 * @param feature the CM Hardware feature to set
 * @param enable true to enable, false to disale
 * @return true if the feature is enabled, false otherwise.
 */
public boolean set(int feature,boolean enable){
  if (!BOOLEAN_FEATURES.contains(feature)) {
    throw new IllegalArgumentException(feature + "String_Node_Str");
  }
  try {
    if (checkService()) {
      return sService.set(feature,enable);
    }
  }
 catch (  RemoteException e) {
  }
  return false;
}
Program: 38978
Project: 38978
Buggy source:
/** 
 * @return the destination location of LTO data, or null on failure
 */
public String getLtoDestination(){
  try {
    return getService().getLtoDestination();
  }
 catch (  RemoteException e) {
  }
  return null;
}

Fixed version (ground truth):
/** 
 * @return the destination location of LTO data, or null on failure
 */
public String getLtoDestination(){
  try {
    if (checkService()) {
      return sService.getLtoDestination();
    }
  }
 catch (  RemoteException e) {
  }
  return null;
}
Program: 38979
Project: 38979
Buggy source:
/** 
 * @return true if adaptive backlight should be enabled when sunlight enhancementis enabled.
 */
public boolean requireAdaptiveBacklightForSunlightEnhancement(){
  try {
    return getService().requireAdaptiveBacklightForSunlightEnhancement();
  }
 catch (  RemoteException e) {
  }
  return false;
}

Fixed version (ground truth):
/** 
 * @return true if adaptive backlight should be enabled when sunlight enhancementis enabled.
 */
public boolean requireAdaptiveBacklightForSunlightEnhancement(){
  try {
    if (checkService()) {
      return sService.requireAdaptiveBacklightForSunlightEnhancement();
    }
  }
 catch (  RemoteException e) {
  }
  return false;
}
Program: 38980
Project: 38980
Buggy source:
/** 
 * @return true if setting the mode was successful
 */
public boolean setDisplayMode(DisplayMode mode,boolean makeDefault){
  try {
    return getService().setDisplayMode(mode,makeDefault);
  }
 catch (  RemoteException e) {
  }
  return false;
}

Fixed version (ground truth):
/** 
 * @return true if setting the mode was successful
 */
public boolean setDisplayMode(DisplayMode mode,boolean makeDefault){
  try {
    if (checkService()) {
      return sService.setDisplayMode(mode,makeDefault);
    }
  }
 catch (  RemoteException e) {
  }
  return false;
}
Program: 38981
Project: 38981
Buggy source:
/** 
 * @return the supported features bitmask
 */
public int getSupportedFeatures(){
  try {
    return getService().getSupportedFeatures();
  }
 catch (  RemoteException e) {
  }
  return 0;
}

Fixed version (ground truth):
/** 
 * @return the supported features bitmask
 */
public int getSupportedFeatures(){
  try {
    if (checkService()) {
      return sService.getSupportedFeatures();
    }
  }
 catch (  RemoteException e) {
  }
  return 0;
}
Program: 38982
Project: 38982
Buggy source:
/** 
 * Set the display color calibration to the given rgb triplet
 * @param rgb RGB color calibration.  Each value must be between{@link getDisplayColorCalibrationMin()} and {@link getDisplayColorCalibrationMax()}, inclusive.
 * @return true on success, false otherwise.
 */
public boolean setDisplayColorCalibration(int[] rgb){
  try {
    return getService().setDisplayColorCalibration(rgb);
  }
 catch (  RemoteException e) {
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Set the display color calibration to the given rgb triplet
 * @param rgb RGB color calibration.  Each value must be between{@link getDisplayColorCalibrationMin()} and {@link getDisplayColorCalibrationMax()}, inclusive.
 * @return true on success, false otherwise.
 */
public boolean setDisplayColorCalibration(int[] rgb){
  try {
    if (checkService()) {
      return sService.setDisplayColorCalibration(rgb);
    }
  }
 catch (  RemoteException e) {
  }
  return false;
}
Program: 38983
Project: 38983
Buggy source:
private int[] getVibratorIntensityArray(){
  try {
    return getService().getVibratorIntensity();
  }
 catch (  RemoteException e) {
  }
  return null;
}

Fixed version (ground truth):
private int[] getVibratorIntensityArray(){
  try {
    if (checkService()) {
      return sService.getVibratorIntensity();
    }
  }
 catch (  RemoteException e) {
  }
  return null;
}
Program: 38984
Project: 38984
Buggy source:
/** 
 * @return the default display mode to be set on boot
 */
public DisplayMode getDefaultDisplayMode(){
  try {
    return getService().getDefaultDisplayMode();
  }
 catch (  RemoteException e) {
  }
  return null;
}

Fixed version (ground truth):
/** 
 * @return the default display mode to be set on boot
 */
public DisplayMode getDefaultDisplayMode(){
  try {
    if (checkService()) {
      return sService.getDefaultDisplayMode();
    }
  }
 catch (  RemoteException e) {
  }
  return null;
}
Program: 38985
Project: 38985
Buggy source:
/** 
 * @return the source location of LTO data, or null on failure
 */
public String getLtoSource(){
  try {
    return getService().getLtoSource();
  }
 catch (  RemoteException e) {
  }
  return null;
}

Fixed version (ground truth):
/** 
 * @return the source location of LTO data, or null on failure
 */
public String getLtoSource(){
  try {
    if (checkService()) {
      return sService.getLtoSource();
    }
  }
 catch (  RemoteException e) {
  }
  return null;
}
Program: 38986
Project: 38986
Buggy source:
/** 
 * @return the currently active display mode
 */
public DisplayMode getCurrentDisplayMode(){
  try {
    return getService().getCurrentDisplayMode();
  }
 catch (  RemoteException e) {
  }
  return null;
}

Fixed version (ground truth):
/** 
 * @return the currently active display mode
 */
public DisplayMode getCurrentDisplayMode(){
  try {
    if (checkService()) {
      return sService.getCurrentDisplayMode();
    }
  }
 catch (  RemoteException e) {
  }
  return null;
}
Program: 38987
Project: 38987
Buggy source:
/** 
 * Set the current vibrator intensity
 * @param intensity the intensity to set, between {@link #getVibratorMinIntensity()} and{@link #getVibratorMaxIntensity()} inclusive.
 * @return true on success, false otherwise.
 */
public boolean setVibratorIntensity(int intensity){
  try {
    return getService().setVibratorIntensity(intensity);
  }
 catch (  RemoteException e) {
  }
  return false;
}

Fixed version (ground truth):
/** 
 * Set the current vibrator intensity
 * @param intensity the intensity to set, between {@link #getVibratorMinIntensity()} and{@link #getVibratorMaxIntensity()} inclusive.
 * @return true on success, false otherwise.
 */
public boolean setVibratorIntensity(int intensity){
  try {
    if (checkService()) {
      return sService.setVibratorIntensity(intensity);
    }
  }
 catch (  RemoteException e) {
  }
  return false;
}
Program: 38988
Project: 38988
Buggy source:
/** 
 * @return a list of available display modes on the devices
 */
public DisplayMode[] getDisplayModes(){
  try {
    return getService().getDisplayModes();
  }
 catch (  RemoteException e) {
  }
  return null;
}

Fixed version (ground truth):
/** 
 * @return a list of available display modes on the devices
 */
public DisplayMode[] getDisplayModes(){
  try {
    if (checkService()) {
      return sService.getDisplayModes();
    }
  }
 catch (  RemoteException e) {
  }
  return null;
}
Program: 38989
Project: 38989
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_main);
  init();
  testSetColor();
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_main);
  init();
}
Program: 38990
Project: 38990
Buggy source:
@Override public String secureCloneUrl(Configuration configuration){
  if (configuration.isUseHttpsTransport()) {
    String username=configuration.getGithubUsername();
    String password=configuration.getGithubPassword();
    if (Strings.empty(username)) {
      throw new IllegalArgumentException("String_Node_Str");
    }
 else     if (Strings.empty(password)) {
      throw new IllegalArgumentException("String_Node_Str");
    }
    URL url=repository.getHtmlUrl();
    String host=username + "String_Node_Str" + password+ "String_Node_Str"+ url.getHost();
    String file=url.getFile();
    if (!file.startsWith("String_Node_Str")) {
      file="String_Node_Str" + file;
    }
    String answer="String_Node_Str" + host + file;
    if (!answer.endsWith("String_Node_Str")) {
      answer+="String_Node_Str";
    }
    return answer;
  }
  return getCloneUrl();
}

Fixed version (ground truth):
@Override public String secureCloneUrl(Configuration configuration){
  if (configuration.isUseHttpsTransport()) {
    String username=configuration.getGithubUsername();
    String password=configuration.getGithubPassword();
    if (Strings.empty(username)) {
      throw new IllegalArgumentException("String_Node_Str");
    }
 else     if (Strings.empty(password)) {
      throw new IllegalArgumentException("String_Node_Str");
    }
    URL url=repository.getHtmlUrl();
    String host=username + "String_Node_Str" + password+ "String_Node_Str"+ url.getHost();
    String file=url.getFile();
    if (!file.startsWith("String_Node_Str")) {
      file="String_Node_Str" + file;
    }
    String answer="String_Node_Str" + host + file;
    if (!answer.endsWith("String_Node_Str")) {
      answer+="String_Node_Str";
    }
    return answer;
  }
 else {
    return repository.getSshUrl();
  }
}
Program: 38991
Project: 38991
Buggy source:
protected static void logOutput(Configuration configuration,Logger log,String output,boolean error){
  if (Strings.notEmpty(output)) {
    String[] lines=output.split("String_Node_Str");
    for (    String line : lines) {
      if (error) {
        configuration.info(log,line);
      }
 else {
        configuration.warn(log,line);
      }
    }
  }
}

Fixed version (ground truth):
protected static void logOutput(Configuration configuration,Logger log,String output,boolean error){
  if (Strings.notEmpty(output)) {
    String[] lines=output.split("String_Node_Str");
    for (    String line : lines) {
      if (error) {
        configuration.info(log,line);
      }
 else {
        configuration.error(log,line);
      }
    }
  }
}
Program: 38992
Project: 38992
Buggy source:
public static boolean runCommandAndLogOutput(Configuration configuration,Logger log,File dir,String... commands){
  File outputFile=new File(dir,"String_Node_Str");
  File errorFile=new File(dir,"String_Node_Str");
  try (FileDeleter ignored=new FileDeleter(outputFile,errorFile)){
    outputFile.getParentFile().mkdirs();
    boolean answer=true;
    if (runCommand(dir,outputFile,errorFile,commands) != 0) {
      LOG.warn("String_Node_Str" + String.join("String_Node_Str",commands));
      answer=false;
    }
    logOutput(configuration,log,outputFile,false);
    logOutput(configuration,log,errorFile,true);
    return answer;
  }
 catch (  IOException e) {
    LOG.warn("String_Node_Str" + e,e);
    return false;
  }
}

Fixed version (ground truth):
public static boolean runCommandAndLogOutput(Configuration configuration,Logger log,File dir,String... commands){
  File outputFile=new File(dir,"String_Node_Str");
  File errorFile=new File(dir,"String_Node_Str");
  try (FileDeleter ignored=new FileDeleter(outputFile,errorFile)){
    outputFile.getParentFile().mkdirs();
    boolean answer=true;
    if (runCommand(dir,outputFile,errorFile,commands) != 0) {
      LOG.error("String_Node_Str" + String.join("String_Node_Str",commands));
      answer=false;
    }
    logOutput(configuration,log,outputFile,false);
    logOutput(configuration,log,errorFile,true);
    return answer;
  }
 catch (  IOException e) {
    LOG.warn("String_Node_Str" + e,e);
    return false;
  }
}
Program: 38993
Project: 38993
Buggy source:
public RFResult getMatchesFromContentSteam(Reader reader,int start,int rows,List<Query> filters,int flags,Sort lsort,Query mainQuery) throws IOException, SyntaxError {
  RFResult RFResult=rf.like(reader);
  rawRFQuery=RFResult.rawRFQuery;
  boostedRFQuery=getBoostedFunctionQuery(rawRFQuery);
  Query finalQuery=null;
  if (mainQuery != null) {
    BooleanQuery tmpQuery=new BooleanQuery();
    tmpQuery.add(mainQuery,BooleanClause.Occur.MUST);
    tmpQuery.add(boostedRFQuery,BooleanClause.Occur.SHOULD);
    finalQuery=tmpQuery;
  }
 else {
    finalQuery=boostedRFQuery;
  }
  RFResult.setFinalQuery(finalQuery);
  DocListAndSet results=new DocListAndSet();
  if (this.needDocSet) {
    results=searcher.getDocListAndSet(finalQuery,filters,lsort,start,rows,flags);
  }
 else {
    results.docList=searcher.getDocList(finalQuery,filters,lsort,start,rows,flags);
  }
  RFResult.setDoclist(results);
  return RFResult;
}

Fixed version (ground truth):
public RFResult getMatchesFromContentSteam(Reader reader,int start,int rows,List<Query> filters,int flags,Sort lsort,Query userQuery) throws IOException, SyntaxError {
  RFResult RFResult=rf.like(reader);
  rawRFQuery=RFResult.rawRFQuery;
  boostedRFQuery=getBoostedFunctionQuery(rawRFQuery);
  Query finalQuery=null;
  if (userQuery != null) {
    BooleanQuery tmpQuery=new BooleanQuery();
    tmpQuery.add(userQuery,BooleanClause.Occur.MUST);
    tmpQuery.add(boostedRFQuery,BooleanClause.Occur.SHOULD);
    finalQuery=tmpQuery;
  }
 else {
    finalQuery=boostedRFQuery;
  }
  RFResult.setFinalQuery(finalQuery);
  DocListAndSet results=new DocListAndSet();
  if (this.needDocSet) {
    results=searcher.getDocListAndSet(finalQuery,filters,lsort,start,rows,flags);
  }
 else {
    results.docList=searcher.getDocList(finalQuery,filters,lsort,start,rows,flags);
  }
  RFResult.setDoclist(results);
  return RFResult;
}
Program: 38994
Project: 38994
Buggy source:
public RFResult getMatchesFromDocs(DocIterator iterator,int start,int rows,List<Query> filters,int flags,Sort lsort,Query mainQuery) throws IOException, SyntaxError {
  realRFQuery=new BooleanQuery();
  List<Integer> ids=new ArrayList<Integer>();
  while (iterator.hasNext()) {
    int id=iterator.nextDoc();
    Document doc=reader.document(id);
    ids.add(id);
    TermQuery tq=new TermQuery(new Term(uniqueKeyField.getName(),uniqueKeyField.getType().storedToIndexed(doc.getField(uniqueKeyField.getName()))));
    realRFQuery.add(tq,BooleanClause.Occur.MUST_NOT);
  }
  RFResult RFResult=rf.like(ids);
  rawRFQuery=RFResult.rawRFQuery;
  if (RFResult.getMustMatchQuery() != null) {
    filters.add(RFResult.getMustMatchQuery());
  }
  if (RFResult.getMustNOTMatchQuery() != null) {
    filters.add(RFResult.getMustNOTMatchQuery());
  }
  boostedRFQuery=getBoostedFunctionQuery(rawRFQuery);
  realRFQuery.add(boostedRFQuery,BooleanClause.Occur.MUST);
  BooleanQuery finalQuery=null;
  if (mainQuery != null) {
    finalQuery=new BooleanQuery();
    finalQuery.add(mainQuery,BooleanClause.Occur.MUST);
    finalQuery.add(realRFQuery,BooleanClause.Occur.SHOULD);
  }
 else {
    finalQuery=realRFQuery;
  }
  RFResult.setFinalQuery(finalQuery);
  DocListAndSet results=new DocListAndSet();
  if (this.needDocSet) {
    results=searcher.getDocListAndSet(finalQuery,filters,lsort,start,rows,flags);
  }
 else {
    results.docList=searcher.getDocList(finalQuery,filters,lsort,start,rows,flags);
  }
  RFResult.setDoclist(results);
  return RFResult;
}

Fixed version (ground truth):
public RFResult getMatchesFromDocs(DocIterator iterator,int start,int rows,List<Query> filters,int flags,Sort lsort,Query userQuery) throws IOException, SyntaxError {
  realRFQuery=new BooleanQuery();
  List<Integer> ids=new ArrayList<Integer>();
  while (iterator.hasNext()) {
    int id=iterator.nextDoc();
    Document doc=reader.document(id);
    ids.add(id);
    TermQuery tq=new TermQuery(new Term(uniqueKeyField.getName(),uniqueKeyField.getType().storedToIndexed(doc.getField(uniqueKeyField.getName()))));
    realRFQuery.add(tq,BooleanClause.Occur.MUST_NOT);
  }
  RFResult RFResult=rf.like(ids);
  rawRFQuery=RFResult.rawRFQuery;
  if (RFResult.getMustMatchQuery() != null) {
    filters.add(RFResult.getMustMatchQuery());
  }
  if (RFResult.getMustNOTMatchQuery() != null) {
    filters.add(RFResult.getMustNOTMatchQuery());
  }
  boostedRFQuery=getBoostedFunctionQuery(rawRFQuery);
  realRFQuery.add(boostedRFQuery,BooleanClause.Occur.MUST);
  BooleanQuery finalQuery=null;
  if (userQuery != null) {
    finalQuery=new BooleanQuery();
    finalQuery.add(userQuery,BooleanClause.Occur.MUST);
    finalQuery.add(realRFQuery,BooleanClause.Occur.SHOULD);
  }
 else {
    finalQuery=realRFQuery;
  }
  RFResult.setFinalQuery(finalQuery);
  DocListAndSet results=new DocListAndSet();
  if (this.needDocSet) {
    results=searcher.getDocListAndSet(finalQuery,filters,lsort,start,rows,flags);
  }
 else {
    results.docList=searcher.getDocList(finalQuery,filters,lsort,start,rows,flags);
  }
  RFResult.setDoclist(results);
  return RFResult;
}
Program: 38996
Project: 38996
Buggy source:
private RFResult getMoreLikeTheseFromQuery(SolrQueryResponse rsp,SolrParams params,int flags,String q,Query query,Query mainQuery,SortSpec sortSpec,List<Query> targetFqFilters,List<Query> rfFqFilters,SolrIndexSearcher searcher,RFHelper rfhelper,int start,int rows) throws IOException, SyntaxError {
  boolean includeMatch=params.getBool(RFParams.MATCH_INCLUDE,true);
  int matchOffset=params.getInt(RFParams.MATCH_OFFSET,0);
  DocList match=searcher.getDocList(query,targetFqFilters,null,matchOffset,10000,flags);
  if (match.matches() == 0 && mainQuery == null) {
    throw new SolrException(SolrException.ErrorCode.BAD_REQUEST,String.format("String_Node_Str",q));
  }
  if (includeMatch) {
    rsp.add("String_Node_Str",match);
  }
  DocIterator iterator=match.iterator();
  if (iterator.hasNext() || mainQuery != null) {
    return rfhelper.getMatchesFromDocs(iterator,start,rows,rfFqFilters,flags,sortSpec.getSort(),mainQuery);
  }
  return null;
}

Fixed version (ground truth):
private RFResult getMoreLikeTheseFromQuery(SolrQueryResponse rsp,SolrParams params,int flags,String q,Query query,Query userQuery,SortSpec sortSpec,List<Query> targetFqFilters,List<Query> rfFqFilters,SolrIndexSearcher searcher,RFHelper rfhelper,int start,int rows) throws IOException, SyntaxError {
  boolean includeMatch=params.getBool(RFParams.MATCH_INCLUDE,true);
  int matchOffset=params.getInt(RFParams.MATCH_OFFSET,0);
  DocList match=searcher.getDocList(query,targetFqFilters,null,matchOffset,10000,flags);
  if (match.matches() == 0 && userQuery == null) {
    throw new SolrException(SolrException.ErrorCode.BAD_REQUEST,String.format("String_Node_Str",q));
  }
  if (includeMatch) {
    rsp.add("String_Node_Str",match);
  }
  DocIterator iterator=match.iterator();
  if (iterator.hasNext() || userQuery != null) {
    return rfhelper.getMatchesFromDocs(iterator,start,rows,rfFqFilters,flags,sortSpec.getSort(),userQuery);
  }
  return null;
}
Program: 38999
Project: 38999
Buggy source:
private RobotDashboard(Context ctx){
  prefs=ctx.getSharedPreferences(CONFIG_PREFS,Context.MODE_PRIVATE);
  sockets=new ArrayList<>();
  fieldOverlay=new Canvas();
  configuration=new Configuration();
  telemetry=new DashboardTelemetry(this);
  ClasspathScanner scanner=new ClasspathScanner(new ClassFilter(){
    @Override public boolean shouldProcessClass(    String className){
      return className.startsWith("String_Node_Str");
    }
    @Override public void processClass(    Class clazz){
      if (clazz.isAnnotationPresent(Config.class)) {
        Log.i(TAG,String.format("String_Node_Str",clazz.getCanonicalName()));
        configuration.addOptionsFromClass(clazz);
      }
    }
  }
);
  scanner.scanClasspath();
  server=new RobotWebSocketServer(this);
  try {
    server.start();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
private RobotDashboard(Context ctx){
  prefs=ctx.getSharedPreferences(CONFIG_PREFS,Context.MODE_PRIVATE);
  sockets=new ArrayList<>();
  fieldOverlay=new Canvas();
  configuration=new Configuration();
  telemetry=new DashboardTelemetry(this);
  ClasspathScanner scanner=new ClasspathScanner(new ClassFilter(){
    @Override public boolean shouldProcessClass(    String className){
      return className.startsWith("String_Node_Str");
    }
    @Override public void processClass(    Class klass){
      if (klass.isAnnotationPresent(Config.class)) {
        Log.i(TAG,String.format("String_Node_Str",klass.getCanonicalName()));
        configuration.addOptionsFromClass(klass);
      }
    }
  }
);
  scanner.scanClasspath();
  server=new RobotWebSocketServer(this);
  try {
    server.start();
  }
 catch (  IOException e) {
    e.printStackTrace();
  }
}
Program: 39000
Project: 39000
Buggy source:
@Override public void processClass(Class clazz){
  if (clazz.isAnnotationPresent(Config.class)) {
    Log.i(TAG,String.format("String_Node_Str",clazz.getCanonicalName()));
    configuration.addOptionsFromClass(clazz);
  }
}

Fixed version (ground truth):
@Override public void processClass(Class klass){
  if (klass.isAnnotationPresent(Config.class)) {
    Log.i(TAG,String.format("String_Node_Str",klass.getCanonicalName()));
    configuration.addOptionsFromClass(klass);
  }
}
Program: 39001
Project: 39001
Buggy source:
public void stop(){
  server.stop();
  dashboard=null;
}

Fixed version (ground truth):
public void stop(){
  server.stop();
  telemetry.stop();
  dashboard=null;
}
Program: 39002
Project: 39002
Buggy source:
public DashboardTelemetry(RobotDashboard dashboard){
  this.dashboard=dashboard;
  resetTelemetryForOpMode();
}

Fixed version (ground truth):
public DashboardTelemetry(RobotDashboard dashboard){
  this.dashboard=dashboard;
  updateThread=new TelemetryUpdateThread();
  updateExecutorService=ThreadPool.newSingleThreadExecutor("String_Node_Str");
  updateExecutorService.submit(updateThread);
  resetTelemetryForOpMode();
}
Program: 39004
Project: 39004
Buggy source:
public MecanumDrive(HardwareMap map){
  imu=LynxOptimizedI2cSensorFactory.createLynxBNO055IMU(map.get(LynxModule.class,"String_Node_Str"),1);
  BNO055IMU.Parameters parameters=new BNO055IMU.Parameters();
  parameters.angleUnit=BNO055IMU.AngleUnit.RADIANS;
  imu.initialize(parameters);
  powers=new double[4];
  targetPowers=new double[4];
  encoderOffsets=new int[4];
  motors=new DcMotor[4];
  for (int i=0; i < 4; i++) {
    motors[i]=map.dcMotor.get(MOTOR_NAMES[i]);
    motors[i].setMode(DcMotor.RunMode.RUN_USING_ENCODER);
    motors[i].setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);
  }
  motors[2].setDirection(DcMotorSimple.Direction.REVERSE);
  motors[3].setDirection(DcMotorSimple.Direction.REVERSE);
  pathFollower=new PathFollower(DriveConstants.HEADING_PID,DriveConstants.AXIAL_PID,DriveConstants.LATERAL_PID);
  estimatedPosition=new Vector2d(0,0);
  lastPowers=new double[4];
  maintainHeadingController=new PIDController(DriveConstants.MAINTAIN_HEADING_PID);
  resetEncoders();
  setHeading(0);
}

Fixed version (ground truth):
public MecanumDrive(HardwareMap map,Telemetry telemetry){
  this.telemetry=telemetry;
  telemetryMap=new LinkedHashMap<>();
  for (  String key : CONDITIONAL_TELEMETRY_KEYS) {
    telemetryMap.put(key,0);
  }
  this.fieldOverlay=RobotDashboard.getInstance().getFieldOverlay();
  imu=LynxOptimizedI2cSensorFactory.createLynxBNO055IMU(map.get(LynxModule.class,"String_Node_Str"),1);
  BNO055IMU.Parameters parameters=new BNO055IMU.Parameters();
  parameters.angleUnit=BNO055IMU.AngleUnit.RADIANS;
  imu.initialize(parameters);
  powers=new double[4];
  targetPowers=new double[4];
  encoderOffsets=new int[4];
  motors=new DcMotor[4];
  for (int i=0; i < 4; i++) {
    motors[i]=map.dcMotor.get(MOTOR_NAMES[i]);
    motors[i].setMode(DcMotor.RunMode.RUN_USING_ENCODER);
    motors[i].setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);
  }
  motors[2].setDirection(DcMotorSimple.Direction.REVERSE);
  motors[3].setDirection(DcMotorSimple.Direction.REVERSE);
  pathFollower=new PathFollower(DriveConstants.HEADING_PID,DriveConstants.AXIAL_PID,DriveConstants.LATERAL_PID);
  estimatedPosition=new Vector2d(0,0);
  lastPowers=new double[4];
  maintainHeadingController=new PIDController(DriveConstants.MAINTAIN_HEADING_PID);
  resetEncoders();
  setHeading(0);
}
Program: 39005
Project: 39005
Buggy source:
public void followPath(Path path){
  pathFollower.follow(path);
  setMode(Mode.FOLLOW_PATH);
}

Fixed version (ground truth):
public void followPath(Path path){
  if (!positionEstimationEnabled) {
    Log.i("String_Node_Str","String_Node_Str");
  }
  pathFollower.follow(path);
  setMode(Mode.FOLLOW_PATH);
}
Program: 39007
Project: 39007
Buggy source:
@Override public void init(){
  stickyGamepad1=new StickyGamepad(gamepad1);
  stickyGamepad2=new StickyGamepad(gamepad2);
  dashboard=RobotDashboard.getInstance();
  telemetry.setMsTransmissionInterval(50);
  drive=new MecanumDrive(hardwareMap);
  dumpBed=new DumpBed(hardwareMap,dashboard.getTelemetry());
  jewelSlapper=new JewelSlapper(hardwareMap);
  intake=new Intake(hardwareMap,dashboard.getTelemetry());
  relicRecoverer=new RelicRecoverer(hardwareMap);
  dumpBed.liftDown();
}

Fixed version (ground truth):
@Override public void init(){
  stickyGamepad1=new StickyGamepad(gamepad1);
  stickyGamepad2=new StickyGamepad(gamepad2);
  dashboard=RobotDashboard.getInstance();
  telemetry.setMsTransmissionInterval(50);
  drive=new MecanumDrive(hardwareMap,telemetry);
  dumpBed=new DumpBed(hardwareMap,dashboard.getTelemetry());
  jewelSlapper=new JewelSlapper(hardwareMap);
  intake=new Intake(hardwareMap,dashboard.getTelemetry());
  relicRecoverer=new RelicRecoverer(hardwareMap);
  dumpBed.liftDown();
}
Program: 39009
Project: 39009
Buggy source:
@Override public void init(){
  dashboard=RobotDashboard.getInstance();
  fieldOverlay=dashboard.getFieldOverlay();
  telemetry=new MultipleTelemetry(dashboard.getTelemetry(),telemetry);
  drive=new MecanumDrive(hardwareMap);
  drive.setEstimatedPose(new Pose2d(0,0,Math.PI / 2));
  camera=new VuforiaCamera();
  cryptoboxTracker=new CryptoboxTracker(AllianceColor.BLUE);
  cryptoboxLocalizer=new CryptoboxLocalizer(cryptoboxTracker,camera.getProperties(),drive);
  fpsTracker=new FpsTracker();
  camera.addTracker(cryptoboxTracker);
  camera.addTracker(fpsTracker);
  camera.initialize();
}

Fixed version (ground truth):
@Override public void init(){
  dashboard=RobotDashboard.getInstance();
  fieldOverlay=dashboard.getFieldOverlay();
  telemetry=new MultipleTelemetry(dashboard.getTelemetry(),telemetry);
  drive=new MecanumDrive(hardwareMap,telemetry);
  drive.setEstimatedPose(new Pose2d(0,0,Math.PI / 2));
  camera=new VuforiaCamera();
  cryptoboxTracker=new CryptoboxTracker(AllianceColor.BLUE);
  cryptoboxLocalizer=new CryptoboxLocalizer(cryptoboxTracker,camera.getProperties(),drive);
  fpsTracker=new FpsTracker();
  camera.addTracker(cryptoboxTracker);
  camera.addTracker(fpsTracker);
  camera.initialize();
}
Program: 39010
Project: 39010
Buggy source:
@Override public void runOpMode(){
  dashboard=RobotDashboard.getInstance();
  telemetry=new MultipleTelemetry(telemetry,dashboard.getTelemetry());
  drive=new MecanumDrive(hardwareMap);
  waitForStart();
  double lower=LOWER_BOUND, upper=UPPER_BOUND;
  while (opModeIsActive()) {
    value=(lower + upper) / 2;
    int numErrors=3;
    double errorSum=0;
    for (int i=0; i < numErrors; i++) {
      errorSum+=testFeedforwardCoefficient(value);
    }
    double error=errorSum / numErrors;
    if (error > 0) {
      upper=value;
    }
 else {
      lower=value;
    }
  }
}

Fixed version (ground truth):
@Override public void runOpMode(){
  dashboard=RobotDashboard.getInstance();
  telemetry=new MultipleTelemetry(telemetry,dashboard.getTelemetry());
  drive=new MecanumDrive(hardwareMap,telemetry);
  waitForStart();
  double lower=LOWER_BOUND, upper=UPPER_BOUND;
  while (opModeIsActive()) {
    value=(lower + upper) / 2;
    int numErrors=3;
    double errorSum=0;
    for (int i=0; i < numErrors; i++) {
      errorSum+=testFeedforwardCoefficient(value);
    }
    double error=errorSum / numErrors;
    if (error > 0) {
      upper=value;
    }
 else {
      lower=value;
    }
  }
}
Program: 39012
Project: 39012
Buggy source:
@Override public void runOpMode(){
  dashboard=RobotDashboard.getInstance();
  telemetry=new MultipleTelemetry(telemetry,dashboard.getTelemetry());
  drive=new MecanumDrive(hardwareMap);
  waitForStart();
  double lower=LOWER_BOUND, upper=UPPER_BOUND;
  while (opModeIsActive()) {
    value=(lower + upper) / 2;
    int numErrors=3;
    double errorSum=0;
    for (int i=0; i < numErrors; i++) {
      errorSum+=testFeedforwardCoefficient(value);
    }
    double error=errorSum / numErrors;
    if (error > 0) {
      upper=value;
    }
 else {
      lower=value;
    }
  }
}

Fixed version (ground truth):
@Override public void runOpMode(){
  dashboard=RobotDashboard.getInstance();
  telemetry=new MultipleTelemetry(telemetry,dashboard.getTelemetry());
  drive=new MecanumDrive(hardwareMap,telemetry);
  waitForStart();
  double lower=LOWER_BOUND, upper=UPPER_BOUND;
  while (opModeIsActive()) {
    value=(lower + upper) / 2;
    int numErrors=3;
    double errorSum=0;
    for (int i=0; i < numErrors; i++) {
      errorSum+=testFeedforwardCoefficient(value);
    }
    double error=errorSum / numErrors;
    if (error > 0) {
      upper=value;
    }
 else {
      lower=value;
    }
  }
}
Program: 39013
Project: 39013
Buggy source:
@Override public void runOpMode(){
  dashboard=RobotDashboard.getInstance();
  telemetry=new MultipleTelemetry(telemetry,dashboard.getTelemetry());
  drive=new MecanumDrive(hardwareMap);
  waitForStart();
  double lower=LOWER_BOUND, upper=UPPER_BOUND;
  while (opModeIsActive()) {
    value=(lower + upper) / 2;
    int numErrors=3;
    double errorSum=0;
    for (int i=0; i < numErrors; i++) {
      errorSum+=testFeedforwardCoefficient(value);
    }
    double error=errorSum / numErrors;
    if (error > 0) {
      upper=value;
    }
 else {
      lower=value;
    }
  }
}

Fixed version (ground truth):
@Override public void runOpMode(){
  dashboard=RobotDashboard.getInstance();
  telemetry=new MultipleTelemetry(telemetry,dashboard.getTelemetry());
  drive=new MecanumDrive(hardwareMap,telemetry);
  waitForStart();
  double lower=LOWER_BOUND, upper=UPPER_BOUND;
  while (opModeIsActive()) {
    value=(lower + upper) / 2;
    int numErrors=3;
    double errorSum=0;
    for (int i=0; i < numErrors; i++) {
      errorSum+=testFeedforwardCoefficient(value);
    }
    double error=errorSum / numErrors;
    if (error > 0) {
      upper=value;
    }
 else {
      lower=value;
    }
  }
}
Program: 39014
Project: 39014
Buggy source:
@RequestMapping(method={RequestMethod.GET,RequestMethod.POST},value="String_Node_Str") @ResponseBody public Response search(HttpServletRequest request){
  Object res=null;
  try {
  }
 catch (  Exception e) {
    return errorResponse("String_Node_Str" + e.getMessage(),e.toString());
  }
  return successResponse("String_Node_Str",res);
}

Fixed version (ground truth):
@RequestMapping(method={RequestMethod.GET,RequestMethod.POST},value="String_Node_Str") @ResponseBody public Response search(@RequestParam(value="String_Node_Str",required=false,defaultValue="String_Node_Str") String resourceType,@RequestParam(value="String_Node_Str",required=false,defaultValue="String_Node_Str") String resourceName,@RequestParam(value="String_Node_Str",required=false,defaultValue="String_Node_Str") String page,@RequestParam(value="String_Node_Str",required=false,defaultValue="String_Node_Str") String size,HttpServletRequest request){
  Object res=null;
  try {
    res=resourceService.search(resourceType,resourceName,Integer.valueOf(page),Integer.valueOf(size));
  }
 catch (  Exception e) {
    return errorResponse("String_Node_Str" + e.getMessage(),e.toString());
  }
  return successResponse("String_Node_Str",res);
}
Program: 39016
Project: 39016
Buggy source:
public Object search(String resourceType,String resourceName,int page,int size) throws Exception {
  Sort sort=new Sort(Sort.Direction.DESC,"String_Node_Str");
  PageRequest pageRequest=new PageRequest(page,size,sort);
  Specifications<Resource> conditions=null;
  if (StringUtils.isNotBlank(resourceName)) {
    if (conditions == null)     conditions=Specifications.where(SpecificationFactory.containsLike("String_Node_Str",resourceName));
 else     conditions=conditions.and(SpecificationFactory.containsLike("String_Node_Str",resourceName));
  }
  if (StringUtils.isNotBlank(resourceType)) {
    if (conditions == null)     conditions=Specifications.where(SpecificationFactory.containsLike("String_Node_Str",resourceType));
 else     conditions=conditions.and(SpecificationFactory.containsLike("String_Node_Str",resourceType));
  }
  Page<Resource> page1=null;
  if (conditions == null)   page1=resourceRepository.findAll(pageRequest);
 else   page1=resourceRepository.findAll(conditions,pageRequest);
  return page1;
}

Fixed version (ground truth):
public Object search(String resourceType,String resourceName,int page,int size) throws Exception {
  addResourcesAuto();
  Sort sort=new Sort(Sort.Direction.DESC,"String_Node_Str");
  PageRequest pageRequest=new PageRequest(page,size,sort);
  Specifications<Resource> conditions=null;
  if (StringUtils.isNotBlank(resourceName)) {
    if (conditions == null)     conditions=Specifications.where(SpecificationFactory.containsLike("String_Node_Str",resourceName));
 else     conditions=conditions.and(SpecificationFactory.containsLike("String_Node_Str",resourceName));
  }
  if (StringUtils.isNotBlank(resourceType)) {
    if (conditions == null)     conditions=Specifications.where(SpecificationFactory.containsLike("String_Node_Str",resourceType));
 else     conditions=conditions.and(SpecificationFactory.containsLike("String_Node_Str",resourceType));
  }
  Page<Resource> page1=null;
  if (conditions == null)   page1=resourceRepository.findAll(pageRequest);
 else   page1=resourceRepository.findAll(conditions,pageRequest);
  return page1;
}
Program: 39017
Project: 39017
Buggy source:
public Resource(String type,long resourceOriginId,String name){
  this.resourceOriginId=resourceOriginId;
  this.resourceType=type;
  this.resourceId=EncryptionAlgs.getMD5(type + resourceOriginId);
  this.resourceName=name;
}

Fixed version (ground truth):
public Resource(BaseResource baseResource){
  this.resourceOriginId=baseResource.getId();
  this.resourceName=baseResource.getName();
  this.resourceType=baseResource.getType();
  this.resourceId=EncryptionAlgs.getMD5(this.resourceType + this.resourceOriginId);
}
Program: 39018
Project: 39018
Buggy source:
public OAuth2AccessToken refreshAccessToken(OAuth2ProtectedResourceDetails resource,OAuth2RefreshToken refreshToken,AccessTokenRequest request) throws UserRedirectRequiredException, OAuth2AccessDeniedException {
  MultiValueMap<String,String> form=new LinkedMultiValueMap();
  form.add("String_Node_Str","String_Node_Str");
  form.add("String_Node_Str",refreshToken.getValue());
  try {
    return this.retrieveToken(request,resource,form,this.getHeadersForTokenRequest(request));
  }
 catch (  OAuth2AccessDeniedException var6) {
    throw this.getRedirectForAuthorization((AuthorizationCodeResourceDetails)resource,request);
  }
}

Fixed version (ground truth):
public OAuth2AccessToken refreshAccessToken(OAuth2ProtectedResourceDetails resource,OAuth2RefreshToken refreshToken,AccessTokenRequest request) throws UserRedirectRequiredException, OAuth2AccessDeniedException {
  MultiValueMap<String,String> form=new LinkedMultiValueMap();
  form.add("String_Node_Str","String_Node_Str");
  form.add("String_Node_Str",refreshToken.getValue());
  form.add("String_Node_Str",resource.getClientId());
  try {
    return this.retrieveToken(request,resource,form,this.getHeadersForTokenRequest(request));
  }
 catch (  OAuth2AccessDeniedException var6) {
    throw this.getRedirectForAuthorization((AuthorizationCodeResourceDetails)resource,request);
  }
}
Program: 39019
Project: 39019
Buggy source:
private MultiValueMap<String,String> getParametersForTokenRequest(AuthorizationCodeResourceDetails resource,AccessTokenRequest request){
  MultiValueMap<String,String> form=new LinkedMultiValueMap();
  form.set("String_Node_Str",resource.getClientId());
  form.set("String_Node_Str",resource.getClientSecret());
  form.set("String_Node_Str",request.getAuthorizationCode());
  form.set("String_Node_Str","String_Node_Str");
  Object preservedState=request.getPreservedState();
  if (false) {
    throw new InvalidRequestException("String_Node_Str");
  }
 else {
    String redirectUri=null;
    if (preservedState instanceof String) {
      redirectUri=String.valueOf(preservedState);
    }
 else {
      redirectUri=resource.getRedirectUri(request);
    }
    if (redirectUri != null && !"String_Node_Str".equals(redirectUri)) {
      form.set("String_Node_Str",redirectUri);
    }
    return form;
  }
}

Fixed version (ground truth):
private MultiValueMap<String,String> getParametersForTokenRequest(AuthorizationCodeResourceDetails resource,AccessTokenRequest request){
  MultiValueMap<String,String> form=new LinkedMultiValueMap();
  String state=request.getStateKey();
  form.set("String_Node_Str",resource.getClientId());
  form.set("String_Node_Str",resource.getClientSecret());
  form.set("String_Node_Str",request.getAuthorizationCode());
  form.set("String_Node_Str","String_Node_Str");
  Object preservedState=request.getPreservedState();
  if (false) {
    throw new InvalidRequestException("String_Node_Str");
  }
 else {
    String redirectUri=null;
    if (preservedState instanceof String) {
      redirectUri=String.valueOf(preservedState);
    }
 else {
      redirectUri=resource.getRedirectUri(request);
    }
    if (redirectUri != null && !"String_Node_Str".equals(redirectUri)) {
      form.set("String_Node_Str",redirectUri);
    }
    return form;
  }
}
Program: 39020
Project: 39020
Buggy source:
protected String getAccessTokenUri(OAuth2ProtectedResourceDetails resource,MultiValueMap<String,String> form){
  String accessTokenUri=resource.getAccessTokenUri();
  if (this.logger.isDebugEnabled()) {
    this.logger.debug("String_Node_Str" + accessTokenUri);
  }
  StringBuilder builder=new StringBuilder(accessTokenUri);
  if (this.getHttpMethod() == HttpMethod.GET) {
    String separator="String_Node_Str";
    if (accessTokenUri.contains("String_Node_Str")) {
      separator="String_Node_Str";
    }
    for (Iterator var6=form.keySet().iterator(); var6.hasNext(); separator="String_Node_Str") {
      String key=(String)var6.next();
      builder.append(separator);
      builder.append(key + "String_Node_Str" + key+ "String_Node_Str");
    }
  }
  return builder.toString() + "String_Node_Str";
}

Fixed version (ground truth):
protected String getAccessTokenUri(OAuth2ProtectedResourceDetails resource,MultiValueMap<String,String> form){
  String accessTokenUri=resource.getAccessTokenUri();
  if (form.containsKey("String_Node_Str"))   accessTokenUri="String_Node_Str";
  if (this.logger.isDebugEnabled()) {
    this.logger.debug("String_Node_Str" + accessTokenUri);
  }
  StringBuilder builder=new StringBuilder(accessTokenUri);
  if (this.getHttpMethod() == HttpMethod.GET) {
    String separator="String_Node_Str";
    if (accessTokenUri.contains("String_Node_Str")) {
      separator="String_Node_Str";
    }
    for (Iterator var6=form.keySet().iterator(); var6.hasNext(); separator="String_Node_Str") {
      String key=(String)var6.next();
      builder.append(separator);
      builder.append(key + "String_Node_Str" + key+ "String_Node_Str");
    }
  }
  if (form.containsKey("String_Node_Str"))   return builder.toString();
  return builder.toString() + "String_Node_Str";
}
Program: 39021
Project: 39021
Buggy source:
public boolean matches(CharSequence rawPassword,String encodedPassword){
  if (encodedPassword != null && encodedPassword.length() != 0) {
    return rawPassword.equals(encodedPassword);
  }
 else {
    return false;
  }
}

Fixed version (ground truth):
public boolean matches(CharSequence rawPassword,String encodedPassword){
  if (encodedPassword != null && encodedPassword.length() != 0) {
    return encode(rawPassword).equals(encodedPassword);
  }
 else {
    return false;
  }
}
Program: 39022
Project: 39022
Buggy source:
private static void editChatLineList(List<ChatLine> lineList,Function<Message,Boolean> toReplace,Message... replacements){
  ListIterator<ChatLine> chatLineIterator=lineList.listIterator();
  while (chatLineIterator.hasNext()) {
    ChatLine chatLine=chatLineIterator.next();
    boolean result=toReplace.apply(new Message(chatLine.getChatComponent()));
    if (!result) {
      continue;
    }
    chatLineIterator.remove();
    for (    Message message : replacements) {
      int lineId=message.getChatLineId() == -1 ? 0 : message.getChatLineId();
      ChatLine newChatLine=new ChatLine(chatLine.getUpdatedCounter(),message.getChatMessage(),lineId);
      chatLineIterator.add(newChatLine);
    }
  }
}

Fixed version (ground truth):
private static void editChatLineList(List<ChatLine> lineList,Function<Message,Boolean> toReplace,Message... replacements){
  ListIterator<ChatLine> chatLineIterator=lineList.listIterator();
  while (chatLineIterator.hasNext()) {
    ChatLine chatLine=chatLineIterator.next();
    boolean result=toReplace.apply(new Message(chatLine.getChatComponent()).setChatLineId(chatLine.getChatLineID()));
    if (!result) {
      continue;
    }
    chatLineIterator.remove();
    for (    Message message : replacements) {
      int lineId=message.getChatLineId() == -1 ? 0 : message.getChatLineId();
      ChatLine newChatLine=new ChatLine(chatLine.getUpdatedCounter(),message.getChatMessage(),lineId);
      chatLineIterator.add(newChatLine);
    }
  }
}
Program: 39023
Project: 39023
Buggy source:
/** 
 * Gets every entity loaded in the world of a certain class
 * @param clazz the class to filter for (Use {@code Java.type().class} to get this)
 * @return the entity list
 */
public static List<Entity> getAllEntitiesOfType(Class clazz){
  return getAllEntities().stream().filter(entity -> entity.getClass().equals(clazz)).collect(Collectors.toList());
}

Fixed version (ground truth):
/** 
 * Gets every entity loaded in the world of a certain class
 * @param clazz the class to filter for (Use {@code Java.type().class} to get this)
 * @return the entity list
 */
public static List<Entity> getAllEntitiesOfType(Class clazz){
  System.out.println(clazz);
  return getAllEntities().stream().filter(entity -> entity.getEntity().getClass().equals(clazz)).collect(Collectors.toList());
}
Program: 39024
Project: 39024
Buggy source:
/** 
 * Gets every entity in this chunk of a certain class
 * @param clazz the class to filter for (Use {@code Java.type().class} to get this)
 * @return the entity list
 */
public List<Entity> getAllEntitiesOfType(Class clazz){
  return getAllEntities().stream().filter(entity -> entity.getClass().equals(clazz)).collect(Collectors.toList());
}

Fixed version (ground truth):
/** 
 * Gets every entity in this chunk of a certain class
 * @param clazz the class to filter for (Use {@code Java.type().class} to get this)
 * @return the entity list
 */
public List<Entity> getAllEntitiesOfType(Class clazz){
  return getAllEntities().stream().filter(entity -> entity.getEntity().getClass().equals(clazz)).collect(Collectors.toList());
}