nus-yam/ex-repair huggingface dataset:
Program: 134371
Project: 134371
Buggy source:
static public String buildWhereClauseFromPost(String sql,JsonObject jsonCheckFilters,List<String> sqlParams){
  HashMap<String,List<String>> checkFilterDBMap=RESTUtil.createAdminFilterMap();
  for (  String jsonField : checkFilterDBMap.keySet()) {
    if (!"String_Node_Str".equals(RESTUtil.checkField(jsonField,jsonCheckFilters,false,false,"String_Node_Str") + "String_Node_Str")) {
      if (sqlParams.isEmpty()) {
        sql+="String_Node_Str";
      }
 else {
        sql+="String_Node_Str";
      }
      boolean openParen=false;
      for (int i=0; i < jsonCheckFilters.getJsonArray(jsonField).size(); i++) {
        if (i == 0) {
          sql+="String_Node_Str";
          openParen=true;
        }
 else {
          sql+="String_Node_Str";
        }
        for (int j=0; j < checkFilterDBMap.get(jsonField).size(); j++) {
          if (j > 0) {
            sql+="String_Node_Str";
          }
          sql+="String_Node_Str" + checkFilterDBMap.get(jsonField).get(j) + "String_Node_Str";
          sqlParams.add(jsonCheckFilters.getJsonArray(jsonField).getString(i));
        }
      }
      if (openParen) {
        sql+="String_Node_Str";
      }
    }
  }
  return sql;
}

Fixed version (ground truth):
static public String buildWhereClauseFromPost(String sql,JsonObject jsonCheckFilters,List<String> sqlParams){
  HashMap<String,List<String>> checkFilterDBMap=RESTUtil.createAdminFilterMap();
  for (  String jsonField : checkFilterDBMap.keySet()) {
    JsonArray fieldArray=null;
    if (!jsonCheckFilters.containsKey(jsonField) || jsonCheckFilters.isNull(jsonField)) {
      continue;
    }
 else     if (jsonCheckFilters.get(jsonField).getValueType().equals(ValueType.STRING)) {
      if ("String_Node_Str".equals(jsonCheckFilters.getString(jsonField))) {
        continue;
      }
      fieldArray=Json.createArrayBuilder().add(jsonCheckFilters.getString(jsonField)).build();
    }
 else     if (jsonCheckFilters.get(jsonField).getValueType().equals(ValueType.ARRAY)) {
      fieldArray=jsonCheckFilters.getJsonArray(jsonField);
    }
 else {
      throw new RuntimeException("String_Node_Str" + jsonField + "String_Node_Str"+ jsonCheckFilters.get(jsonField).getValueType());
    }
    if (sqlParams.isEmpty()) {
      sql+="String_Node_Str";
    }
 else {
      sql+="String_Node_Str";
    }
    boolean openParen=false;
    for (int i=0; i < fieldArray.size(); i++) {
      if (i == 0) {
        sql+="String_Node_Str";
        openParen=true;
      }
 else {
        sql+="String_Node_Str";
      }
      for (int j=0; j < checkFilterDBMap.get(jsonField).size(); j++) {
        if (j > 0) {
          sql+="String_Node_Str";
        }
        sql+="String_Node_Str" + checkFilterDBMap.get(jsonField).get(j) + "String_Node_Str";
        sqlParams.add(fieldArray.getString(i));
      }
    }
    if (openParen) {
      sql+="String_Node_Str";
    }
  }
  return sql;
}
Program: 134374
Project: 134374
Buggy source:
/** 
 * Generates a logging event automatically prefixed with the module name and with fields specified in the provided HashMap. It also sets the time  with the current time (in nanoseconds).
 * @param event the name of the event to occur.
 * @param entryFieldMap a HashMap with additional fields not defined by the other arguments. The HashMap key and value correspond  the key and value in the NetLogger field. If a field is  used frequently it is recommended that this class be  sub-classed as opposed to passing a HashMap.
 * @return a LogMessage from the NetLogger API that can be passed to a logging library.
 */
public LogMessage getMsg(String event,HashMap<String,String> entryFieldMap){
  LogMessage logMsg=new LogMessage(this.moduleName + "String_Node_Str" + event);
  for (  String field : fieldMap.keySet()) {
    if (fieldMap.get(field) != null) {
      this.addField(field,fieldMap.get(field),logMsg);
    }
  }
  for (  String field : entryFieldMap.keySet()) {
    if (entryFieldMap.get(field) != null) {
      this.addField(field,entryFieldMap.get(field),logMsg);
    }
  }
  logMsg.setTimeStampNanos(System.nanoTime());
  return logMsg;
}

Fixed version (ground truth):
/** 
 * Generates a logging event automatically prefixed with the module name and with fields specified in the provided HashMap. It also sets the time  with the current time (in nanoseconds).
 * @param event the name of the event to occur.
 * @param entryFieldMap a HashMap with additional fields not defined by the other arguments. The HashMap key and value correspond  the key and value in the NetLogger field. If a field is  used frequently it is recommended that this class be  sub-classed as opposed to passing a HashMap.
 * @return a LogMessage from the NetLogger API that can be passed to a logging library.
 */
public LogMessage getMsg(String event,HashMap<String,String> entryFieldMap){
  LogMessage logMsg=new LogMessage(event);
  for (  String field : fieldMap.keySet()) {
    if (fieldMap.get(field) != null) {
      this.addField(field,fieldMap.get(field),logMsg);
    }
  }
  for (  String field : entryFieldMap.keySet()) {
    if (entryFieldMap.get(field) != null) {
      this.addField(field,entryFieldMap.get(field),logMsg);
    }
  }
  logMsg.setTimeStampNanos(System.nanoTime());
  return logMsg;
}
Program: 134377
Project: 134377
Buggy source:
@Override public void onResponse(ImageLoader.ImageContainer response,boolean isImmediate){
  if (response.getBitmap() == null) {
    AppLog.w(T.UTILS,"String_Node_Str");
  }
  TextView view=getView();
  if (view == null) {
    AppLog.w(T.UTILS,"String_Node_Str");
    return;
  }
  int maxWidth=view.getWidth() - view.getPaddingLeft() - view.getPaddingRight();
  if (mMaxSize > 0 && (maxWidth > mMaxSize || maxWidth == 0)) {
    maxWidth=mMaxSize;
  }
  Drawable drawable=new BitmapDrawable(view.getContext().getResources(),response.getBitmap());
  remote.setRemoteDrawable(drawable,maxWidth);
  if (!isImmediate) {
    view.setText(view.getText());
  }
}

