nus-yam/ex-repair huggingface dataset:
Program: 3031
Project: 3031
Buggy source:
static void notifyScreenshotError(Context context,NotificationManager nManager){
  Resources r=context.getResources();
  Notification n=new Notification.Builder(context).setTicker(r.getString(R.string.screenshot_failed_title)).setContentTitle(r.getString(R.string.screenshot_failed_title)).setContentText(r.getString(R.string.screenshot_failed_text)).setSmallIcon(R.drawable.stat_notify_image_error).setWhen(System.currentTimeMillis()).setAutoCancel(true).getNotification();
  nManager.notify(SCREENSHOT_NOTIFICATION_ID,n);
}

Fixed version (ground truth):
static void notifyScreenshotError(Context context,NotificationManager nManager){
  Resources r=context.getResources();
  Notification.Builder b=new Notification.Builder(context).setTicker(r.getString(R.string.screenshot_failed_title)).setContentTitle(r.getString(R.string.screenshot_failed_title)).setContentText(r.getString(R.string.screenshot_failed_text)).setSmallIcon(R.drawable.stat_notify_image_error).setWhen(System.currentTimeMillis()).setAutoCancel(true);
  Notification n=new Notification.BigTextStyle(b).bigText(r.getString(R.string.screenshot_failed_text)).build();
  nManager.notify(SCREENSHOT_NOTIFICATION_ID,n);
}
Program: 3033
Project: 3033
Buggy source:
private void startBlurImageDisappearAnimator(){
  if (!enableBlurBackground)   return;
  AnimatorSet set=new AnimatorSet();
  if (enableBackgroundZoom)   set.playTogether(ObjectAnimator.ofFloat(mBlurImage,"String_Node_Str",1f,0.8f),ObjectAnimator.ofFloat(mBlurImage,"String_Node_Str",mZoomRatio,1f),ObjectAnimator.ofFloat(mBlurImage,"String_Node_Str",mZoomRatio,1f));
 else   set.playTogether(ObjectAnimator.ofFloat(mBlurImage,"String_Node_Str",1f,0f));
  set.addListener(mGlobalListener);
  set.addListener(mGlobalDisappearAnimators);
  set.setDuration(mBlurDuration);
  set.start();
}

Fixed version (ground truth):
private void startBlurImageDisappearAnimator(){
  if (!enableBlurBackground || mBlurImage == null)   return;
  AnimatorSet set=new AnimatorSet();
  if (enableBackgroundZoom)   set.playTogether(ObjectAnimator.ofFloat(mBlurImage,"String_Node_Str",1f,0.8f),ObjectAnimator.ofFloat(mBlurImage,"String_Node_Str",mZoomRatio,1f),ObjectAnimator.ofFloat(mBlurImage,"String_Node_Str",mZoomRatio,1f));
 else   set.playTogether(ObjectAnimator.ofFloat(mBlurImage,"String_Node_Str",1f,0f));
  set.addListener(mGlobalListener);
  set.addListener(mGlobalDisappearAnimators);
  set.setDuration(mBlurDuration);
  set.start();
}
Program: 3034
Project: 3034
Buggy source:
private void addBlurImage(){
  Bitmap bm=Blur.apply(getContext(),Util.getViewBitmap(this),mBlurRadius);
  ImageView im=new ImageView(getContext());
  im.setImageBitmap(bm);
  mBlurImage=im;
  this.addView(im);
}

Fixed version (ground truth):
private void addBlurImage(){
  Bitmap b=Util.getViewBitmap(this);
  if (b == null)   return;
  Bitmap bm=Blur.apply(getContext(),b);
  ImageView im=new ImageView(getContext());
  im.setImageBitmap(bm);
  mBlurImage=im;
  this.addView(im);
}
Program: 3035
Project: 3035
Buggy source:
private void startBlurImageAppearAnimator(){
  if (!enableBlurBackground)   return;
  AnimatorSet set=new AnimatorSet();
  if (enableBackgroundZoom) {
    set.playTogether(ObjectAnimator.ofFloat(mBlurImage,"String_Node_Str",0.8f,1f),ObjectAnimator.ofFloat(mBlurImage,"String_Node_Str",1f,mZoomRatio),ObjectAnimator.ofFloat(mBlurImage,"String_Node_Str",1f,mZoomRatio));
  }
 else {
    set.playTogether(ObjectAnimator.ofFloat(mBlurImage,"String_Node_Str",0f,1f));
  }
  set.addListener(mGlobalListener);
  set.addListener(mGlobalAppearingAnimators);
  set.setDuration(mBlurDuration);
  set.start();
}

Fixed version (ground truth):
private void startBlurImageAppearAnimator(){
  if (!enableBlurBackground || mBlurImage == null)   return;
  AnimatorSet set=new AnimatorSet();
  if (enableBackgroundZoom) {
    set.playTogether(ObjectAnimator.ofFloat(mBlurImage,"String_Node_Str",0.8f,1f),ObjectAnimator.ofFloat(mBlurImage,"String_Node_Str",1f,mZoomRatio),ObjectAnimator.ofFloat(mBlurImage,"String_Node_Str",1f,mZoomRatio));
  }
 else {
    set.playTogether(ObjectAnimator.ofFloat(mBlurImage,"String_Node_Str",0f,1f));
  }
  set.addListener(mGlobalListener);
  set.addListener(mGlobalAppearingAnimators);
  set.setDuration(mBlurDuration);
  set.start();
}
Program: 3036
Project: 3036
Buggy source:
public static Bitmap getViewBitmap(View v){
  v.clearFocus();
  v.setPressed(false);
  boolean willNotCache=v.willNotCacheDrawing();
  v.setWillNotCacheDrawing(false);
  int color=v.getDrawingCacheBackgroundColor();
  v.setDrawingCacheBackgroundColor(0);
  if (color != 0) {
    v.destroyDrawingCache();
  }
  v.buildDrawingCache();
  Bitmap cacheBitmap=v.getDrawingCache();
  if (cacheBitmap == null) {
    return null;
  }
  Bitmap bitmap=Bitmap.createBitmap(cacheBitmap);
  v.destroyDrawingCache();
  v.setWillNotCacheDrawing(willNotCache);
  v.setDrawingCacheBackgroundColor(color);
  return bitmap;
}

Fixed version (ground truth):
public static Bitmap getViewBitmap(View v){
  if (v.getWidth() == 0 || v.getHeight() == 0)   return null;
  Bitmap b=Bitmap.createBitmap(v.getWidth(),v.getHeight(),Bitmap.Config.ARGB_8888);
  Canvas c=new Canvas(b);
  v.draw(c);
  return b;
}
Program: 3038
Project: 3038
Buggy source:
@NonNull public static String getCreateTableQuery(){
  return "String_Node_Str" + TABLE + "String_Node_Str"+ COLUMN_ID+ "String_Node_Str"+ COLUMN_AUTHOR+ "String_Node_Str"+ COLUMN_CONTENT+ "String_Node_Str"+ "String_Node_Str";
}