Fixed version (ground truth):
@Override public void onResponse(ImageLoader.ImageContainer response,boolean isImmediate){
  if (response.getBitmap() == null) {
    AppLog.w(T.UTILS,"String_Node_Str");
  }
  TextView view=getView();
  if (view == null) {
    AppLog.w(T.UTILS,"String_Node_Str");
    return;
  }
  int maxWidth=view.getWidth() - ViewCompat.getPaddingStart(view) - ViewCompat.getPaddingEnd(view);
  if (mMaxSize > 0 && (maxWidth > mMaxSize || maxWidth == 0)) {
    maxWidth=mMaxSize;
  }
  Drawable drawable=new BitmapDrawable(view.getContext().getResources(),response.getBitmap());
  remote.setRemoteDrawable(drawable,maxWidth);
  if (!isImmediate) {
    view.setText(view.getText());
  }
}
Program: 134378
Project: 134378
Buggy source:
@Override public Drawable getDrawable(String source){
  if (mImageLoader == null || mLoadingDrawable == null || mFailedDrawable == null) {
    throw new RuntimeException("String_Node_Str");
  }
  if (TextUtils.isEmpty(source)) {
    return null;
  }
  if (source.startsWith("String_Node_Str")) {
    source="String_Node_Str" + source;
  }
  if (mMaxSize > 0) {
    source=PhotonUtils.getPhotonImageUrl(source,mMaxSize,0);
  }
  final RemoteDrawable remote=new RemoteDrawable(mLoadingDrawable,mFailedDrawable);
  mImageLoader.get(source,new ImageLoader.ImageListener(){
    @Override public void onErrorResponse(    VolleyError error){
      remote.displayFailed();
      TextView view=getView();
      if (view != null) {
        view.invalidate();
      }
    }
    @Override public void onResponse(    ImageLoader.ImageContainer response,    boolean isImmediate){
      if (response.getBitmap() == null) {
        AppLog.w(T.UTILS,"String_Node_Str");
      }
      TextView view=getView();
      if (view == null) {
        AppLog.w(T.UTILS,"String_Node_Str");
        return;
      }
      int maxWidth=view.getWidth() - view.getPaddingLeft() - view.getPaddingRight();
      if (mMaxSize > 0 && (maxWidth > mMaxSize || maxWidth == 0)) {
        maxWidth=mMaxSize;
      }
      Drawable drawable=new BitmapDrawable(view.getContext().getResources(),response.getBitmap());
      remote.setRemoteDrawable(drawable,maxWidth);
      if (!isImmediate) {
        view.setText(view.getText());
      }
    }
  }
);
  return remote;
}

Fixed version (ground truth):
@Override public Drawable getDrawable(String source){
  if (mImageLoader == null || mLoadingDrawable == null || mFailedDrawable == null) {
    throw new RuntimeException("String_Node_Str");
  }
  if (TextUtils.isEmpty(source)) {
    return null;
  }
  if (source.startsWith("String_Node_Str")) {
    source="String_Node_Str" + source;
  }
  if (mMaxSize > 0) {
    source=PhotonUtils.getPhotonImageUrl(source,mMaxSize,0);
  }
  final RemoteDrawable remote=new RemoteDrawable(mLoadingDrawable,mFailedDrawable);
  mImageLoader.get(source,new ImageLoader.ImageListener(){
    @Override public void onErrorResponse(    VolleyError error){
      remote.displayFailed();
      TextView view=getView();
      if (view != null) {
        view.invalidate();
      }
    }
    @Override public void onResponse(    ImageLoader.ImageContainer response,    boolean isImmediate){
      if (response.getBitmap() == null) {
        AppLog.w(T.UTILS,"String_Node_Str");
      }
      TextView view=getView();
      if (view == null) {
        AppLog.w(T.UTILS,"String_Node_Str");
        return;
      }
      int maxWidth=view.getWidth() - ViewCompat.getPaddingStart(view) - ViewCompat.getPaddingEnd(view);
      if (mMaxSize > 0 && (maxWidth > mMaxSize || maxWidth == 0)) {
        maxWidth=mMaxSize;
      }
      Drawable drawable=new BitmapDrawable(view.getContext().getResources(),response.getBitmap());
      remote.setRemoteDrawable(drawable,maxWidth);
      if (!isImmediate) {
        view.setText(view.getText());
      }
    }
  }
);
  return remote;
}
Program: 134381
Project: 134381
Buggy source:
public static boolean isSpreadsheet(String url){
  if (url == null) {
    return false;
  }
  url=url.toLowerCase();
  return url.endsWith("String_Node_Str") || url.endsWith("String_Node_Str");
}

Fixed version (ground truth):
public static boolean isSpreadsheet(String url){
  if (url == null) {
    return false;
  }
  url=url.toLowerCase(Locale.ROOT);
  return url.endsWith("String_Node_Str") || url.endsWith("String_Node_Str");
}
Program: 134382
Project: 134382
Buggy source:
public static boolean isPowerpoint(String url){
  if (url == null) {
    return false;
  }
  url=url.toLowerCase();
  return url.endsWith("String_Node_Str") || url.endsWith("String_Node_Str") || url.endsWith("String_Node_Str")|| url.endsWith("String_Node_Str")|| url.endsWith("String_Node_Str");
}

Fixed version (ground truth):
public static boolean isPowerpoint(String url){
  if (url == null) {
    return false;
  }
  url=url.toLowerCase(Locale.ROOT);
  return url.endsWith("String_Node_Str") || url.endsWith("String_Node_Str") || url.endsWith("String_Node_Str")|| url.endsWith("String_Node_Str")|| url.endsWith("String_Node_Str");
}
Program: 134383
Project: 134383
Buggy source:
public static String getMediaFileName(File mediaFile,String mimeType){
  String originalFileName=mediaFile.getName().toLowerCase();
  String extension=MimeTypeMap.getFileExtensionFromUrl(originalFileName);
  if (!TextUtils.isEmpty(extension))   return originalFileName;
  if (!TextUtils.isEmpty(mimeType)) {
    String fileExtension=getExtensionForMimeType(mimeType);
    if (!TextUtils.isEmpty(fileExtension)) {
      originalFileName+="String_Node_Str" + fileExtension;
    }
  }
 else {
    AppLog.e(AppLog.T.API,"String_Node_Str" + mediaFile.getPath());
  }
  return originalFileName;
}

Fixed version (ground truth):
public static String getMediaFileName(File mediaFile,String mimeType){
  String originalFileName=mediaFile.getName().toLowerCase(Locale.ROOT);
  String extension=MimeTypeMap.getFileExtensionFromUrl(originalFileName);
  if (!TextUtils.isEmpty(extension))   return originalFileName;
  if (!TextUtils.isEmpty(mimeType)) {
    String fileExtension=getExtensionForMimeType(mimeType);
    if (!TextUtils.isEmpty(fileExtension)) {
      originalFileName+="String_Node_Str" + fileExtension;
    }
  }
 else {
    AppLog.e(AppLog.T.API,"String_Node_Str" + mediaFile.getPath());
  }
  return originalFileName;
}
Program: 134384
Project: 134384
Buggy source:
public static String getExtensionForMimeType(String mimeType){
  if (TextUtils.isEmpty(mimeType))   return "String_Node_Str";
  MimeTypeMap mimeTypeMap=MimeTypeMap.getSingleton();
  String fileExtensionFromMimeType=mimeTypeMap.getExtensionFromMimeType(mimeType);
  if (TextUtils.isEmpty(fileExtensionFromMimeType)) {
    String[] split=mimeType.split("String_Node_Str");
    fileExtensionFromMimeType=split.length > 1 ? split[1] : split[0];
  }
  return fileExtensionFromMimeType.toLowerCase();
}

Fixed version (ground truth):
public static String getExtensionForMimeType(String mimeType){
  if (TextUtils.isEmpty(mimeType))   return "String_Node_Str";
  MimeTypeMap mimeTypeMap=MimeTypeMap.getSingleton();
  String fileExtensionFromMimeType=mimeTypeMap.getExtensionFromMimeType(mimeType);
  if (TextUtils.isEmpty(fileExtensionFromMimeType)) {
    String[] split=mimeType.split("String_Node_Str");
    fileExtensionFromMimeType=split.length > 1 ? split[1] : split[0];
  }
  return fileExtensionFromMimeType.toLowerCase(Locale.ROOT);
}
Program: 134386
Project: 134386
Buggy source:
public static boolean isVideo(String url){
  if (url == null) {
    return false;
  }
  url=url.toLowerCase();
  return url.endsWith("String_Node_Str") || url.endsWith("String_Node_Str") || url.endsWith("String_Node_Str")|| url.endsWith("String_Node_Str")|| url.endsWith("String_Node_Str")|| url.endsWith("String_Node_Str")|| url.endsWith("String_Node_Str")|| url.endsWith("String_Node_Str")|| url.endsWith("String_Node_Str")|| url.contains("String_Node_Str");
}

Fixed version (ground truth):
public static boolean isVideo(String url){
  if (url == null) {
    return false;
  }
  url=url.toLowerCase(Locale.ROOT);
  return url.endsWith("String_Node_Str") || url.endsWith("String_Node_Str") || url.endsWith("String_Node_Str")|| url.endsWith("String_Node_Str")|| url.endsWith("String_Node_Str")|| url.endsWith("String_Node_Str")|| url.endsWith("String_Node_Str")|| url.endsWith("String_Node_Str")|| url.endsWith("String_Node_Str")|| url.contains("String_Node_Str");
}
Program: 134387
Project: 134387
Buggy source:
public static boolean isDocument(String url){
  if (url == null) {
    return false;
  }
  url=url.toLowerCase();
  return url.endsWith("String_Node_Str") || url.endsWith("String_Node_Str") || url.endsWith("String_Node_Str")|| url.endsWith("String_Node_Str");
}

Fixed version (ground truth):
public static boolean isDocument(String url){
  if (url == null) {
    return false;
  }
  url=url.toLowerCase(Locale.ROOT);
  return url.endsWith("String_Node_Str") || url.endsWith("String_Node_Str") || url.endsWith("String_Node_Str")|| url.endsWith("String_Node_Str");
}
Program: 134388
Project: 134388
Buggy source:
public static boolean isValidImage(String url){
  if (url == null) {
    return false;
  }
  url=url.toLowerCase();
  return url.endsWith("String_Node_Str") || url.endsWith("String_Node_Str") || url.endsWith("String_Node_Str")|| url.endsWith("String_Node_Str");
}

Fixed version (ground truth):
public static boolean isValidImage(String url){
  if (url == null) {
    return false;
  }
  url=url.toLowerCase(Locale.ROOT);
  return url.endsWith("String_Node_Str") || url.endsWith("String_Node_Str") || url.endsWith("String_Node_Str")|| url.endsWith("String_Node_Str");
}
Program: 134389
Project: 134389
Buggy source:
public static boolean isAudio(String url){
  if (url == null) {
    return false;
  }
  url=url.toLowerCase();
  return url.endsWith("String_Node_Str") || url.endsWith("String_Node_Str") || url.endsWith("String_Node_Str")|| url.endsWith("String_Node_Str")|| url.endsWith("String_Node_Str")|| url.endsWith("String_Node_Str")|| url.endsWith("String_Node_Str")|| url.endsWith("String_Node_Str");
}

Fixed version (ground truth):
public static boolean isAudio(String url){
  if (url == null) {
    return false;
  }
  url=url.toLowerCase(Locale.ROOT);
  return url.endsWith("String_Node_Str") || url.endsWith("String_Node_Str") || url.endsWith("String_Node_Str")|| url.endsWith("String_Node_Str")|| url.endsWith("String_Node_Str")|| url.endsWith("String_Node_Str")|| url.endsWith("String_Node_Str")|| url.endsWith("String_Node_Str");
}
Program: 134390
Project: 134390
Buggy source:
public static boolean isImageUrl(String url){
  if (TextUtils.isEmpty(url))   return false;
  String cleanedUrl=removeQuery(url.toLowerCase());
  return cleanedUrl.endsWith("String_Node_Str") || cleanedUrl.endsWith("String_Node_Str") || cleanedUrl.endsWith("String_Node_Str")|| cleanedUrl.endsWith("String_Node_Str");
}

Fixed version (ground truth):
public static boolean isImageUrl(String url){
  if (TextUtils.isEmpty(url)) {
    return false;
  }
  String cleanedUrl=removeQuery(url.toLowerCase(Locale.ROOT));
  return cleanedUrl.endsWith("String_Node_Str") || cleanedUrl.endsWith("String_Node_Str") || cleanedUrl.endsWith("String_Node_Str")|| cleanedUrl.endsWith("String_Node_Str");
}
Program: 134391
Project: 134391
Buggy source:
public static String removeXmlrpcSuffix(String siteAddress){
  if (siteAddress.toLowerCase().endsWith("String_Node_Str")) {
    return siteAddress.substring(0,siteAddress.lastIndexOf("String_Node_Str"));
  }
 else {
    return siteAddress;
  }
}

Fixed version (ground truth):
public static String removeXmlrpcSuffix(String siteAddress){
  if (siteAddress.toLowerCase(Locale.ROOT).endsWith("String_Node_Str")) {
    return siteAddress.substring(0,siteAddress.lastIndexOf("String_Node_Str"));
  }
 else {
    return siteAddress;
  }
}
Program: 134392
Project: 134392
Buggy source:
public static boolean isHttps(URI uri){
  if (uri == null)   return false;
  String protocol=uri.getScheme();
  return protocol != null && protocol.equals("String_Node_Str");
}