Fixed version (ground truth):
@NonNull public static String getCreateTableQuery(){
  return "String_Node_Str" + TABLE + "String_Node_Str"+ COLUMN_ID+ "String_Node_Str"+ COLUMN_AUTHOR+ "String_Node_Str"+ COLUMN_CONTENT+ "String_Node_Str"+ COLUMN_SOME_BYTES+ "String_Node_Str"+ "String_Node_Str";
}
Program: 3040
Project: 3040
Buggy source:
protected <T,E>T executeInternal(RequestExecutor<T,E> executor,String uri,E data) throws WxErrorException {
  String accessToken=getAccessToken(false);
  String uriWithAccessToken=uri;
  uriWithAccessToken+=uri.indexOf('?') == -1 ? "String_Node_Str" + accessToken : "String_Node_Str" + accessToken;
  try {
    return executor.execute(getHttpclient(),httpProxy,uriWithAccessToken,data);
  }
 catch (  WxErrorException e) {
    WxError error=e.getError();
    if (error.getErrorCode() == 42001 || error.getErrorCode() == 40001) {
      wxCpConfigStorage.expireAccessToken();
      return execute(executor,uri,data);
    }
    if (error.getErrorCode() != 0) {
      throw new WxErrorException(error);
    }
    return null;
  }
catch (  ClientProtocolException e) {
    throw new RuntimeException(e);
  }
catch (  IOException e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
protected <T,E>T executeInternal(RequestExecutor<T,E> executor,String uri,E data) throws WxErrorException {
  if (uri.indexOf("String_Node_Str") != -1) {
    throw new IllegalArgumentException("String_Node_Str" + uri);
  }
  String accessToken=getAccessToken(false);
  String uriWithAccessToken=uri;
  uriWithAccessToken+=uri.indexOf('?') == -1 ? "String_Node_Str" + accessToken : "String_Node_Str" + accessToken;
  try {
    return executor.execute(getHttpclient(),httpProxy,uriWithAccessToken,data);
  }
 catch (  WxErrorException e) {
    WxError error=e.getError();
    if (error.getErrorCode() == 42001 || error.getErrorCode() == 40001) {
      wxCpConfigStorage.expireAccessToken();
      return execute(executor,uri,data);
    }
    if (error.getErrorCode() != 0) {
      throw new WxErrorException(error);
    }
    return null;
  }
catch (  ClientProtocolException e) {
    throw new RuntimeException(e);
  }
catch (  IOException e) {
    throw new RuntimeException(e);
  }
}
Program: 3041
Project: 3041
Buggy source:
protected <T,E>T executeInternal(RequestExecutor<T,E> executor,String uri,E data) throws WxErrorException {
  String accessToken=getAccessToken(false);
  String uriWithAccessToken=uri;
  uriWithAccessToken+=uri.indexOf('?') == -1 ? "String_Node_Str" + accessToken : "String_Node_Str" + accessToken;
  try {
    return executor.execute(getHttpclient(),httpProxy,uriWithAccessToken,data);
  }
 catch (  WxErrorException e) {
    WxError error=e.getError();
    if (error.getErrorCode() == 42001 || error.getErrorCode() == 40001) {
      wxMpConfigStorage.expireAccessToken();
      return execute(executor,uri,data);
    }
    if (error.getErrorCode() != 0) {
      throw new WxErrorException(error);
    }
    return null;
  }
catch (  ClientProtocolException e) {
    throw new RuntimeException(e);
  }
catch (  IOException e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
protected <T,E>T executeInternal(RequestExecutor<T,E> executor,String uri,E data) throws WxErrorException {
  if (uri.indexOf("String_Node_Str") != -1) {
    throw new IllegalArgumentException("String_Node_Str" + uri);
  }
  String accessToken=getAccessToken(false);
  String uriWithAccessToken=uri;
  uriWithAccessToken+=uri.indexOf('?') == -1 ? "String_Node_Str" + accessToken : "String_Node_Str" + accessToken;
  try {
    return executor.execute(getHttpclient(),httpProxy,uriWithAccessToken,data);
  }
 catch (  WxErrorException e) {
    WxError error=e.getError();
    if (error.getErrorCode() == 42001 || error.getErrorCode() == 40001) {
      wxMpConfigStorage.expireAccessToken();
      return execute(executor,uri,data);
    }
    if (error.getErrorCode() != 0) {
      throw new WxErrorException(error);
    }
    return null;
  }
catch (  ClientProtocolException e) {
    throw new RuntimeException(e);
  }
catch (  IOException e) {
    throw new RuntimeException(e);
  }
}
Program: 3042
Project: 3042
Buggy source:
@Override public File getTmpDirFile(){
  return this.getTmpDirFile();
}

Fixed version (ground truth):
@Override public File getTmpDirFile(){
  return this.tmpDirFile;
}
Program: 3043
Project: 3043
Buggy source:
@Test(dependsOnMethods="String_Node_Str") public void testTagAddUsers() throws Exception {
  List<String> userIds=new ArrayList<String>();
  userIds.add(((ApiTestModule.WxXmlCpInMemoryConfigStorage)configStorage).getUserId());
  wxService.tagAddUsers(tagId,userIds);
}

Fixed version (ground truth):
@Test(dependsOnMethods="String_Node_Str") public void testTagAddUsers() throws Exception {
  List<String> userIds=new ArrayList<String>();
  userIds.add(((ApiTestModule.WxXmlCpInMemoryConfigStorage)configStorage).getUserId());
  wxService.tagAddUsers(tagId,userIds,null);
}
Program: 3045
Project: 3045
Buggy source:
@Test(dependsOnMethods={"String_Node_Str"},dataProvider="String_Node_Str",enabled=true) public void testUploadMedia1(String mediaType,String fileType,String fileName) throws WxErrorException, IOException {
  InputStream inputStream=ClassLoader.getSystemResourceAsStream(fileName);
  WxUploadResult res=wxService.uploadMedia(mediaType,fileType,inputStream);
  System.out.println(res.toString());
}

Fixed version (ground truth):
@Test(dependsOnMethods={"String_Node_Str"},dataProvider="String_Node_Str",enabled=true) public void testUploadMedia1(String mediaType,String fileType,String fileName) throws WxErrorException, IOException {
  InputStream inputStream=ClassLoader.getSystemResourceAsStream(fileName);
  WxUploadResult res=wxService.uploadMedia(mediaType,fileType,inputStream);
  Assert.assertNotNull(res.getType());
  Assert.assertNotNull(res.getCreated_at());
  Assert.assertTrue(res.getMedia_id() != null || res.getThumb_media_id() != null);
}
Program: 3046
Project: 3046
Buggy source:
@Test(enabled=false) public void testCheckSignature() throws WxErrorException {
  String timestamp="String_Node_Str";
  String nonce="String_Node_Str";
  String signature="String_Node_Str";
  Assert.assertTrue(wxService.checkSignature(timestamp,nonce,signature));
}

Fixed version (ground truth):
@Test(enabled=true) public void testCheckSignature() throws WxErrorException {
  String timestamp="String_Node_Str";
  String nonce="String_Node_Str";
  String signature="String_Node_Str";
  Assert.assertTrue(wxService.checkSignature(timestamp,nonce,signature));
}
Program: 3047
Project: 3047
Buggy source:
@Test(dataProvider="String_Node_Str",dependsOnMethods="String_Node_Str",enabled=false) public void testCreateMenu(WxMenu wxMenu) throws WxErrorException {
  wxService.createMenu(wxMenu);
}

Fixed version (ground truth):
@Test(dataProvider="String_Node_Str",dependsOnMethods="String_Node_Str",enabled=true) public void testCreateMenu(WxMenu wxMenu) throws WxErrorException {
  wxService.createMenu(wxMenu);
}
Program: 3048
Project: 3048
Buggy source:
@Test(dependsOnMethods={"String_Node_Str","String_Node_Str"},enabled=false) public void testDeleteMenu() throws WxErrorException {
  wxService.deleteMenu();
}

Fixed version (ground truth):
@Test(dependsOnMethods={"String_Node_Str","String_Node_Str"},enabled=true) public void testDeleteMenu() throws WxErrorException {
  wxService.deleteMenu();
}
Program: 3049
Project: 3049
Buggy source:
@Test(dependsOnMethods={"String_Node_Str","String_Node_Str"},enabled=false) public void testGetMenu() throws WxErrorException {
  Assert.assertNotNull(wxService.getMenu());
}

Fixed version (ground truth):
@Test(dependsOnMethods={"String_Node_Str","String_Node_Str"},enabled=true) public void testGetMenu() throws WxErrorException {
  Assert.assertNotNull(wxService.getMenu());
}
Program: 3050
Project: 3050
Buggy source:
@Test(dependsOnMethods="String_Node_Str",enabled=false) public void sendCustomMessage() throws WxErrorException {
  WxXmlConfigStorage configProvider=(WxXmlConfigStorage)wxService.wxConfigStorage;
  WxCustomMessage message=new WxCustomMessage();
  message.setMsgtype(WxConsts.MSG_TEXT);
  message.setTouser(configProvider.getOpenId());
  message.setContent("String_Node_Str");
  wxService.sendCustomMessage(message);
}

Fixed version (ground truth):
@Test(dependsOnMethods="String_Node_Str",enabled=true) public void sendCustomMessage() throws WxErrorException {
  WxXmlConfigStorage configProvider=(WxXmlConfigStorage)wxService.wxConfigStorage;
  WxCustomMessage message=new WxCustomMessage();
  message.setMsgtype(WxConsts.MSG_TEXT);
  message.setTouser(configProvider.getOpenId());
  message.setContent("String_Node_Str");
  wxService.sendCustomMessage(message);
}
Program: 3051
Project: 3051
Buggy source:
@Override protected void onLayout(boolean changed,int left,int top,int right,int bottom){
  super.onLayout(changed,left,top,right,bottom);
  final int width=getWidth();
  final int height=getHeight();
  radius=Math.min(width,height) * 0.5f;
  centerY=radius;
  startX=radius;
  endX=width - radius;
  spotMinX=startX + borderWidth;
  spotMaxX=endX - borderWidth;
  spotSize=height - 4 * borderWidth;
  spotX=spotMinX;
  offLineWidth=0;
}

Fixed version (ground truth):
@Override protected void onLayout(boolean changed,int left,int top,int right,int bottom){
  super.onLayout(changed,left,top,right,bottom);
  final int width=getWidth();
  final int height=getHeight();
  radius=Math.min(width,height) * 0.5f;
  centerY=radius;
  startX=radius;
  endX=width - radius;
  spotMinX=startX + borderWidth;
  spotMaxX=endX - borderWidth;
  spotSize=height - 4 * borderWidth;
  spotX=toggleOn ? spotMaxX : spotMinX;
  offLineWidth=0;
}
Program: 3052
Project: 3052
Buggy source:
/** 
 * This class requires that the input reader be a BufferedReader so it can do line-oriented operations. 
 */
public ConcatenatingReader(BufferedReader in){
  super(in);
  this.in=in;
}

Fixed version (ground truth):
/** 
 * This class requires that the input reader be a BufferedReader so it can do line-oriented operations. 
 */
public ConcatenatingReader(BufferedReader in){
  super(in);
  this.inReader=in;
}
Program: 3053
Project: 3053
Buggy source:
private void nextLine() throws IOException {
  String cur=in.readLine();
  if (cur == null) {
    curBuf=null;
    return;
  }
  int numChars=cur.length();
  boolean needNewline=true;
  if ((numChars > 0) && (cur.charAt(cur.length() - 1) == '\\')) {
    --numChars;
    needNewline=false;
  }
  char[] buf=new char[numChars + (needNewline ? newline.length() : 0)];
  cur.getChars(0,numChars,buf,0);
  if (needNewline) {
    newline.getChars(0,newline.length(),buf,numChars);
  }
  curBuf=buf;
  curPos=0;
}

Fixed version (ground truth):
private void nextLine() throws IOException {
  String cur=inReader.readLine();
  if (cur == null) {
    curBuf=null;
    return;
  }
  int numChars=cur.length();
  boolean needNewline=true;
  if ((numChars > 0) && (cur.charAt(cur.length() - 1) == '\\')) {
    --numChars;
    needNewline=false;
  }
  char[] buf=new char[numChars + (needNewline ? NEW_LINE.length() : 0)];
  cur.getChars(0,numChars,buf,0);
  if (needNewline) {
    NEW_LINE.getChars(0,NEW_LINE.length(),buf,numChars);
  }
  curBuf=buf;
  curPos=0;
}
Program: 3054
Project: 3054
Buggy source:
@Override public boolean ready() throws IOException {
  return curBuf != null || in.ready();
}

Fixed version (ground truth):
@Override public boolean ready() throws IOException {
  return curBuf != null || inReader.ready();
}
Program: 3055
Project: 3055
Buggy source:
/** 
 * Return whether given Class <i>typeA</i> is subtype of any of the given type names.
 * @param typeA the type to check
 * @param loader the classloader for loading the type (my be null)
 * @param types any requested supertypes
 */
public static boolean isSubTypeOf(String typeA,ClassLoader loader,String... types){
  if (typeA == null || typeA.equals(Constants.OBJECT_INTERNAL)) {
    return false;
  }
  if (types.length == 0) {
    return false;
  }
  boolean internal=types[0].contains("String_Node_Str");
  loader=(loader != null ? loader : ClassLoader.getSystemClassLoader());
  if (internal) {
    typeA=typeA.replace('.','/');
  }
 else {
    typeA=typeA.replace('/','.');
  }
  Set<String> typeSet=new HashSet<>(Arrays.asList(types));
  if (typeSet.contains(typeA)) {
    return true;
  }
  ClassInfo ci=ClassCache.getInstance().get(loader,typeA);
  Collection<String> sTypes=new LinkedList<>();
  for (  ClassInfo sCi : ci.getSupertypes(false)) {
    sTypes.add(internal ? sCi.getClassName() : sCi.getJavaClassName());
  }
  sTypes.retainAll(typeSet);
  return !sTypes.isEmpty();
}

Fixed version (ground truth):
/** 
 * Return whether given Class <i>typeA</i> is subtype of any of the given type names.
 * @param typeA the type to check
 * @param loader the classloader for loading the type (my be null)
 * @param types any requested supertypes
 */
public static boolean isSubTypeOf(String typeA,ClassLoader loader,String... types){
  if (typeA == null || typeA.equals(Constants.OBJECT_INTERNAL)) {
    return false;
  }
  if (types.length == 0) {
    return false;
  }
  boolean internal=types[0].contains("String_Node_Str");
  loader=(loader != null ? loader : ClassLoader.getSystemClassLoader());
  if (internal) {
    typeA=typeA.replace('.','/');
  }
 else {
    typeA=typeA.replace('/','.');
  }
  Set<String> typeSet=new HashSet<>(Arrays.asList(types));
  if (typeSet.contains(typeA)) {
    return true;
  }
  ClassInfo ci=ClassCache.getInstance().get(loader,typeA);
  Collection<ClassInfo> sTypesInfo=ci.getSupertypes(false);
  if (sTypesInfo != null) {
    Collection<String> sTypes=new ArrayList<>(sTypesInfo.size());
    for (    ClassInfo sCi : sTypesInfo) {
      sTypes.add(internal ? sCi.getClassName() : sCi.getJavaClassName());
    }
    sTypes.retainAll(typeSet);
    return !sTypes.isEmpty();
  }
 else {
    return false;
  }
}
Program: 3056
Project: 3056
Buggy source:
public MethodInstrumentorHelper methodHelper(){
  return helper;
}

Fixed version (ground truth):
@Override public MethodInstrumentorHelper methodHelper(){
  return helper;
}
Program: 3057
Project: 3057
Buggy source:
private void checkAugmentedReturn(MethodNode mn){
  if (isUnannotated(mn))   return;
  Type retType=Type.getReturnType(mn.desc);
  if (retType.getSort() != Type.VOID) {
    if (getReturnMethodParameter(mn) == Integer.MIN_VALUE) {
      String oldDesc=mn.desc;
      Type[] args=Type.getArgumentTypes(mn.desc);
      args=Arrays.copyOf(args,args.length + 1);
      args[args.length - 1]=retType;
      List<AnnotationNode> annots=new LinkedList<>();
      AnnotationNode an=new AnnotationNode(Type.getDescriptor(Return.class));
      annots.add(an);
      mn.visibleParameterAnnotations=mn.visibleParameterAnnotations != null ? Arrays.copyOf(mn.visibleParameterAnnotations,args.length) : new List[args.length];
      mn.visibleParameterAnnotations[args.length - 1]=annots;
      mn.desc=Type.getMethodDescriptor(retType,args);
      if (mn instanceof BTraceMethodNode) {
        BTraceMethodNode bmn=(BTraceMethodNode)mn;
        OnMethod om=bmn.getOnMethod();
        if (om != null && om.getTargetName().equals(mn.name) && om.getTargetDescriptor().equals(oldDesc)) {
          om.setReturnParameter(getReturnMethodParameter(mn));
          om.setTargetDescriptor(mn.desc);
        }
      }
    }
  }
}

Fixed version (ground truth):
private void checkAugmentedReturn(MethodNode mn){
  if (isUnannotated(mn))   return;
  Type retType=Type.getReturnType(mn.desc);
  if (retType.getSort() != Type.VOID) {
    if (getReturnMethodParameter(mn) == Integer.MIN_VALUE) {
      String oldDesc=mn.desc;
      Type[] args=Type.getArgumentTypes(mn.desc);
      args=Arrays.copyOf(args,args.length + 1);
      args[args.length - 1]=retType;
      List<AnnotationNode> annots=new ArrayList<>();
      AnnotationNode an=new AnnotationNode(Type.getDescriptor(Return.class));
      annots.add(an);
      mn.visibleParameterAnnotations=mn.visibleParameterAnnotations != null ? Arrays.copyOf(mn.visibleParameterAnnotations,args.length) : new List[args.length];
      mn.visibleParameterAnnotations[args.length - 1]=annots;
      mn.desc=Type.getMethodDescriptor(retType,args);
      if (mn instanceof BTraceMethodNode) {
        BTraceMethodNode bmn=(BTraceMethodNode)mn;
        OnMethod om=bmn.getOnMethod();
        if (om != null && om.getTargetName().equals(mn.name) && om.getTargetDescriptor().equals(oldDesc)) {
          om.setReturnParameter(getReturnMethodParameter(mn));
          om.setTargetDescriptor(mn.desc);
        }
      }
    }
  }
}
Program: 3058
Project: 3058
Buggy source:
private void addLevelField(ClassNode cn){
  if (cn.fields == null) {
    cn.fields=new LinkedList();
  }
  cn.fields.add(new FieldNode(Opcodes.ASM5,Opcodes.ACC_PUBLIC | Opcodes.ACC_STATIC | Opcodes.ACC_VOLATILE,BTRACE_LEVEL_FLD,INT_DESC,null,0));
}

Fixed version (ground truth):
private void addLevelField(ClassNode cn){
  if (cn.fields == null) {
    cn.fields=new ArrayList();
  }
  cn.fields.add(new FieldNode(Opcodes.ASM5,Opcodes.ACC_PUBLIC | Opcodes.ACC_STATIC | Opcodes.ACC_VOLATILE,BTRACE_LEVEL_FLD,INT_DESC,null,0));
}
Program: 3059
Project: 3059
Buggy source:
@Override public void run(){
  DatagramSocket ds=null;
  boolean entered=BTraceRuntime.enter();
  try {
    ds=new DatagramSocket();
    DatagramPacket dp=new DatagramPacket(new byte[0],0);
    try {
      dp.setAddress(InetAddress.getByName(SharedSettings.GLOBAL.getStatsdHost()));
    }
 catch (    UnknownHostException e) {
      System.err.println("String_Node_Str" + SharedSettings.GLOBAL.getStatsdHost());
      dp.setAddress(InetAddress.getLoopbackAddress());
    }
catch (    SecurityException e) {
      dp.setAddress(InetAddress.getLoopbackAddress());
    }
    dp.setPort(SharedSettings.GLOBAL.getStatsdPort());
    while (true) {
      Collection<String> msgs=new LinkedList<>();
      msgs.add(q.take());
      q.drainTo(msgs);
      StringBuilder sb=new StringBuilder();
      for (      String m : msgs) {
        if (sb.length() + m.length() < 511) {
          sb.append(m).append('\n');
        }
 else {
          dp.setData(sb.toString().getBytes(CHARSET));
          ds.send(dp);
          sb.setLength(0);
        }
      }
      if (sb.length() > 0) {
        dp.setData(sb.toString().getBytes(CHARSET));
        ds.send(dp);
      }
    }
  }
 catch (  IOException|InterruptedException e) {
    e.printStackTrace();
  }
 finally {
    if (entered) {
      BTraceRuntime.leave();
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  DatagramSocket ds=null;
  boolean entered=BTraceRuntime.enter();
  try {
    ds=new DatagramSocket();
    DatagramPacket dp=new DatagramPacket(new byte[0],0);
    try {
      dp.setAddress(InetAddress.getByName(SharedSettings.GLOBAL.getStatsdHost()));
    }
 catch (    UnknownHostException e) {
      System.err.println("String_Node_Str" + SharedSettings.GLOBAL.getStatsdHost());
      dp.setAddress(InetAddress.getLoopbackAddress());
    }
catch (    SecurityException e) {
      dp.setAddress(InetAddress.getLoopbackAddress());
    }
    dp.setPort(SharedSettings.GLOBAL.getStatsdPort());
    while (true) {
      Collection<String> msgs=new ArrayList<>();
      msgs.add(q.take());
      q.drainTo(msgs);
      StringBuilder sb=new StringBuilder();
      for (      String m : msgs) {
        if (sb.length() + m.length() < 511) {
          sb.append(m).append('\n');
        }
 else {
          dp.setData(sb.toString().getBytes(CHARSET));
          ds.send(dp);
          sb.setLength(0);
        }
      }
      if (sb.length() > 0) {
        dp.setData(sb.toString().getBytes(CHARSET));
        ds.send(dp);
      }
    }
  }
 catch (  IOException|InterruptedException e) {
    e.printStackTrace();
  }
 finally {
    if (entered) {
      BTraceRuntime.leave();
    }
  }
}
Program: 3061
Project: 3061
Buggy source:
public static List<Interval> invert(Collection<Interval> intervals){
  Interval remainder=new Interval(Integer.MIN_VALUE,Integer.MAX_VALUE);
  Set<Interval> sorted=new TreeSet(union(intervals));
  List<Interval> result=new LinkedList<>();
  for (  Interval i : sorted) {
    if (i.isAll()) {
      return Collections.singletonList(Interval.none());
    }
    if (i.a <= remainder.a) {
      if (i.b > remainder.a)       remainder.a=i.b != Integer.MAX_VALUE ? i.b + 1 : i.b;
    }
 else {
      result.add(new Interval(remainder.a,i.a - 1));
      if (i.b < remainder.b) {
        remainder.a=i.b != Integer.MAX_VALUE ? i.b + 1 : i.b;
      }
 else {
        remainder=null;
        break;
      }
    }
  }
  if (remainder != null) {
    result.add(remainder);
  }
  return result;
}

Fixed version (ground truth):
public static List<Interval> invert(Collection<Interval> intervals){
  Interval remainder=new Interval(Integer.MIN_VALUE,Integer.MAX_VALUE);
  Set<Interval> sorted=new TreeSet(union(intervals));
  List<Interval> result=new ArrayList<>();
  for (  Interval i : sorted) {
    if (i.isAll()) {
      return Collections.singletonList(Interval.none());
    }
    if (i.a <= remainder.a) {
      if (i.b > remainder.a)       remainder.a=i.b != Integer.MAX_VALUE ? i.b + 1 : i.b;
    }
 else {
      result.add(new Interval(remainder.a,i.a - 1));
      if (i.b < remainder.b) {
        remainder.a=i.b != Integer.MAX_VALUE ? i.b + 1 : i.b;
      }
 else {
        remainder=null;
        break;
      }
    }
  }
  if (remainder != null) {
    result.add(remainder);
  }
  return result;
}
Program: 3062
Project: 3062
Buggy source:
public static List<Interval> union(Collection<Interval> intervals){
  Set<Interval> itvSet=new TreeSet<>();
  itvSet.addAll(intervals);
  Iterator<Interval> iter=itvSet.iterator();
  Interval previous=null;
  while (iter.hasNext()) {
    if (previous == null) {
      previous=iter.next();
      continue;
    }
    Interval current=iter.next();
    if (current.a <= (previous.b != Integer.MAX_VALUE ? previous.b + 1 : Integer.MAX_VALUE)) {
      previous.b=current.b;
      iter.remove();
    }
 else {
      previous=current;
    }
  }
  return new LinkedList<>(itvSet);
}

Fixed version (ground truth):
public static List<Interval> union(Collection<Interval> intervals){
  Set<Interval> itvSet=new TreeSet<>();
  itvSet.addAll(intervals);
  Iterator<Interval> iter=itvSet.iterator();
  Interval previous=null;
  while (iter.hasNext()) {
    if (previous == null) {
      previous=iter.next();
      continue;
    }
    Interval current=iter.next();
    if (current.a <= (previous.b != Integer.MAX_VALUE ? previous.b + 1 : Integer.MAX_VALUE)) {
      previous.b=current.b;
      iter.remove();
    }
 else {
      previous=current;
    }
  }
  return new ArrayList<>(itvSet);
}
Program: 3063
Project: 3063
Buggy source:
@Override protected void visitMethodPrologue(){
  visitTryCatchBlock(start,end,end,THROWABLE_INTERNAL);
  visitLabel(start);
  super.visitMethodPrologue();
}

Fixed version (ground truth):
@Override protected void visitMethodPrologue(){
  addTryCatchHandler(start,end);
  visitLabel(start);
  super.visitMethodPrologue();
}
Program: 3064
Project: 3064
Buggy source:
@Override public void visitMaxs(int maxStack,int maxLocals){
  visitLabel(end);
  insertFrameReplaceStack(end,THROWABLE_TYPE);
  onErrorReturn();
  visitInsn(ATHROW);
  super.visitMaxs(maxStack,maxLocals);
}

Fixed version (ground truth):
@Override public void visitMaxs(int maxStack,int maxLocals){
  visitTryCatchBlock(start,end,end,THROWABLE_INTERNAL);
  visitLabel(end);
  insertFrameReplaceStack(end,THROWABLE_TYPE);
  onErrorReturn();
  visitInsn(ATHROW);
  super.visitMaxs(maxStack,maxLocals);
}
Program: 3065
Project: 3065
Buggy source:
@Test public void bytecodeValidation() throws Exception {
  originalBC=loadTargetClass("String_Node_Str");
  transform("String_Node_Str");
  checkTransformation("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
}

Fixed version (ground truth):
@Test public void bytecodeValidation() throws Exception {
  originalBC=loadTargetClass("String_Node_Str");
  transform("String_Node_Str");
  checkTransformation("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
}
Program: 3066
Project: 3066
Buggy source:
@OnMethod(clazz="String_Node_Str",method="String_Node_Str") public static void onExecute(@Self Object currentStatement,AnyType[] args){
  if (args.length == 0) {
    executingStatement=Collections.get(preparedStatementDescriptions,currentStatement);
  }
 else {
    executingStatement=useStackTrace ? Threads.jstackStr() : str(args[0]);
  }
}

Fixed version (ground truth):
@OnMethod(clazz="String_Node_Str",method="String_Node_Str") public static void onExecute(@Self Statement currentStatement,AnyType[] args){
  if (args.length == 0) {
    executingStatement=Collections.get(preparedStatementDescriptions,currentStatement);
  }
 else {
    executingStatement=useStackTrace ? Threads.jstackStr() : str(args[0]);
  }
}
Program: 3067
Project: 3067
Buggy source:
@OnMethod(clazz="String_Node_Str",method="String_Node_Str") public static void onExecute(@Self Object currentStatement,AnyType[] args){
  if (args.length == 0) {
    executingStatement=Collections.get(preparedStatementDescriptions,currentStatement);
  }
 else {
    executingStatement=useStackTrace ? Threads.jstackStr() : str(args[0]);
  }
}

Fixed version (ground truth):
@OnMethod(clazz="String_Node_Str",method="String_Node_Str") public static void onExecute(@Self Statement currentStatement,AnyType[] args){
  if (args.length == 0) {
    executingStatement=Collections.get(preparedStatementDescriptions,currentStatement);
  }
 else {
    executingStatement=useStackTrace ? Threads.jstackStr() : str(args[0]);
  }
}
Program: 3069
Project: 3069
Buggy source:
private FileWriter getNextWriter() throws IOException {
  currentFileWriter.close();
  File scriptOutputFile_renameFrom=new File(path + File.separator + baseName);
  File scriptOutputFile_renameTo=new File(path + File.separator + baseName.substring(0,baseName.indexOf("String_Node_Str"))+ "String_Node_Str"+ (counter++));
  if (scriptOutputFile_renameTo.exists()) {
    scriptOutputFile_renameTo.delete();
  }
  scriptOutputFile_renameFrom.renameTo(scriptOutputFile_renameTo);
  scriptOutputFile_renameFrom=new File(path + File.separator + baseName);
  if (counter > settings.getFileRollMaxRolls()) {
    counter=1;
  }
  return new FileWriter(scriptOutputFile_renameFrom);
}

Fixed version (ground truth):
private FileWriter getNextWriter() throws IOException {
  currentFileWriter.close();
  File scriptOutputFile_renameFrom=new File(path + File.separator + baseName);
  File scriptOutputFile_renameTo=new File(path + File.separator + baseName+ "String_Node_Str"+ (counter++));
  if (scriptOutputFile_renameTo.exists()) {
    scriptOutputFile_renameTo.delete();
  }
  scriptOutputFile_renameFrom.renameTo(scriptOutputFile_renameTo);
  scriptOutputFile_renameFrom=new File(path + File.separator + baseName);
  if (counter > settings.getFileRollMaxRolls()) {
    counter=1;
  }
  return new FileWriter(scriptOutputFile_renameFrom);
}
Program: 3071
Project: 3071
Buggy source:
private FileWriter getNextWriter() throws IOException {
  currentFileWriter.close();
  File scriptOutputFile_renameFrom=new File(path + File.separator + baseName);
  File scriptOutputFile_renameTo=new File(path + File.separator + baseName.substring(0,baseName.indexOf("String_Node_Str"))+ "String_Node_Str"+ (counter++));
  if (scriptOutputFile_renameTo.exists()) {
    scriptOutputFile_renameTo.delete();
  }
  scriptOutputFile_renameFrom.renameTo(scriptOutputFile_renameTo);
  scriptOutputFile_renameFrom=new File(path + File.separator + baseName);
  if (counter > settings.getFileRollMaxRolls()) {
    counter=1;
  }
  return new FileWriter(scriptOutputFile_renameFrom);
}

Fixed version (ground truth):
private FileWriter getNextWriter() throws IOException {
  currentFileWriter.close();
  File scriptOutputFile_renameFrom=new File(path + File.separator + baseName);
  File scriptOutputFile_renameTo=new File(path + File.separator + baseName+ "String_Node_Str"+ (counter++));
  if (scriptOutputFile_renameTo.exists()) {
    scriptOutputFile_renameTo.delete();
  }
  scriptOutputFile_renameFrom.renameTo(scriptOutputFile_renameTo);
  scriptOutputFile_renameFrom=new File(path + File.separator + baseName);
  if (counter > settings.getFileRollMaxRolls()) {
    counter=1;
  }
  return new FileWriter(scriptOutputFile_renameFrom);
}
Program: 3072
Project: 3072
Buggy source:
@Override public void run(){
  boolean entered=BTraceRuntime.enter(rt);
  try {
    if (this.runtime != null)     this.runtime.handleExit(0);
  }
  finally {
    if (entered) {
      BTraceRuntime.leave();
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  boolean entered=BTraceRuntime.enter(runtime);
  try {
    if (runtime != null)     runtime.handleExit(0);
  }
  finally {
    if (entered) {
      BTraceRuntime.leave();
    }
  }
}
Program: 3074
Project: 3074
Buggy source:
public static <V>V removeFirst(Deque<V> queue){
  if (queue instanceof BTraceDeque || queue.getClass().getClassLoader() == null) {
    return queue.removeLast();
  }
 else {
    throw new IllegalArgumentException();
  }
}

Fixed version (ground truth):
public static <V>V removeFirst(Deque<V> queue){
  if (queue instanceof BTraceDeque || queue.getClass().getClassLoader() == null) {
    return queue.removeFirst();
  }
 else {
    throw new IllegalArgumentException();
  }
}
Program: 3077
Project: 3077
Buggy source:
public void visitJumpInsn(int opcode,Label label){
  if (include) {
    adaptee.visitJumpInsn(opcode,label);
  }
}

Fixed version (ground truth):
public void visitJumpInsn(int opcode,Label label){
  if (include) {
    getAdaptee().visitJumpInsn(opcode,label);
  }
}
Program: 3078
Project: 3078
Buggy source:
public void visitAttribute(Attribute attr){
  if (include) {
    adaptee.visitAttribute(attr);
  }
}

Fixed version (ground truth):
public void visitAttribute(Attribute attr){
  if (include) {
    getAdaptee().visitAttribute(attr);
  }
}
Program: 3079
Project: 3079
Buggy source:
public void visitMethodInsn(int opcode,String owner,String name,String desc){
  if (include) {
    adaptee.visitMethodInsn(opcode,owner,name,desc);
  }
}

Fixed version (ground truth):
public void visitMethodInsn(int opcode,String owner,String name,String desc){
  if (include) {
    getAdaptee().visitMethodInsn(opcode,owner,name,desc);
  }
}
Program: 3080
Project: 3080
Buggy source:
public void visitTryCatchBlock(Label start,Label end,Label handler,String type){
  if (include) {
    adaptee.visitTryCatchBlock(start,end,handler,type);
  }
}

Fixed version (ground truth):
public void visitTryCatchBlock(Label start,Label end,Label handler,String type){
  if (include) {
    getAdaptee().visitTryCatchBlock(start,end,handler,type);
  }
}
Program: 3081
Project: 3081
Buggy source:
public void visitTableSwitchInsn(int min,int max,Label dflt,Label[] labels){
  if (include) {
    adaptee.visitTableSwitchInsn(min,max,dflt,labels);
  }
}

Fixed version (ground truth):
public void visitTableSwitchInsn(int min,int max,Label dflt,Label[] labels){
  if (include) {
    getAdaptee().visitTableSwitchInsn(min,max,dflt,labels);
  }
}
Program: 3082
Project: 3082
Buggy source:
public AnnotationVisitor visitAnnotation(String annoDesc,boolean visible){
  if (annoDesc.equals(ONMETHOD_DESC)) {
    include=false;
    return new NullVisitor();
  }
 else   if (annoDesc.equals(ONPROBE_DESC)) {
    include=false;
    return new NullVisitor();
  }
 else {
    return adaptee.visitAnnotation(annoDesc,visible);
  }
}

Fixed version (ground truth):
public AnnotationVisitor visitAnnotation(String annoDesc,boolean visible){
  if (annoDesc.equals(ONMETHOD_DESC)) {
    include=false;
    return new NullVisitor();
  }
 else   if (annoDesc.equals(ONPROBE_DESC)) {
    include=false;
    return new NullVisitor();
  }
 else {
    return getAdaptee().visitAnnotation(annoDesc,visible);
  }
}
Program: 3083
Project: 3083
Buggy source:
public void visitMultiANewArrayInsn(String desc,int dims){
  if (include) {
    adaptee.visitMultiANewArrayInsn(desc,dims);
  }
}

Fixed version (ground truth):
public void visitMultiANewArrayInsn(String desc,int dims){
  if (include) {
    getAdaptee().visitMultiANewArrayInsn(desc,dims);
  }
}
Program: 3084
Project: 3084
Buggy source:
public void visitCode(){
  if (include) {
    adaptee.visitCode();
  }
}

Fixed version (ground truth):
public void visitCode(){
  if (include) {
    getAdaptee().visitCode();
  }
}
Program: 3085
Project: 3085
Buggy source:
public void visitLdcInsn(Object cst){
  if (include) {
    adaptee.visitLdcInsn(cst);
  }
}

Fixed version (ground truth):
public void visitLdcInsn(Object cst){
  if (include) {
    getAdaptee().visitLdcInsn(cst);
  }
}
Program: 3086
Project: 3086
Buggy source:
public void visitTypeInsn(int opcode,String desc){
  if (include) {
    adaptee.visitTypeInsn(opcode,desc);
  }
}

Fixed version (ground truth):
public void visitTypeInsn(int opcode,String desc){
  if (include) {
    getAdaptee().visitTypeInsn(opcode,desc);
  }
}
Program: 3087
Project: 3087
Buggy source:
public void visitFrame(int type,int nLocal,Object[] local,int nStack,Object[] stack){
  if (include) {
    adaptee.visitFrame(type,nLocal,local,nStack,stack);
  }
}

Fixed version (ground truth):
public void visitFrame(int type,int nLocal,Object[] local,int nStack,Object[] stack){
  if (include) {
    getAdaptee().visitFrame(type,nLocal,local,nStack,stack);
  }
}
Program: 3088
Project: 3088
Buggy source:
public void visitLocalVariable(String name,String desc,String signature,Label start,Label end,int index){
  if (include) {
    adaptee.visitLocalVariable(name,desc,signature,start,end,index);
  }
}

Fixed version (ground truth):
public void visitLocalVariable(String name,String desc,String signature,Label start,Label end,int index){
  if (include) {
    getAdaptee().visitLocalVariable(name,desc,signature,start,end,index);
  }
}
Program: 3089
Project: 3089
Buggy source:
public void visitEnd(){
  if (include) {
    adaptee.visitEnd();
  }
}

Fixed version (ground truth):
public void visitEnd(){
  if (include) {
    getAdaptee().visitEnd();
  }
}
Program: 3090
Project: 3090
Buggy source:
public void visitLabel(Label label){
  if (include) {
    adaptee.visitLabel(label);
  }
}

Fixed version (ground truth):
public void visitLabel(Label label){
  if (include) {
    getAdaptee().visitLabel(label);
  }
}
Program: 3091
Project: 3091
Buggy source:
public void visitLookupSwitchInsn(Label dflt,int[] keys,Label[] labels){
  if (include) {
    adaptee.visitLookupSwitchInsn(dflt,keys,labels);
  }
}

Fixed version (ground truth):
public void visitLookupSwitchInsn(Label dflt,int[] keys,Label[] labels){
  if (include) {
    getAdaptee().visitLookupSwitchInsn(dflt,keys,labels);
  }
}
Program: 3093
Project: 3093
Buggy source:
public void visitIntInsn(int opcode,int operand){
  if (include) {
    adaptee.visitIntInsn(opcode,operand);
  }
}

Fixed version (ground truth):
public void visitIntInsn(int opcode,int operand){
  if (include) {
    getAdaptee().visitIntInsn(opcode,operand);
  }
}
Program: 3094
Project: 3094
Buggy source:
public void visitInsn(int opcode){
  if (include) {
    adaptee.visitInsn(opcode);
  }
}

Fixed version (ground truth):
public void visitInsn(int opcode){
  if (include) {
    getAdaptee().visitInsn(opcode);
  }
}
Program: 3095
Project: 3095
Buggy source:
public void visitIincInsn(int var,int increment){
  if (include) {
    adaptee.visitIincInsn(var,increment);
  }
}

Fixed version (ground truth):
public void visitIincInsn(int var,int increment){
  if (include) {
    getAdaptee().visitIincInsn(var,increment);
  }
}
Program: 3096
Project: 3096
Buggy source:
public void visitLineNumber(int line,Label start){
  if (include) {
    adaptee.visitLineNumber(line,start);
  }
}

Fixed version (ground truth):
public void visitLineNumber(int line,Label start){
  if (include) {
    getAdaptee().visitLineNumber(line,start);
  }
}
Program: 3097
Project: 3097
Buggy source:
public void visitVarInsn(int opcode,int var){
  if (include) {
    adaptee.visitVarInsn(opcode,var);
  }
}

Fixed version (ground truth):
public void visitVarInsn(int opcode,int var){
  if (include) {
    getAdaptee().visitVarInsn(opcode,var);
  }
}
Program: 3098
Project: 3098
Buggy source:
public void visitMaxs(int maxStack,int maxLocals){
  if (include) {
    adaptee.visitMaxs(maxStack,maxLocals);
  }
}

Fixed version (ground truth):
public void visitMaxs(int maxStack,int maxLocals){
  if (include) {
    getAdaptee().visitMaxs(maxStack,maxLocals);
  }
}
Program: 3099
Project: 3099
Buggy source:
public void visitFieldInsn(int opcode,String owner,String name,String desc){
  if (include) {
    adaptee.visitFieldInsn(opcode,owner,name,desc);
  }
}

Fixed version (ground truth):
public void visitFieldInsn(int opcode,String owner,String name,String desc){
  if (include) {
    getAdaptee().visitFieldInsn(opcode,owner,name,desc);
  }
}
Program: 3101
Project: 3101
Buggy source:
/** 
 * Prints aggregation using the provided format
 * @param name The name of the aggregation to be used in the textual output
 * @param aggregation The aggregation to print
 * @param format The format to use. It mimics {@linkplain String#format(java.lang.String,java.lang.Object[]) } behaviourwith the addition of the ability to address the key title as a 0-indexed item
 * @see String#format(java.lang.String,java.lang.Object[])
 * @since 1.1
 */
public static void printAggregation(String name,Aggregation aggregation,String format){
  printAggregation(name,aggregation,format);
}

Fixed version (ground truth):
public static void printAggregation(String name,Aggregation aggregation,String format){
  BTraceRuntime.printAggregation(name,aggregation,format);
}
Program: 3102
Project: 3102
Buggy source:
/** 
 * Prints aggregation using the provided format
 * @param name The name of the aggregation to be used in the textual output
 * @param aggregation The aggregation to print
 * @param format The format to use. It mimics {@linkplain String#format(java.lang.String,java.lang.Object[]) } behaviourwith the addition of the ability to address the key title as a 0-indexed item
 * @see String#format(java.lang.String,java.lang.Object[])
 * @since 1.1
 */
public static void printAggregation(String name,Aggregation aggregation,String format){
  printAggregation(name,aggregation,format);
}

Fixed version (ground truth):
public static void printAggregation(String name,Aggregation aggregation,String format){
  BTraceRuntime.printAggregation(name,aggregation,format);
}
Program: 3103
Project: 3103
Buggy source:
final void endRetransformClasses(){
  try {
    onCommand(new OkayCommand());
    if (Main.isDebug())     Main.debugPrint("String_Node_Str");
  }
 catch (  IOException e) {
    Main.debugPrint(e);
  }
}

Fixed version (ground truth):
final void endRetransformClasses(){
  runtime.send(new RetransformationEndNotification());
}
Program: 3105
Project: 3105
Buggy source:
final void startRetransformClasses(int numClasses){
  try {
    onCommand(new RetransformationStartNotification(numClasses));
    if (Main.isDebug())     Main.debugPrint("String_Node_Str" + numClasses + "String_Node_Str");
  }
 catch (  IOException e) {
    Main.debugPrint(e);
  }
}

Fixed version (ground truth):
final void startRetransformClasses(int numClasses){
  runtime.send(new RetransformationStartNotification(numClasses));
  if (Main.isDebug())   Main.debugPrint("String_Node_Str" + numClasses + "String_Node_Str");
}
Program: 3106
Project: 3106
Buggy source:
public void onCommand(Command cmd) throws IOException {
  LOGGER.log(Level.FINEST,"String_Node_Str",cmd.toString());
switch (cmd.getType()) {
case Command.SUCCESS:
{
      if (retransforming) {
        clientMap.put(btrace,client);
        result.set(true);
        latch.countDown();
        retransforming=false;
      }
      break;
    }
case Command.EXIT:
{
    latch.countDown();
    stop(btrace);
    break;
  }
case Command.RETRANSFORMATION_START:
{
  int numClasses=((RetransformationStartNotification)cmd).getNumClasses();
  btrace.setInstrClasses(numClasses);
  btrace.setState(BTraceTask.State.INSTRUMENTING);
  retransforming=true;
  break;
}
}
btrace.dispatchCommand(cmd);
}

Fixed version (ground truth):
public void onCommand(Command cmd) throws IOException {
  LOGGER.log(Level.FINEST,"String_Node_Str",cmd.toString());
switch (cmd.getType()) {
case Command.SUCCESS:
{
      if (!retransforming) {
        result.set(true);
        clientMap.put(btrace,client);
        latch.countDown();
      }
      break;
    }
case Command.EXIT:
{
    latch.countDown();
    stop(btrace);
    break;
  }
case Command.RETRANSFORMATION_START:
{
  int numClasses=((RetransformationStartNotification)cmd).getNumClasses();
  btrace.setInstrClasses(numClasses);
  btrace.setState(BTraceTask.State.INSTRUMENTING);
  retransforming=true;
  break;
}
case Command.RETRANSFORMATION_END:
{
if (retransforming) {
  btrace.setState(BTraceTask.State.RUNNING);
  retransforming=false;
}
break;
}
}
btrace.dispatchCommand(cmd);
}