Fixed version (ground truth):
public static boolean isHttps(URI uri){
  if (uri == null) {
    return false;
  }
  String protocol=uri.getScheme();
  return protocol != null && protocol.equals("String_Node_Str");
}
Program: 134393
Project: 134393
Buggy source:
/** 
 * Convert IDN names to punycode if necessary
 */
public static String convertUrlToPunycodeIfNeeded(String url){
  if (!Charset.forName("String_Node_Str").newEncoder().canEncode(url)) {
    if (url.toLowerCase().startsWith("String_Node_Str")) {
      url="String_Node_Str" + IDN.toASCII(url.substring(7),IDN.ALLOW_UNASSIGNED);
    }
 else     if (url.toLowerCase().startsWith("String_Node_Str")) {
      url="String_Node_Str" + IDN.toASCII(url.substring(8),IDN.ALLOW_UNASSIGNED);
    }
 else {
      url=IDN.toASCII(url,IDN.ALLOW_UNASSIGNED);
    }
  }
  return url;
}

Fixed version (ground truth):
/** 
 * Convert IDN names to punycode if necessary
 */
public static String convertUrlToPunycodeIfNeeded(String url){
  if (!Charset.forName("String_Node_Str").newEncoder().canEncode(url)) {
    if (url.toLowerCase(Locale.ROOT).startsWith("String_Node_Str")) {
      url="String_Node_Str" + IDN.toASCII(url.substring(7),IDN.ALLOW_UNASSIGNED);
    }
 else     if (url.toLowerCase(Locale.ROOT).startsWith("String_Node_Str")) {
      url="String_Node_Str" + IDN.toASCII(url.substring(8),IDN.ALLOW_UNASSIGNED);
    }
 else {
      url=IDN.toASCII(url,IDN.ALLOW_UNASSIGNED);
    }
  }
  return url;
}
Program: 134395
Project: 134395
Buggy source:
/** 
 * Used to convert a language code ([lc]_[rc] where lc is language code (en, fr, es, etc...) and rc is region code (zh-CN, zh-HK, zh-TW, etc...) to a displayable string with the languages name. <p/> The input string must be between 2 and 6 characters, inclusive. An empty string is returned if that is not the case. <p/> If the input string is recognized by   {@link Locale} the result of this method is the given
 * @return non-null
 */
public static String getLanguageString(String languagueCode,Locale displayLocale){
  if (languagueCode == null || languagueCode.length() < 2 || languagueCode.length() > 6) {
    return "String_Node_Str";
  }
  Locale languageLocale=new Locale(languagueCode.substring(0,2));
  return languageLocale.getDisplayLanguage(displayLocale) + languagueCode.substring(2);
}

Fixed version (ground truth):
/** 
 * Used to convert a language code ([lc]_[rc] where lc is language code (en, fr, es, etc...) and rc is region code (zh-CN, zh-HK, zh-TW, etc...) to a displayable string with the languages name. The input string must be between 2 and 6 characters, inclusive. An empty string is returned if that is not the case. If the input string is recognized by   {@link Locale} the result of this method is the given
 * @return non-null
 */
public static String getLanguageString(String languagueCode,Locale displayLocale){
  if (languagueCode == null || languagueCode.length() < 2 || languagueCode.length() > 6) {
    return "String_Node_Str";
  }
  Locale languageLocale=new Locale(languagueCode.substring(0,2));
  return languageLocale.getDisplayLanguage(displayLocale) + languagueCode.substring(2);
}
Program: 134397
Project: 134397
Buggy source:
public WPImageGetter(TextView view,int maxSize,ImageLoader imageLoader,Drawable loadingDrawable,Drawable failedDrawable){
  mWeakView=new WeakReference<>(view);
  mMaxSize=maxSize;
  mImageLoader=imageLoader;
  mLoadingDrawable=loadingDrawable;
  mFailedDrawable=failedDrawable;
}

Fixed version (ground truth):
public WPImageGetter(TextView view,int maxSize,ImageLoader imageLoader,Drawable loadingDrawable,Drawable failedDrawable){
  mWeakView=new WeakReference<TextView>(view);
  mMaxSize=maxSize;
  mImageLoader=imageLoader;
  mLoadingDrawable=loadingDrawable;
  mFailedDrawable=failedDrawable;
}
Program: 134399
Project: 134399
Buggy source:
public WPImageGetter(TextView view,int maxSize,ImageLoader imageLoader,Drawable loadingDrawable,Drawable failedDrawable){
  mWeakView=new WeakReference<>(view);
  mMaxSize=maxSize;
  mImageLoader=imageLoader;
  mLoadingDrawable=loadingDrawable;
  mFailedDrawable=failedDrawable;
}

Fixed version (ground truth):
public WPImageGetter(TextView view,int maxSize,ImageLoader imageLoader,Drawable loadingDrawable,Drawable failedDrawable){
  mWeakView=new WeakReference<TextView>(view);
  mMaxSize=maxSize;
  mImageLoader=imageLoader;
  mLoadingDrawable=loadingDrawable;
  mFailedDrawable=failedDrawable;
}
Program: 134401
Project: 134401
Buggy source:
public WPImageGetter(TextView view,int maxSize,ImageLoader imageLoader,Drawable loadingDrawable,Drawable failedDrawable){
  mWeakView=new WeakReference<>(view);
  mMaxSize=maxSize;
  mImageLoader=imageLoader;
  mLoadingDrawable=loadingDrawable;
  mFailedDrawable=failedDrawable;
}

Fixed version (ground truth):
public WPImageGetter(TextView view,int maxSize,ImageLoader imageLoader,Drawable loadingDrawable,Drawable failedDrawable){
  mWeakView=new WeakReference<TextView>(view);
  mMaxSize=maxSize;
  mImageLoader=imageLoader;
  mLoadingDrawable=loadingDrawable;
  mFailedDrawable=failedDrawable;
}
Program: 134403
Project: 134403
Buggy source:
public WPImageGetter(TextView view,int maxSize,ImageLoader imageLoader,Drawable loadingDrawable,Drawable failedDrawable){
  mWeakView=new WeakReference<>(view);
  mMaxSize=maxSize;
  mImageLoader=imageLoader;
  mLoadingDrawable=loadingDrawable;
  mFailedDrawable=failedDrawable;
}

Fixed version (ground truth):
public WPImageGetter(TextView view,int maxSize,ImageLoader imageLoader,Drawable loadingDrawable,Drawable failedDrawable){
  mWeakView=new WeakReference<TextView>(view);
  mMaxSize=maxSize;
  mImageLoader=imageLoader;
  mLoadingDrawable=loadingDrawable;
  mFailedDrawable=failedDrawable;
}
Program: 134405
Project: 134405
Buggy source:
public WPImageGetter(TextView view,int maxSize,ImageLoader imageLoader,Drawable loadingDrawable,Drawable failedDrawable){
  mWeakView=new WeakReference<TextView>(view);
  mMaxSize=maxSize;
  mImageLoader=imageLoader;
  mLoadingDrawable=loadingDrawable;
  mFailedDrawable=failedDrawable;
}

Fixed version (ground truth):
public WPImageGetter(TextView view,int maxSize,ImageLoader imageLoader,Drawable loadingDrawable,Drawable failedDrawable){
  mWeakView=new WeakReference<>(view);
  mMaxSize=maxSize;
  mImageLoader=imageLoader;
  mLoadingDrawable=loadingDrawable;
  mFailedDrawable=failedDrawable;
}
Program: 134407
Project: 134407
Buggy source:
public WPImageGetter(TextView view,int maxSize,ImageLoader imageLoader,Drawable loadingDrawable,Drawable failedDrawable){
  mWeakView=new WeakReference<TextView>(view);
  mMaxSize=maxSize;
  mImageLoader=imageLoader;
  mLoadingDrawable=loadingDrawable;
  mFailedDrawable=failedDrawable;
}

Fixed version (ground truth):
public WPImageGetter(TextView view,int maxSize,ImageLoader imageLoader,Drawable loadingDrawable,Drawable failedDrawable){
  mWeakView=new WeakReference<>(view);
  mMaxSize=maxSize;
  mImageLoader=imageLoader;
  mLoadingDrawable=loadingDrawable;
  mFailedDrawable=failedDrawable;
}
Program: 134409
Project: 134409
Buggy source:
public WPImageGetter(TextView view,int maxSize,ImageLoader imageLoader,Drawable loadingDrawable,Drawable failedDrawable){
  mWeakView=new WeakReference<TextView>(view);
  mMaxSize=maxSize;
  mImageLoader=imageLoader;
  mLoadingDrawable=loadingDrawable;
  mFailedDrawable=failedDrawable;
}

Fixed version (ground truth):
public WPImageGetter(TextView view,int maxSize,ImageLoader imageLoader,Drawable loadingDrawable,Drawable failedDrawable){
  mWeakView=new WeakReference<>(view);
  mMaxSize=maxSize;
  mImageLoader=imageLoader;
  mLoadingDrawable=loadingDrawable;
  mFailedDrawable=failedDrawable;
}
Program: 134411
Project: 134411
Buggy source:
public WPImageGetter(TextView view,int maxSize,ImageLoader imageLoader,Drawable loadingDrawable,Drawable failedDrawable){
  mWeakView=new WeakReference<TextView>(view);
  mMaxSize=maxSize;
  mImageLoader=imageLoader;
  mLoadingDrawable=loadingDrawable;
  mFailedDrawable=failedDrawable;
}

Fixed version (ground truth):
public WPImageGetter(TextView view,int maxSize,ImageLoader imageLoader,Drawable loadingDrawable,Drawable failedDrawable){
  mWeakView=new WeakReference<>(view);
  mMaxSize=maxSize;
  mImageLoader=imageLoader;
  mLoadingDrawable=loadingDrawable;
  mFailedDrawable=failedDrawable;
}
Program: 134412
Project: 134412
Buggy source:
/** 
 * returns true if airplane mode has been enabled
 */
public static boolean isAirplaneModeOn(Context context){
  if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1) {
    return Settings.System.getInt(context.getContentResolver(),Settings.System.AIRPLANE_MODE_ON,0) != 0;
  }
 else {
    return Settings.Global.getInt(context.getContentResolver(),Settings.Global.AIRPLANE_MODE_ON,0) != 0;
  }
}

Fixed version (ground truth):
/** 
 * returns true if airplane mode has been enabled
 */
@TargetApi(VERSION_CODES.JELLY_BEAN_MR1) @SuppressWarnings("String_Node_Str") public static boolean isAirplaneModeOn(Context context){
  if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1) {
    return Settings.System.getInt(context.getContentResolver(),Settings.System.AIRPLANE_MODE_ON,0) != 0;
  }
 else {
    return Settings.Global.getInt(context.getContentResolver(),Settings.Global.AIRPLANE_MODE_ON,0) != 0;
  }
}
Program: 134413
Project: 134413
Buggy source:
/** 
 * returns true if airplane mode has been enabled
 */
public static boolean isAirplaneModeOn(Context context){
  if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1) {
    return Settings.System.getInt(context.getContentResolver(),Settings.System.AIRPLANE_MODE_ON,0) != 0;
  }
 else {
    return Settings.Global.getInt(context.getContentResolver(),Settings.Global.AIRPLANE_MODE_ON,0) != 0;
  }
}

Fixed version (ground truth):
/** 
 * returns true if airplane mode has been enabled
 */
@TargetApi(VERSION_CODES.JELLY_BEAN_MR1) @SuppressWarnings("String_Node_Str") public static boolean isAirplaneModeOn(Context context){
  if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1) {
    return Settings.System.getInt(context.getContentResolver(),Settings.System.AIRPLANE_MODE_ON,0) != 0;
  }
 else {
    return Settings.Global.getInt(context.getContentResolver(),Settings.Global.AIRPLANE_MODE_ON,0) != 0;
  }
}
Program: 134414
Project: 134414
Buggy source:
/** 
 * returns true if airplane mode has been enabled
 */
public static boolean isAirplaneModeOn(Context context){
  if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1) {
    return Settings.System.getInt(context.getContentResolver(),Settings.System.AIRPLANE_MODE_ON,0) != 0;
  }
 else {
    return Settings.Global.getInt(context.getContentResolver(),Settings.Global.AIRPLANE_MODE_ON,0) != 0;
  }
}

Fixed version (ground truth):
/** 
 * returns true if airplane mode has been enabled
 */
@TargetApi(VERSION_CODES.JELLY_BEAN_MR1) @SuppressWarnings("String_Node_Str") public static boolean isAirplaneModeOn(Context context){
  if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1) {
    return Settings.System.getInt(context.getContentResolver(),Settings.System.AIRPLANE_MODE_ON,0) != 0;
  }
 else {
    return Settings.Global.getInt(context.getContentResolver(),Settings.Global.AIRPLANE_MODE_ON,0) != 0;
  }
}
Program: 134415
Project: 134415
Buggy source:
/** 
 * returns true if airplane mode has been enabled
 */
public static boolean isAirplaneModeOn(Context context){
  if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1) {
    return Settings.System.getInt(context.getContentResolver(),Settings.System.AIRPLANE_MODE_ON,0) != 0;
  }
 else {
    return Settings.Global.getInt(context.getContentResolver(),Settings.Global.AIRPLANE_MODE_ON,0) != 0;
  }
}

Fixed version (ground truth):
/** 
 * returns true if airplane mode has been enabled
 */
@TargetApi(VERSION_CODES.JELLY_BEAN_MR1) @SuppressWarnings("String_Node_Str") public static boolean isAirplaneModeOn(Context context){
  if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN_MR1) {
    return Settings.System.getInt(context.getContentResolver(),Settings.System.AIRPLANE_MODE_ON,0) != 0;
  }
 else {
    return Settings.Global.getInt(context.getContentResolver(),Settings.Global.AIRPLANE_MODE_ON,0) != 0;
  }
}
Program: 134416
Project: 134416
Buggy source:
/** 
 * This constructor should present when an instance of the class is going to be got from the given browser window or mobile context.<br/> <br/> The described piece of UI is inside frame (it is actual for browser and mobile hybrid apps). Path to desired frame is specified by  {@link HowToGetByFrames} instance. <br/><br/> There is known root  {@link WebElement} defined {@link By} locatorstrategy
 * @param handle is the given browser window or mobile context
 * @param path is a path to frame which is specified by {@link HowToGetByFrames}
 * @param by It is  {@link By} strategy which is used to get the rootelement
 * @see Application
 * @see IHowToGetHandle
 * @see HowToGetPage
 * @see HowToGetMobileScreen
 * @see Handle
 * @see BrowserWindow
 * @see MobileScreen
 * @see HowToGetByFrames
 * @see By
 */
protected FunctionalPart(S handle){
  super(handle);
  timeOut=handle.driverEncapsulation.getTimeOut();
  long primaryTimeOut=timeOut.getImplicitlyWaitTimeOut();
  TimeUnit primaryTimeUnit=timeOut.getImplicitlyWaitTimeUnit();
  scriptExecutor=getComponent(ScriptExecutor.class);
  ime=getComponent(Ime.class);
  defaultFieldDecorator=new DefaultDecorator(handle,this,primaryTimeOut,primaryTimeUnit);
  load();
}

Fixed version (ground truth):
/** 
 * This constructor should present when an instance of the class is going to be got from the given browser window or mobile context.<br/> <br/> The described piece of UI is inside frame (it is actual for browser and mobile hybrid apps). Path to desired frame is specified by  {@link HowToGetByFrames} instance. <br/><br/> There is known root  {@link WebElement} defined {@link By} locatorstrategy
 * @param handle is the given browser window or mobile context
 * @param path is a path to frame which is specified by {@link HowToGetByFrames}
 * @param by It is  {@link By} strategy which is used to get the rootelement
 * @see Application
 * @see IHowToGetHandle
 * @see HowToGetPage
 * @see HowToGetMobileScreen
 * @see Handle
 * @see BrowserWindow
 * @see MobileScreen
 * @see HowToGetByFrames
 * @see By
 */
protected FunctionalPart(S handle){
  super(handle);
  timeOut=handle.driverEncapsulation.getTimeOut();
  long primaryTimeOut=timeOut.getImplicitlyWaitTimeOut();
  TimeUnit primaryTimeUnit=timeOut.getImplicitlyWaitTimeUnit();
  scriptExecutor=getComponent(ScriptExecutor.class);
  ime=getComponent(Ime.class);
  defaultFieldDecorator=new DefaultDecorator(handle.getSearchContext(),this,primaryTimeOut,primaryTimeUnit);
  load();
}
Program: 134417
Project: 134417
Buggy source:
/** 
 * Instantiates declared   {@link WebElement} fields using {@link PageFactory}and customized   {@link ElementLocatorFactory}
 * @param factoryis an instance of the customized  {@link ElementLocatorFactory}
 */
protected void load(ElementLocatorFactory factory){
  PageFactory.initElements(factory,this);
}

Fixed version (ground truth):
/** 
 * Instantiates declared   {@link WebElement} fields using {@link PageFactory}and customized   {@link ElementLocatorFactory}
 * @param factoryis an instance of the customized  {@link ElementLocatorFactory}
 */
protected void load(ElementLocatorFactory factory){
  PageFactory.initElements(factory,this);
  load();
}
Program: 134418
Project: 134418
Buggy source:
@Override public List<WebElement> findElements(By by){
  return driverEncapsulation.getWrappedDriver().findElements(returnBy(by));
}

Fixed version (ground truth):
@Override public List<WebElement> findElements(By by){
  return getSearchContext().findElements(by);
}
Program: 134419
Project: 134419
Buggy source:
@Override public WebElement findElement(By by){
  return driverEncapsulation.getWrappedDriver().findElement(returnBy(by));
}

Fixed version (ground truth):
@Override public WebElement findElement(By by){
  return getSearchContext().findElement(by);
}
Program: 134420
Project: 134420
Buggy source:
@Override public Object intercept(Object obj,Method method,Object[] args,MethodProxy proxy) throws Throwable {
  instantiateHandle();
  Class<?> declaringClass=method.getDeclaringClass();
  if (handle != null && !declaringClass.equals(Object.class)) {
    if (!declaringClass.equals(IDestroyable.class) && !declaringClass.equals(ISwitchesToItself.class)) {
      handle.switchToMe();
    }
    if (!declaringClass.equals(Object.class))     return method.invoke(handle,args);
  }
  return super.intercept(obj,method,args,proxy);
}

Fixed version (ground truth):
@Override public Object intercept(Object obj,Method method,Object[] args,MethodProxy proxy) throws Throwable {
  Class<?> declaringClass=method.getDeclaringClass();
  if (!classesThatDontRequireFocusOnTheHandle.contains(declaringClass)) {
    instantiateHandle();
  }
  if (handle != null && !classesThatDontRequireFocusOnTheHandle.contains(declaringClass) && !declaringClass.equals(ISwitchesToItself.class) && !declaringClass.equals(IDestroyable.class))   handle.switchToMe();
  if (!declaringClass.equals(Object.class) && handle != null)   return method.invoke(handle,args);
  return super.intercept(obj,method,args,proxy);
}
Program: 134421
Project: 134421
Buggy source:
@Override public Object invoke(Object o,Method m,Object[] args) throws Throwable {
  Class<?> declaredBy=m.getDeclaringClass();
  if (declaredBy.equals(WrapsDriver.class))   return handle.driverEncapsulation.getWrappedDriver();
  if (declaredBy.equals(HasCapabilities.class))   return ((HasCapabilities)handle.driverEncapsulation.getWrappedDriver()).getCapabilities();
  if (declaredBy.equals(WebDriver.class) || declaredBy.equals(WebElement.class) || declaredBy.equals(WrapsElement.class)|| declaredBy.equals(SearchContext.class))   handle.switchToMe();
  Object webDriverOrElement=null;
  if (declaredBy.equals(WebDriver.class))   webDriverOrElement=handle.driverEncapsulation.getWrappedDriver();
  if (declaredBy.equals(WrapsElement.class))   return handle.driverEncapsulation.getWrappedDriver().findElement(handle.by);
  if (declaredBy.equals(WebElement.class))   webDriverOrElement=handle.driverEncapsulation.getWrappedDriver().findElement(handle.by);
  if (declaredBy.equals(SearchContext.class))   return m.invoke(handle.driverEncapsulation.getWrappedDriver(),new Object[]{handle.returnBy((By)args[0])});
  if (webDriverOrElement != null)   return m.invoke(webDriverOrElement,args);
  return m.invoke(o,args);
}

Fixed version (ground truth):
@Override public Object invoke(Object o,Method m,Object[] args) throws Throwable {
  Class<?> declaredBy=m.getDeclaringClass();
  WebDriver driver=handle.driverEncapsulation.getWrappedDriver();
  if (declaredBy.equals(WrapsDriver.class))   return driver;
  if (declaredBy.equals(HasCapabilities.class))   return ((HasCapabilities)driver).getCapabilities();
  if (classesThatRequireFocusOnTheHandle.contains(declaredBy))   handle.switchToMe();
  Object webDriverOrElement=null;
  if (declaredBy.equals(WebDriver.class))   webDriverOrElement=driver;
  if (declaredBy.equals(WrapsElement.class))   return driver.findElement(handle.by);
  if (declaredBy.equals(WebElement.class))   webDriverOrElement=driver.findElement(handle.by);
  if (declaredBy.equals(SearchContext.class))   return m.invoke(driver,new Object[]{handle.returnBy((By)args[0])});
  if (webDriverOrElement != null)   return m.invoke(webDriverOrElement,args);
  return m.invoke(o,args);
}
Program: 134422
Project: 134422
Buggy source:
private IDecomposable returnPart(Class<? extends IDecomposable> target){
  Object[] args=null;
  if (isInvokerApp) {
    args=clearArgs(new Object[]{target,howToGetHandlestrategy,howToGetByFrames,timeOutLong});
  }
 else {
    args=clearArgs(new Object[]{target,howToGetByFrames});
  }
  Method method=ExecutableUtil.getRelevantMethod(invoker.getClass(),DecompositionUtil.GET_PART,args);
  try {
    return (IDecomposable)method.invoke(invoker,args);
  }
 catch (  Exception e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
private IDecomposable returnPart(Class<? extends IDecomposable> target){
  Object[] args=null;
  if (isInvokerApp) {
    args=clearArgs(new Object[]{target,howToGetHandlestrategy,timeOutLong});
  }
 else {
    args=clearArgs(new Object[]{target});
  }
  Method method=ExecutableUtil.getRelevantMethod(invoker.getClass(),DecompositionUtil.GET_PART,args);
  try {
    return (IDecomposable)method.invoke(invoker,args);
  }
 catch (  Exception e) {
    throw new RuntimeException(e);
  }
}
Program: 134423
Project: 134423
Buggy source:
private List<IDecomposable> buildList(){
  ArrayList<IDecomposable> result=new ArrayList<>();
  if (by == null) {
    IDecomposable element=returnPart(required);
    result.add(element);
    return result;
  }
  FunctionalPart<?> mediator=(FunctionalPart<?>)returnPart(FunctionalPart.class);
  int totalElements=mediator.getHandle().findElements(by).size();
  IDecomposable target=invoker;
  if (isInvokerApp)   target=mediator;
  for (int i=0; i < totalElements; i++)   result.add(target.getPart(required,howToGetByFrames,new ByNumbered(by,i)));
  return result;
}

Fixed version (ground truth):
private List<IDecomposable> buildList(){
  ArrayList<IDecomposable> result=new ArrayList<>();
  FunctionalPart<?> mediator=null;
  mediator=(FunctionalPart<?>)returnPart(FunctionalPart.class);
  int totalElements=1;
  if (by != null) {
    try {
      totalElements=mediator.getHandle().findElements(by).size();
    }
 catch (    NoSuchWindowException|NoSuchContextException e) {
      return result;
    }
  }
  IDecomposable target=invoker;
  if (isInvokerApp)   target=mediator;
  if (by == null)   result.add(target.getPart(required,howToGetByFrames));
 else   for (int i=0; i < totalElements; i++)   result.add(target.getPart(required,howToGetByFrames,new ByNumbered(by,i)));
  return result;
}
Program: 134424
Project: 134424
Buggy source:
private <T extends IDecomposable>T get(Class<T> partClass,Handle handle){
  T part=DecompositionUtil.get(partClass,new Object[]{handle});
  ((FunctionalPart<?>)part).application=this;
  addChild((ModelObject<?>)part);
  return part;
}

Fixed version (ground truth):
private <T extends IDecomposable>T get(Class<T> partClass,Handle handle){
  T part=DecompositionUtil.get(partClass,new Object[]{handle});
  ((FunctionalPart<?>)part).application=this;
  this.addChild((ModelObject<?>)part);
  DecompositionUtil.populateFieldsWhichAreDecomposable((ModelObject<?>)part);
  return part;
}
Program: 134425
Project: 134425
Buggy source:
private List<IDecomposable> buildList(){
  ArrayList<IDecomposable> result=new ArrayList<>();
  if (by == null) {
    IDecomposable element=returnPart(required);
    result.add(element);
    return result;
  }
  FunctionalPart<?> intermediate=(FunctionalPart<?>)returnPart(FunctionalPart.class);
  int totalElements=intermediate.getHandle().findElements(by).size();
  for (int i=0; i < totalElements; i++) {
    if (isInvokerApp) {
      result.add(DecompositionUtil.get(required,new Object[]{intermediate.getHandle(),howToGetByFrames,new ByNumbered(by,i)}));
    }
 else {
      result.add(DecompositionUtil.get(required,new Object[]{invoker,howToGetByFrames,new ByNumbered(by,i)}));
    }
  }
  return result;
}

Fixed version (ground truth):
private List<IDecomposable> buildList(){
  ArrayList<IDecomposable> result=new ArrayList<>();
  if (by == null) {
    IDecomposable element=returnPart(required);
    result.add(element);
    return result;
  }
  FunctionalPart<?> mediator=(FunctionalPart<?>)returnPart(FunctionalPart.class);
  int totalElements=mediator.getHandle().findElements(by).size();
  IDecomposable target=invoker;
  if (isInvokerApp)   target=mediator;
  for (int i=0; i < totalElements; i++)   result.add(target.getPart(required,howToGetByFrames,new ByNumbered(by,i)));
  return result;
}
Program: 134426
Project: 134426
Buggy source:
/** 
 * Creation of any decomposable part of application
 */
static <T extends IDecomposable>T get(Class<T> partClass,Object[] paramValues){
  try {
    Constructor<?> c=ExecutableUtil.getRelevantConstructor(partClass,paramValues);
    if (c == null) {
      throw new RuntimeException(new NoSuchMethodException("String_Node_Str" + Arrays.asList(paramValues).toString() + "String_Node_Str"+ partClass.getName()));
    }
    T decomposable=EnhancedProxyFactory.getProxy(partClass,c.getParameterTypes(),paramValues,new InteractiveInterceptor(){
    }
);
    DecompositionUtil.populateFieldsWhichAreDecomposable((ModelObject<?>)decomposable);
    return decomposable;
  }
 catch (  Exception e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
/** 
 * Creation of any decomposable part of application
 */
static <T extends IDecomposable>T get(Class<T> partClass,Object[] paramValues){
  try {
    Constructor<?> c=ExecutableUtil.getRelevantConstructor(partClass,paramValues);
    if (c == null) {
      throw new RuntimeException(new NoSuchMethodException("String_Node_Str" + Arrays.asList(paramValues).toString() + "String_Node_Str"+ partClass.getName()));
    }
    T decomposable=EnhancedProxyFactory.getProxy(partClass,c.getParameterTypes(),paramValues,new InteractiveInterceptor(){
    }
);
    return decomposable;
  }
 catch (  Exception e) {
    throw new RuntimeException(e);
  }
}
Program: 134427
Project: 134427
Buggy source:
private <T extends IDecomposable>T get(Class<T> partClass,Handle h){
  T result=DecompositionUtil.get(partClass,new Object[]{h});
  return result;
}

Fixed version (ground truth):
private <T extends IDecomposable>T get(Class<T> partClass,Handle h){
  T result=DecompositionUtil.get(partClass,new Object[]{h});
  addChild((ModelObject<?>)result);
  DecompositionUtil.populateFieldsWhichAreDecomposable((ModelObject<?>)result);
  return result;
}
Program: 134428
Project: 134428
Buggy source:
/** 
 * Sets focus on window/mobile context by string  parameter
 * @param String window handle/context name
 */
synchronized void switchTo(String handle){
  if (handle.equals(currentHandle))   changeActive(handle);
}

Fixed version (ground truth):
/** 
 * Sets focus on window/mobile context by string  parameter
 * @param String window handle/context name
 */
synchronized void switchTo(String handle){
  if (!handle.equals(currentHandle))   changeActive(handle);
}
Program: 134429
Project: 134429
Buggy source:
@Override public Object invoke(Object o,Method m,Object[] args) throws Throwable {
  WebDriver driver=handle.driverEncapsulation.getWrappedDriver();
  if (MethodInheritanceUtil.isOverriddenFrom(m,WrapsDriver.class))   return driver;
  if (MethodInheritanceUtil.isOverriddenFrom(m,HasCapabilities.class))   return ((HasCapabilities)driver).getCapabilities();
  if (MethodInheritanceUtil.isOverriddenFromAny(m,classesThatRequireFocusOnTheHandle))   handle.switchToMe();
  Object webDriverOrElement=null;
  if (MethodInheritanceUtil.isOverriddenFrom(m,WebDriver.class))   webDriverOrElement=driver;
  if (MethodInheritanceUtil.isOverriddenFrom(m,WebElement.class))   webDriverOrElement=driver.findElement(handle.by);
  if (MethodInheritanceUtil.isOverriddenFrom(m,SearchContext.class)) {
    if (o instanceof WebDriver)     return m.invoke(driver,new Object[]{(By)args[0]});
    return m.invoke(driver.findElement(handle.by),new Object[]{(By)args[0]});
  }
  if (webDriverOrElement != null)   return m.invoke(webDriverOrElement,args);
  return m.invoke(o,args);
}

Fixed version (ground truth):
@Override public Object invoke(final Object o,final Method m,Object[] args) throws Throwable {
  final WebDriver driver=handle.driverEncapsulation.getWrappedDriver();
  if (MethodInheritanceUtil.isOverriddenFrom(m,WrapsDriver.class))   return driver;
  if (MethodInheritanceUtil.isOverriddenFrom(m,HasCapabilities.class))   return ((HasCapabilities)driver).getCapabilities();
  if (MethodInheritanceUtil.isOverriddenFromAny(m,classesThatRequireFocusOnTheHandle))   handle.switchToMe();
  if (MethodInheritanceUtil.isOverriddenFrom(m,WebElement.class)) {
    final List<WebElement> elements=new ArrayList<>();
    changeTimeOutAndRun(new Runnable(){
      @Override public void run(){
        elements.addAll(driver.findElements(handle.by));
      }
    }
);
    if (elements.size() == 0)     throw new NoSuchElementException("String_Node_Str" + handle.by.toString());
    return m.invoke(elements.get(0),args);
  }
  if (MethodInheritanceUtil.isOverriddenFrom(m,SearchContext.class)) {
    final List<Object> result=new ArrayList<>();
    changeTimeOutAndRun(new Runnable(){
      @Override public void run(){
        try {
          if (o instanceof WebDriver)           result.add(m.invoke(driver,new Object[]{(By)args[0]}));
          if (o instanceof WebElement)           result.add(m.invoke(driver.findElement(handle.by),new Object[]{(By)args[0]}));
        }
 catch (        InvocationTargetException|IllegalAccessException e) {
          throw new RuntimeException(e);
        }
      }
    }
);
    return result.get(0);
  }
  if (MethodInheritanceUtil.isOverriddenFrom(m,WebDriver.class))   return m.invoke(driver,args);
  return m.invoke(o,args);
}
Program: 134430
Project: 134430
Buggy source:
/** 
 * is handle known as instance of   {@link IHasHandle} 
 */
IHasHandle isInstantiated(String handle){
  return handleObjects.get(handle);
}

Fixed version (ground truth):
/** 
 * is handle known as instance of   {@link IHasHandle} 
 */
boolean isInstantiated(String handle){
  return handleObjects.contains(handle);
}
Program: 134431
Project: 134431
Buggy source:
/** 
 * adds a new handle that is instantiated as   {@link IHasHandle} object 
 */
void addKnown(IHasHandle handleObject){
  handleObjects.put(handleObject.getHandle(),handleObject);
}

Fixed version (ground truth):
/** 
 * adds a new handle that is instantiated as   {@link IHasHandle} object 
 */
void addKnown(IHasHandle handleObject){
  if (!handleObjects.contains(handleObject.getHandle()))   handleObjects.add(handleObject.getHandle());
  List<IHasHandle> value=instantiatedHandles.get(handleObject.getHandle());
  if (value == null) {
    value=new ArrayList<>();
  }
  value.add(handleObject);
  instantiatedHandles.put(handleObject.getHandle(),value);
}
Program: 134432
Project: 134432
Buggy source:
/** 
 * gets   {@link IHasHandle} objects 
 */
List<IHasHandle> getInstantiated(){
  return new ArrayList<>(handleObjects.values());
}

Fixed version (ground truth):
public List<IHasHandle> getInstantiated(){
  final List<IHasHandle> result=new ArrayList<>();
  handleObjects.forEach(handle -> {
    result.addAll(instantiatedHandles.get(handle));
  }
);
  return result;
}