nus-yam/ex-repair huggingface dataset:
Program: 41250
Project: 41250
Buggy source:
public InfoResultMultiPartRequest(final int requestId,final String url,final int method,final ResponseParserListener parseListener,final ILogic logic){
  super(method,url,null,new ErrorListener(){
    @Override public void onErrorResponse(    VolleyError error){
      try {
        ByteArrayOutputStream baos=new ByteArrayOutputStream();
        PrintStream ps=new PrintStream(baos);
        error.printStackTrace(ps);
        String errorMsg=new String(baos.toByteArray());
        LogUtil.e("String_Node_Str","String_Node_Str" + url + "String_Node_Str"+ (method == Method.GET ? "String_Node_Str" : "String_Node_Str"));
        LogUtil.e("String_Node_Str",errorMsg);
        InfoResult infoResult=parseListener.doParse("String_Node_Str" + errorMsg + "String_Node_Str");
        infoResult.setExtraObj(error);
        logic.onResult(requestId,infoResult);
      }
 catch (      Exception e) {
        e.printStackTrace();
      }
    }
  }
);
  this.parserListener=parseListener;
  this.requestId=requestId;
  this.logic=logic;
  RetryPolicy retryPolicy=new DefaultRetryPolicy(20000,0,DefaultRetryPolicy.DEFAULT_BACKOFF_MULT);
  setRetryPolicy(retryPolicy);
}

Fixed version (ground truth):
public InfoResultMultiPartRequest(final int requestId,final String url,final int method,final ResponseParserListener parseListener,final ILogic logic){
  super(method,url,null,new ErrorListener(){
    @Override public void onErrorResponse(    VolleyError error){
      try {
        ByteArrayOutputStream baos=new ByteArrayOutputStream();
        PrintStream ps=new PrintStream(baos);
        error.printStackTrace(ps);
        String errorMsg=new String(baos.toByteArray());
        LogUtil.e("String_Node_Str","String_Node_Str" + url + "String_Node_Str"+ (method == Method.GET ? "String_Node_Str" : "String_Node_Str"));
        LogUtil.e("String_Node_Str",errorMsg);
        InfoResult infoResult=parseListener.doParse("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
        infoResult.setExtraObj(error);
        logic.onResult(requestId,infoResult);
      }
 catch (      Exception e) {
        e.printStackTrace();
      }
    }
  }
);
  this.parserListener=parseListener;
  this.requestId=requestId;
  this.logic=logic;
  RetryPolicy retryPolicy=new DefaultRetryPolicy(20000,0,DefaultRetryPolicy.DEFAULT_BACKOFF_MULT);
  setRetryPolicy(retryPolicy);
}
Program: 41251
Project: 41251
Buggy source:
@Override public void onErrorResponse(VolleyError error){
  try {
    ByteArrayOutputStream baos=new ByteArrayOutputStream();
    PrintStream ps=new PrintStream(baos);
    error.printStackTrace(ps);
    String errorMsg=new String(baos.toByteArray());
    LogUtil.e("String_Node_Str","String_Node_Str" + url + "String_Node_Str"+ (method == Method.GET ? "String_Node_Str" : "String_Node_Str"));
    LogUtil.e("String_Node_Str",errorMsg);
    InfoResult infoResult=parseListener.doParse("String_Node_Str" + errorMsg + "String_Node_Str");
    infoResult.setExtraObj(error);
    logic.onResult(requestId,infoResult);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
@Override public void onErrorResponse(VolleyError error){
  try {
    ByteArrayOutputStream baos=new ByteArrayOutputStream();
    PrintStream ps=new PrintStream(baos);
    error.printStackTrace(ps);
    String errorMsg=new String(baos.toByteArray());
    LogUtil.e("String_Node_Str","String_Node_Str" + url + "String_Node_Str"+ (method == Method.GET ? "String_Node_Str" : "String_Node_Str"));
    LogUtil.e("String_Node_Str",errorMsg);
    InfoResult infoResult=parseListener.doParse("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
    infoResult.setExtraObj(error);
    logic.onResult(requestId,infoResult);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 41252
Project: 41252
Buggy source:
private InfoResultRequest(final int requestId,final String url,final int method,final Map<String,Object> params,final ResponseParserListener parseListener,final ILogic logic){
  super(method,url,new ErrorListener(){
    @Override public void onErrorResponse(    VolleyError error){
      try {
        ByteArrayOutputStream baos=new ByteArrayOutputStream();
        PrintStream ps=new PrintStream(baos);
        error.printStackTrace(ps);
        String errorMsg=new String(baos.toByteArray());
        LogUtil.e("String_Node_Str","String_Node_Str" + url + "String_Node_Str"+ (method == Method.GET ? "String_Node_Str" : "String_Node_Str")+ "String_Node_Str"+ params.toString());
        LogUtil.e("String_Node_Str",errorMsg);
        InfoResult infoResult=parseListener.doParse("String_Node_Str" + errorMsg + "String_Node_Str");
        infoResult.setExtraObj(error);
        logic.onResult(requestId,infoResult);
      }
 catch (      Exception e) {
        e.printStackTrace();
      }
    }
  }
);
  this.params=params;
  this.parserListener=parseListener;
  this.requestId=requestId;
  this.logic=logic;
  RetryPolicy retryPolicy=new DefaultRetryPolicy(20000,0,DefaultRetryPolicy.DEFAULT_BACKOFF_MULT);
  setRetryPolicy(retryPolicy);
}

Fixed version (ground truth):
private InfoResultRequest(final int requestId,final String url,final int method,final Map<String,Object> params,final ResponseParserListener parseListener,final ILogic logic){
  super(method,url,new ErrorListener(){
    @Override public void onErrorResponse(    VolleyError error){
      try {
        ByteArrayOutputStream baos=new ByteArrayOutputStream();
        PrintStream ps=new PrintStream(baos);
        error.printStackTrace(ps);
        String errorMsg=new String(baos.toByteArray());
        LogUtil.e("String_Node_Str","String_Node_Str" + url + "String_Node_Str"+ (method == Method.GET ? "String_Node_Str" : "String_Node_Str")+ "String_Node_Str"+ params != null ? params.toString() : "String_Node_Str");
        LogUtil.e("String_Node_Str",errorMsg);
        InfoResult infoResult=parseListener.doParse("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
        infoResult.setExtraObj(error);
        logic.onResult(requestId,infoResult);
      }
 catch (      Exception e) {
        e.printStackTrace();
      }
    }
  }
);
  this.params=params;
  this.parserListener=parseListener;
  this.requestId=requestId;
  this.logic=logic;
  RetryPolicy retryPolicy=new DefaultRetryPolicy(20000,0,DefaultRetryPolicy.DEFAULT_BACKOFF_MULT);
  setRetryPolicy(retryPolicy);
}
Program: 41253
Project: 41253
Buggy source:
@Override public void onErrorResponse(VolleyError error){
  try {
    ByteArrayOutputStream baos=new ByteArrayOutputStream();
    PrintStream ps=new PrintStream(baos);
    error.printStackTrace(ps);
    String errorMsg=new String(baos.toByteArray());
    LogUtil.e("String_Node_Str","String_Node_Str" + url + "String_Node_Str"+ (method == Method.GET ? "String_Node_Str" : "String_Node_Str")+ "String_Node_Str"+ params.toString());
    LogUtil.e("String_Node_Str",errorMsg);
    InfoResult infoResult=parseListener.doParse("String_Node_Str" + errorMsg + "String_Node_Str");
    infoResult.setExtraObj(error);
    logic.onResult(requestId,infoResult);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
@Override public void onErrorResponse(VolleyError error){
  try {
    ByteArrayOutputStream baos=new ByteArrayOutputStream();
    PrintStream ps=new PrintStream(baos);
    error.printStackTrace(ps);
    String errorMsg=new String(baos.toByteArray());
    LogUtil.e("String_Node_Str","String_Node_Str" + url + "String_Node_Str"+ (method == Method.GET ? "String_Node_Str" : "String_Node_Str")+ "String_Node_Str"+ params != null ? params.toString() : "String_Node_Str");
    LogUtil.e("String_Node_Str",errorMsg);
    InfoResult infoResult=parseListener.doParse("String_Node_Str" + "String_Node_Str" + "String_Node_Str");
    infoResult.setExtraObj(error);
    logic.onResult(requestId,infoResult);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 41254
Project: 41254
Buggy source:
@Override protected void init(){
  super.init();
  titleLay=findViewById(R.id.title_lay);
  leftBtn=(Button)findViewById(R.id.title_left_btn);
  titleTxt=(TextView)findViewById(R.id.title_txt);
  rightBtn=(Button)findViewById(R.id.title_right_btn);
  mLoadingView=(LoadingView)findViewById(R.id.loading_view);
}

Fixed version (ground truth):
@Override protected void init(){
  super.init();
  titleLay=findViewById(R.id.title_lay);
  leftBtn=(Button)findViewById(R.id.title_left_btn);
  titleTxt=(TextView)findViewById(R.id.title_txt);
  rightBtn=(Button)findViewById(R.id.title_right_btn);
  mLoadingView=(LoadingView)findViewById(R.id.loading_view);
  if (mLoadingView != null) {
    mLoadingView.register(this);
  }
}
Program: 41255
Project: 41255
Buggy source:
/** 
 * setContentView之后调用, 进行view的初始化等操作
 */
private void afterSetContentView(View v){
  mView=v;
  init(v);
}

Fixed version (ground truth):
/** 
 * setContentView之后调用, 进行view的初始化等操作
 */
private void afterSetContentView(View v){
  mView=v;
  init(v);
  if (mLoadingView != null) {
    mLoadingView.register(this);
  }
}
Program: 41256
Project: 41256
Buggy source:
private void init(){
  setOnClickListener(this);
  eventBus=new EventBus();
  eventBus.register(getContext());
}

Fixed version (ground truth):
private void init(){
  setOnClickListener(this);
  eventBus=new EventBus();
}
Program: 41257
Project: 41257
Buggy source:
@Override protected void onDetachedFromWindow(){
  super.onDetachedFromWindow();
  eventBus.unregister(getContext());
}

Fixed version (ground truth):
@Override protected void onDetachedFromWindow(){
  super.onDetachedFromWindow();
  if (mSubcriber != null) {
    eventBus.unregister(mSubcriber);
  }
}
Program: 41258
Project: 41258
Buggy source:
/** 
 * EventBus订阅者事件通知的函数, UI线程
 * @param msg
 */
public void onEventMainThread(Message msg){
  onResponse(msg);
}

Fixed version (ground truth):
/** 
 * EventBus订阅者事件通知的函数, UI线程
 * @param msg
 */
public void onEventMainThread(Message msg){
  if (!isDetached() && !isRemoving()) {
    onResponse(msg);
  }
}
Program: 41259
Project: 41259
Buggy source:
/** 
 * EventBus订阅者事件通知的函数, UI线程
 * @param msg
 */
public void onEventMainThread(Message msg){
  onResponse(msg);
}

Fixed version (ground truth):
/** 
 * EventBus订阅者事件通知的函数, UI线程
 * @param msg
 */
public void onEventMainThread(Message msg){
  if (!isDestroyed && !isFinishing()) {
    onResponse(msg);
  }
}
Program: 41260
Project: 41260
Buggy source:
/** 
 * EventBus订阅者事件通知的函数, UI线程
 * @param msg
 */
public void onEventMainThread(Message msg){
  if (!isDetached() && !isRemoving()) {
    onResponse(msg);
  }
}

Fixed version (ground truth):
/** 
 * EventBus订阅者事件通知的函数, UI线程
 * @param msg
 */
public void onEventMainThread(Message msg){
  if (isAdded() && !isDetached() && !isRemoving()) {
    onResponse(msg);
  }
}
Program: 41261
Project: 41261
Buggy source:
/** 
 * 事件注解
 * @param classObj
 * @param viewFinder
 * @throws Exception 
 */
private static void injectListeners(Object classObj,ViewFinder viewFinder) throws Exception {
  Class<?> clazz=classObj.getClass();
  java.lang.reflect.Method[] methods=clazz.getDeclaredMethods();
  for (  java.lang.reflect.Method method : methods) {
    if (method.isAnnotationPresent(OnClick.class)) {
      setOnClickListener(classObj,viewFinder,method);
    }
 else     if (method.isAnnotationPresent(OnLongClick.class)) {
      setOnLongClickListener(classObj,viewFinder,method);
    }
 else     if (method.isAnnotationPresent(OnItemClick.class)) {
      setOnItemClickListener(classObj,viewFinder,method);
    }
 else     if (method.isAnnotationPresent(OnItemLongClick.class)) {
      setOnItemLongClickListener(classObj,viewFinder,method);
    }
 else     if (method.isAnnotationPresent(OnCheckedChanged.class)) {
      setOnCheckedChangeListener(classObj,viewFinder,method);
    }
  }
}

Fixed version (ground truth):
/** 
 * 事件注解
 * @param classObj
 * @param viewFinder
 * @throws Exception 
 */
private static void injectListeners(Object classObj,ViewFinder viewFinder) throws Exception {
  Class<?> clazz=classObj.getClass();
  java.lang.reflect.Method[] methods=clazz.getDeclaredMethods();
  for (  java.lang.reflect.Method method : methods) {
    try {
      if (method.isAnnotationPresent(OnClick.class)) {
        setOnClickListener(classObj,viewFinder,method);
      }
 else       if (method.isAnnotationPresent(OnLongClick.class)) {
        setOnLongClickListener(classObj,viewFinder,method);
      }
 else       if (method.isAnnotationPresent(OnItemClick.class)) {
        setOnItemClickListener(classObj,viewFinder,method);
      }
 else       if (method.isAnnotationPresent(OnItemLongClick.class)) {
        setOnItemLongClickListener(classObj,viewFinder,method);
      }
 else       if (method.isAnnotationPresent(OnCheckedChanged.class)) {
        setOnCheckedChangeListener(classObj,viewFinder,method);
      }
    }
 catch (    Exception e) {
      e.printStackTrace();
    }
  }
}
Program: 41262
Project: 41262
Buggy source:
/** 
 * View注解
 * @param classObj
 * @param viewFinder
 * @throws IllegalArgumentException 
 * @throws IllegalAccessException 
 */
private static void injectViews(Object classObj,ViewFinder viewFinder) throws IllegalAccessException, IllegalArgumentException {
  Class<?> clazz=classObj.getClass();
  Field[] fields=clazz.getDeclaredFields();
  for (  Field field : fields) {
    if (field.isAnnotationPresent(ViewInject.class)) {
      ViewInject viewInject=field.getAnnotation(ViewInject.class);
      int id=viewInject.value();
      if (id > 0) {
        field.setAccessible(true);
        View v=viewFinder.findViewById(id);
        if (v != null) {
          field.set(classObj,v);
        }
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * View注解
 * @param classObj
 * @param viewFinder
 * @throws IllegalArgumentException 
 * @throws IllegalAccessException 
 */
private static void injectViews(Object classObj,ViewFinder viewFinder) throws IllegalAccessException, IllegalArgumentException {
  Class<?> clazz=classObj.getClass();
  Field[] fields=clazz.getDeclaredFields();
  for (  Field field : fields) {
    if (field.isAnnotationPresent(ViewInject.class)) {
      ViewInject viewInject=field.getAnnotation(ViewInject.class);
      int id=viewInject.value();
      if (id > 0) {
        field.setAccessible(true);
        View v=viewFinder.findViewById(id);
        if (v != null) {
          try {
            field.set(classObj,v);
          }
 catch (          Exception e) {
            e.printStackTrace();
          }
        }
      }
    }
  }
}
Program: 41263
Project: 41263
Buggy source:
/** 
 * 获得磁盘缓存目录 [PS：应用卸载后会被自动删除]
 * @param context
 * @return
 */
public File getDiskCacheDir(Context context){
  String cachePath;
  if (Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState()) || !Environment.isExternalStorageRemovable()) {
    cachePath=context.getExternalCacheDir().getPath();
  }
 else {
    cachePath=context.getFilesDir().getPath();
  }
  return new File(cachePath);
}

Fixed version (ground truth):
/** 
 * 获得磁盘缓存目录 [PS：应用卸载后会被自动删除]
 * @param context
 * @param uniqueName
 * @return
 */
public File getDiskCacheDir(Context context,String uniqueName){
  String cachePath;
  if (Environment.MEDIA_MOUNTED.equals(Environment.getExternalStorageState()) || !Environment.isExternalStorageRemovable()) {
    cachePath=context.getExternalCacheDir().getPath();
  }
 else {
    cachePath=context.getFilesDir().getPath();
  }
  return new File(cachePath + File.separator + uniqueName);
}
Program: 41264
Project: 41264
Buggy source:
public BasicAdapter(Context context,List<T> data,Map<Integer,Integer> itemTypeResourceMap){
  mLayoutInflater=LayoutInflater.from(context);
  mData=data;
  mItemTypeResourceMap=itemTypeResourceMap;
}

Fixed version (ground truth):
public BasicAdapter(Context context,List<T> data,Map<Integer,Integer> itemTypeResourceMap){
  mLayoutInflater=LayoutInflater.from(context);
  mData=data;
  mItemTypeResourceMap.putAll(itemTypeResourceMap);
}
Program: 41265
Project: 41265
Buggy source:
/** 
 * setContentView之后调用, 进行view的初始化等操作
 */
private void afterSetContentView(){
  init(mView);
  if (mLoadingView != null) {
    mLoadingView.register(this);
  }
}

Fixed version (ground truth):
/** 
 * setContentView之后调用, 进行view的初始化等操作
 */
private void afterSetContentView(View view){
  mView=view;
  init(view);
  if (mLoadingView != null) {
    mLoadingView.register(this);
  }
}
Program: 41266
Project: 41266
Buggy source:
/** 
 * 从资源加载View
 * @param inflater
 * @param container
 * @param resourceId
 * @param fragment
 * @return
 */
protected View inflate(LayoutInflater inflater,ViewGroup container,int resourceId,Fragment fragment){
  mView=inflater.inflate(resourceId,container,false);
  mFragment=fragment;
  return mView;
}

Fixed version (ground truth):
/** 
 * 从资源加载View
 * @param inflater
 * @param container
 * @param resourceId
 * @param fragment
 * @return
 */
protected View inflate(LayoutInflater inflater,ViewGroup container,int resourceId,Fragment fragment){
  View view=inflater.inflate(resourceId,container,false);
  interceptTouchEvent(view,true);
  ViewUtils.inject(fragment,view);
  afterSetContentView(view);
  return view;
}
Program: 41267
Project: 41267
Buggy source:
@Override public void onActivityCreated(Bundle savedInstanceState){
  super.onActivityCreated(savedInstanceState);
  interceptTouchEvent(mView,true);
  ViewUtils.inject(mFragment,mView);
  afterSetContentView();
}

Fixed version (ground truth):
@Override public void onActivityCreated(Bundle savedInstanceState){
  super.onActivityCreated(savedInstanceState);
}
Program: 41268
Project: 41268
Buggy source:
/** 
 * 单击事件绑定
 * @param classObj
 * @param contentView
 * @param method
 */
private static void setOnClickListener(Object classObj,View contentView,Method method){
  OnClick onclick=method.getAnnotation(OnClick.class);
  int[] ids=onclick.value();
  if (ids != null) {
    for (    int id : ids) {
      View view=contentView.findViewById(id);
      view.setOnClickListener(new EventListener(classObj,method.getName()));
    }
  }
}

Fixed version (ground truth):
/** 
 * 单击事件绑定
 * @param classObj
 * @param viewFinder
 * @param method
 */
private static void setOnClickListener(Object classObj,ViewFinder viewFinder,Method method){
  OnClick onclick=method.getAnnotation(OnClick.class);
  int[] ids=onclick.value();
  if (ids != null) {
    for (    int id : ids) {
      View view=viewFinder.findViewById(id);
      view.setOnClickListener(new EventListener(classObj,method.getName()));
    }
  }
}
Program: 41269
Project: 41269
Buggy source:
/** 
 * 事件注解
 * @param classObj
 * @param contentView
 * @throws Exception 
 */
private static void injectListeners(Object classObj,View contentView) throws Exception {
  Class<?> clazz=classObj.getClass();
  java.lang.reflect.Method[] methods=clazz.getDeclaredMethods();
  for (  java.lang.reflect.Method method : methods) {
    if (method.isAnnotationPresent(OnClick.class)) {
      setOnClickListener(classObj,contentView,method);
    }
 else     if (method.isAnnotationPresent(OnLongClick.class)) {
      setOnLongClickListener(classObj,contentView,method);
    }
 else     if (method.isAnnotationPresent(OnItemClick.class)) {
      setOnItemClickListener(classObj,contentView,method);
    }
 else     if (method.isAnnotationPresent(OnItemLongClick.class)) {
      setOnItemLongClickListener(classObj,contentView,method);
    }
  }
}

Fixed version (ground truth):
/** 
 * 事件注解
 * @param classObj
 * @param viewFinder
 * @throws Exception 
 */
private static void injectListeners(Object classObj,ViewFinder viewFinder) throws Exception {
  Class<?> clazz=classObj.getClass();
  java.lang.reflect.Method[] methods=clazz.getDeclaredMethods();
  for (  java.lang.reflect.Method method : methods) {
    if (method.isAnnotationPresent(OnClick.class)) {
      setOnClickListener(classObj,viewFinder,method);
    }
 else     if (method.isAnnotationPresent(OnLongClick.class)) {
      setOnLongClickListener(classObj,viewFinder,method);
    }
 else     if (method.isAnnotationPresent(OnItemClick.class)) {
      setOnItemClickListener(classObj,viewFinder,method);
    }
 else     if (method.isAnnotationPresent(OnItemLongClick.class)) {
      setOnItemLongClickListener(classObj,viewFinder,method);
    }
  }
}
Program: 41270
Project: 41270
Buggy source:
/** 
 * Item单击事件
 * @param classObj
 * @param contentView
 * @param method
 */
private static void setOnItemClickListener(Object classObj,View contentView,Method method){
  OnItemClick onItemClick=method.getAnnotation(OnItemClick.class);
  int[] ids=onItemClick.value();
  if (ids != null) {
    for (    int id : ids) {
      View view=contentView.findViewById(id);
      if (view instanceof AbsListView) {
        ((AbsListView)view).setOnItemClickListener(new EventListener(classObj,method.getName()));
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Item单击事件
 * @param classObj
 * @param viewFinder
 * @param method
 */
private static void setOnItemClickListener(Object classObj,ViewFinder viewFinder,Method method){
  OnItemClick onItemClick=method.getAnnotation(OnItemClick.class);
  int[] ids=onItemClick.value();
  if (ids != null) {
    for (    int id : ids) {
      View view=viewFinder.findViewById(id);
      if (view instanceof AbsListView) {
        ((AbsListView)view).setOnItemClickListener(new EventListener(classObj,method.getName()));
      }
    }
  }
}
Program: 41271
Project: 41271
Buggy source:
/** 
 * 长按事件绑定
 * @param classObj
 * @param contentView
 * @param method
 */
private static void setOnLongClickListener(Object classObj,View contentView,Method method){
  OnLongClick onLongClick=method.getAnnotation(OnLongClick.class);
  int[] ids=onLongClick.value();
  if (ids != null) {
    for (    int id : ids) {
      View view=contentView.findViewById(id);
      view.setOnLongClickListener(new EventListener(classObj,method.getName()));
    }
  }
}

Fixed version (ground truth):
/** 
 * 长按事件绑定
 * @param classObj
 * @param viewFinder
 * @param method
 */
private static void setOnLongClickListener(Object classObj,ViewFinder viewFinder,Method method){
  OnLongClick onLongClick=method.getAnnotation(OnLongClick.class);
  int[] ids=onLongClick.value();
  if (ids != null) {
    for (    int id : ids) {
      View view=viewFinder.findViewById(id);
      view.setOnLongClickListener(new EventListener(classObj,method.getName()));
    }
  }
}
Program: 41272
Project: 41272
Buggy source:
/** 
 * 注解View、事件
 * @param classObj class对象
 * @param contentView 父View对象
 */
public static void inject(Object classObj,View contentView){
  try {
    injectViews(classObj,contentView);
    injectListeners(classObj,contentView);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
private static void inject(Object classObj,ViewFinder finder){
  try {
    injectViews(classObj,finder);
    injectListeners(classObj,finder);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}
Program: 41273
Project: 41273
Buggy source:
/** 
 * View注解
 * @param classObj
 * @param contentView
 * @throws IllegalArgumentException 
 * @throws IllegalAccessException 
 */
private static void injectViews(Object classObj,View contentView) throws IllegalAccessException, IllegalArgumentException {
  Class<?> clazz=classObj.getClass();
  Field[] fields=clazz.getDeclaredFields();
  for (  Field field : fields) {
    if (field.isAnnotationPresent(ViewInject.class)) {
      ViewInject viewInject=field.getAnnotation(ViewInject.class);
      int id=viewInject.value();
      if (id > 0) {
        field.setAccessible(true);
        field.set(classObj,contentView.findViewById(id));
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * View注解
 * @param classObj
 * @param viewFinder
 * @throws IllegalArgumentException 
 * @throws IllegalAccessException 
 */
private static void injectViews(Object classObj,ViewFinder viewFinder) throws IllegalAccessException, IllegalArgumentException {
  Class<?> clazz=classObj.getClass();
  Field[] fields=clazz.getDeclaredFields();
  for (  Field field : fields) {
    if (field.isAnnotationPresent(ViewInject.class)) {
      ViewInject viewInject=field.getAnnotation(ViewInject.class);
      int id=viewInject.value();
      if (id > 0) {
        field.setAccessible(true);
        field.set(classObj,viewFinder.findViewById(id));
      }
    }
  }
}
Program: 41274
Project: 41274
Buggy source:
/** 
 * Item长按事件
 * @param classObj
 * @param contentView
 * @param method
 */
private static void setOnItemLongClickListener(Object classObj,View contentView,Method method){
  OnItemLongClick onItemLongClick=method.getAnnotation(OnItemLongClick.class);
  int[] ids=onItemLongClick.value();
  if (ids != null) {
    for (    int id : ids) {
      View view=contentView.findViewById(id);
      if (view instanceof AbsListView) {
        ((AbsListView)view).setOnItemLongClickListener(new EventListener(classObj,method.getName()));
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Item长按事件
 * @param classObj
 * @param viewFinder
 * @param method
 */
private static void setOnItemLongClickListener(Object classObj,ViewFinder viewFinder,Method method){
  OnItemLongClick onItemLongClick=method.getAnnotation(OnItemLongClick.class);
  int[] ids=onItemLongClick.value();
  if (ids != null) {
    for (    int id : ids) {
      View view=viewFinder.findViewById(id);
      if (view instanceof AbsListView) {
        ((AbsListView)view).setOnItemLongClickListener(new EventListener(classObj,method.getName()));
      }
    }
  }
}
Program: 41275
Project: 41275
Buggy source:
/** 
 * 单击事件绑定
 * @param classObj
 * @param viewFinder
 * @param method
 */
private static void setOnClickListener(Object classObj,ViewFinder viewFinder,Method method){
  OnClick onclick=method.getAnnotation(OnClick.class);
  int[] ids=onclick.value();
  if (ids != null) {
    for (    int id : ids) {
      View view=viewFinder.findViewById(id);
      view.setOnClickListener(new EventListener(classObj,method.getName()));
    }
  }
}

Fixed version (ground truth):
/** 
 * 单击事件绑定
 * @param classObj
 * @param viewFinder
 * @param method
 */
private static void setOnClickListener(Object classObj,ViewFinder viewFinder,Method method){
  OnClick onclick=method.getAnnotation(OnClick.class);
  int[] ids=onclick.value();
  if (ids != null) {
    for (    int id : ids) {
      View view=viewFinder.findViewById(id);
      if (view != null) {
        view.setOnClickListener(new EventListener(classObj,method.getName()));
      }
    }
  }
}
Program: 41276
Project: 41276
Buggy source:
/** 
 * 事件注解
 * @param classObj
 * @param viewFinder
 * @throws Exception 
 */
private static void injectListeners(Object classObj,ViewFinder viewFinder) throws Exception {
  Class<?> clazz=classObj.getClass();
  java.lang.reflect.Method[] methods=clazz.getDeclaredMethods();
  for (  java.lang.reflect.Method method : methods) {
    if (method.isAnnotationPresent(OnClick.class)) {
      setOnClickListener(classObj,viewFinder,method);
    }
 else     if (method.isAnnotationPresent(OnLongClick.class)) {
      setOnLongClickListener(classObj,viewFinder,method);
    }
 else     if (method.isAnnotationPresent(OnItemClick.class)) {
      setOnItemClickListener(classObj,viewFinder,method);
    }
 else     if (method.isAnnotationPresent(OnItemLongClick.class)) {
      setOnItemLongClickListener(classObj,viewFinder,method);
    }
  }
}

Fixed version (ground truth):
/** 
 * 事件注解
 * @param classObj
 * @param viewFinder
 * @throws Exception 
 */
private static void injectListeners(Object classObj,ViewFinder viewFinder) throws Exception {
  Class<?> clazz=classObj.getClass();
  java.lang.reflect.Method[] methods=clazz.getDeclaredMethods();
  for (  java.lang.reflect.Method method : methods) {
    if (method.isAnnotationPresent(OnClick.class)) {
      setOnClickListener(classObj,viewFinder,method);
    }
 else     if (method.isAnnotationPresent(OnLongClick.class)) {
      setOnLongClickListener(classObj,viewFinder,method);
    }
 else     if (method.isAnnotationPresent(OnItemClick.class)) {
      setOnItemClickListener(classObj,viewFinder,method);
    }
 else     if (method.isAnnotationPresent(OnItemLongClick.class)) {
      setOnItemLongClickListener(classObj,viewFinder,method);
    }
 else     if (method.isAnnotationPresent(OnCheckedChanged.class)) {
      setOnCheckedChangeListener(classObj,viewFinder,method);
    }
  }
}
Program: 41277
Project: 41277
Buggy source:
/** 
 * Item单击事件
 * @param classObj
 * @param viewFinder
 * @param method
 */
private static void setOnItemClickListener(Object classObj,ViewFinder viewFinder,Method method){
  OnItemClick onItemClick=method.getAnnotation(OnItemClick.class);
  int[] ids=onItemClick.value();
  if (ids != null) {
    for (    int id : ids) {
      View view=viewFinder.findViewById(id);
      if (view instanceof AbsListView) {
        ((AbsListView)view).setOnItemClickListener(new EventListener(classObj,method.getName()));
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Item单击事件
 * @param classObj
 * @param viewFinder
 * @param method
 */
private static void setOnItemClickListener(Object classObj,ViewFinder viewFinder,Method method){
  OnItemClick onItemClick=method.getAnnotation(OnItemClick.class);
  int[] ids=onItemClick.value();
  if (ids != null) {
    for (    int id : ids) {
      View view=viewFinder.findViewById(id);
      if (view != null && view instanceof AbsListView) {
        ((AbsListView)view).setOnItemClickListener(new EventListener(classObj,method.getName()));
      }
    }
  }
}
Program: 41278
Project: 41278
Buggy source:
/** 
 * 长按事件绑定
 * @param classObj
 * @param viewFinder
 * @param method
 */
private static void setOnLongClickListener(Object classObj,ViewFinder viewFinder,Method method){
  OnLongClick onLongClick=method.getAnnotation(OnLongClick.class);
  int[] ids=onLongClick.value();
  if (ids != null) {
    for (    int id : ids) {
      View view=viewFinder.findViewById(id);
      view.setOnLongClickListener(new EventListener(classObj,method.getName()));
    }
  }
}

Fixed version (ground truth):
/** 
 * 长按事件绑定
 * @param classObj
 * @param viewFinder
 * @param method
 */
private static void setOnLongClickListener(Object classObj,ViewFinder viewFinder,Method method){
  OnLongClick onLongClick=method.getAnnotation(OnLongClick.class);
  int[] ids=onLongClick.value();
  if (ids != null) {
    for (    int id : ids) {
      View view=viewFinder.findViewById(id);
      if (view != null) {
        view.setOnLongClickListener(new EventListener(classObj,method.getName()));
      }
    }
  }
}
Program: 41279
Project: 41279
Buggy source:
/** 
 * View注解
 * @param classObj
 * @param viewFinder
 * @throws IllegalArgumentException 
 * @throws IllegalAccessException 
 */
private static void injectViews(Object classObj,ViewFinder viewFinder) throws IllegalAccessException, IllegalArgumentException {
  Class<?> clazz=classObj.getClass();
  Field[] fields=clazz.getDeclaredFields();
  for (  Field field : fields) {
    if (field.isAnnotationPresent(ViewInject.class)) {
      ViewInject viewInject=field.getAnnotation(ViewInject.class);
      int id=viewInject.value();
      if (id > 0) {
        field.setAccessible(true);
        field.set(classObj,viewFinder.findViewById(id));
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * View注解
 * @param classObj
 * @param viewFinder
 * @throws IllegalArgumentException 
 * @throws IllegalAccessException 
 */
private static void injectViews(Object classObj,ViewFinder viewFinder) throws IllegalAccessException, IllegalArgumentException {
  Class<?> clazz=classObj.getClass();
  Field[] fields=clazz.getDeclaredFields();
  for (  Field field : fields) {
    if (field.isAnnotationPresent(ViewInject.class)) {
      ViewInject viewInject=field.getAnnotation(ViewInject.class);
      int id=viewInject.value();
      if (id > 0) {
        field.setAccessible(true);
        View v=viewFinder.findViewById(id);
        if (v != null) {
          field.set(classObj,v);
        }
      }
    }
  }
}
Program: 41280
Project: 41280
Buggy source:
/** 
 * Item长按事件
 * @param classObj
 * @param viewFinder
 * @param method
 */
private static void setOnItemLongClickListener(Object classObj,ViewFinder viewFinder,Method method){
  OnItemLongClick onItemLongClick=method.getAnnotation(OnItemLongClick.class);
  int[] ids=onItemLongClick.value();
  if (ids != null) {
    for (    int id : ids) {
      View view=viewFinder.findViewById(id);
      if (view instanceof AbsListView) {
        ((AbsListView)view).setOnItemLongClickListener(new EventListener(classObj,method.getName()));
      }
    }
  }
}

Fixed version (ground truth):
/** 
 * Item长按事件
 * @param classObj
 * @param viewFinder
 * @param method
 */
private static void setOnItemLongClickListener(Object classObj,ViewFinder viewFinder,Method method){
  OnItemLongClick onItemLongClick=method.getAnnotation(OnItemLongClick.class);
  int[] ids=onItemLongClick.value();
  if (ids != null) {
    for (    int id : ids) {
      View view=viewFinder.findViewById(id);
      if (view != null && view instanceof AbsListView) {
        ((AbsListView)view).setOnItemLongClickListener(new EventListener(classObj,method.getName()));
      }
    }
  }
}
Program: 41281
Project: 41281
Buggy source:
private void executeAuth(final CallbackContext callbackContext){
  Log.d(LOGTAG,"String_Node_Str");
  authCallbackContext=callbackContext;
  cordova.getActivity().runOnUiThread(new Runnable(){
    @Override public void run(){
      gameHelper.beginUserInitiatedSignIn();
      callbackContext.success();
    }
  }
);
}

Fixed version (ground truth):
private void executeAuth(final CallbackContext callbackContext){
  Log.d(LOGTAG,"String_Node_Str");
  authCallbackContext=callbackContext;
  cordova.getActivity().runOnUiThread(new Runnable(){
    @Override public void run(){
      gameHelper.beginUserInitiatedSignIn();
    }
  }
);
}
Program: 41282
Project: 41282
Buggy source:
@Override public void onSignInSucceeded(){
  authCallbackContext.error("String_Node_Str");
}

Fixed version (ground truth):
@Override public void onSignInSucceeded(){
  authCallbackContext.success("String_Node_Str");
}
Program: 41283
Project: 41283
Buggy source:
@DataBoundSetter public void setWorkingDir(String workingDir){
  this.workingDir=workingDir;
}

Fixed version (ground truth):
@DataBoundSetter public void setWorkingDir(String workingDir){
  this.workingDir=Util.fixEmpty(workingDir);
}
Program: 41285
Project: 41285
Buggy source:
private synchronized int readPidFromPidFile(String... commands) throws IOException, InterruptedException {
  int pid=-1;
  FilePath pidFile=ws.child(readPidFile(commands));
  for (int w=0; w < 10 && !pidFile.exists(); w++) {
    try {
      Thread.sleep(1000);
    }
 catch (    InterruptedException e) {
      Thread.interrupted();
      break;
    }
  }
  if (pidFile.exists()) {
    try {
      pid=Integer.parseInt(pidFile.readToString().trim());
    }
 catch (    NumberFormatException x) {
      throw new IOException("String_Node_Str" + pidFile + "String_Node_Str"+ x,x);
    }
  }
  return pid;
}

Fixed version (ground truth):
private synchronized int readPidFromPidFile(String... commands) throws IOException, InterruptedException {
  int pid=-1;
  FilePath pidFile=ws.child(readPidFile(commands));
  for (int w=0; w < 10 && !pidFile.exists(); w++) {
    try {
      wait(1000);
    }
 catch (    InterruptedException e) {
      break;
    }
  }
  if (pidFile.exists()) {
    try {
      pid=Integer.parseInt(pidFile.readToString().trim());
    }
 catch (    NumberFormatException x) {
      throw new IOException("String_Node_Str" + pidFile + "String_Node_Str"+ x,x);
    }
  }
  return pid;
}
Program: 41288
Project: 41288
Buggy source:
private void setupEnvironmentVariable(EnvVars vars,ExecWatch watch) throws IOException {
  for (  Map.Entry<String,String> entry : vars.entrySet()) {
    watch.getInput().write(String.format("String_Node_Str",entry.getKey(),entry.getValue().replace("String_Node_Str","String_Node_Str")).getBytes(StandardCharsets.UTF_8));
  }
}

Fixed version (ground truth):
private void setupEnvironmentVariable(EnvVars vars,ExecWatch watch) throws IOException {
  for (  Map.Entry<String,String> entry : vars.entrySet()) {
    watch.getInput().write(String.format("String_Node_Str",entry.getKey(),entry.getValue().replace("String_Node_Str","String_Node_Str"),NEWLINE).getBytes(StandardCharsets.UTF_8));
  }
}
Program: 41291
Project: 41291
Buggy source:
public KubernetesCloud getCloud(){
  Cloud cloud=Jenkins.getInstance().getCloud(getCloudName());
  if (cloud instanceof KubernetesCloud) {
    return (KubernetesCloud)cloud;
  }
 else {
    throw new IllegalStateException(getClass().getName() + "String_Node_Str" + KubernetesCloud.class.getName());
  }
}

Fixed version (ground truth):
@Nonnull public KubernetesCloud getCloud(){
  Cloud cloud=Jenkins.getInstance().getCloud(getCloudName());
  if (cloud instanceof KubernetesCloud) {
    return (KubernetesCloud)cloud;
  }
 else {
    throw new IllegalStateException(getClass().getName() + "String_Node_Str" + KubernetesCloud.class.getName());
  }
}
Program: 41292
Project: 41292
Buggy source:
KubernetesClient connectToCloud() throws Exception {
  Node node=context.get(Node.class);
  if (!(node instanceof KubernetesSlave)) {
    throw new AbortException(String.format("String_Node_Str",node != null ? node.getNodeName() : null));
  }
  KubernetesSlave slave=(KubernetesSlave)node;
  KubernetesCloud cloud=(KubernetesCloud)slave.getCloud();
  if (cloud == null) {
    throw new AbortException(String.format("String_Node_Str",slave.getCloudName()));
  }
  return cloud.connect();
}

Fixed version (ground truth):
KubernetesClient connectToCloud() throws Exception {
  Node node=context.get(Node.class);
  if (!(node instanceof KubernetesSlave)) {
    throw new AbortException(String.format("String_Node_Str",node != null ? node.getNodeName() : null));
  }
  KubernetesSlave slave=(KubernetesSlave)node;
  KubernetesCloud cloud=slave.getCloud();
  return cloud.connect();
}
Program: 41294
Project: 41294
Buggy source:
private void waitUntilContainerIsReady() throws IOException {
  try {
    client.pods().inNamespace(namespace).withName(podName).waitUntilReady(CONTAINER_READY_TIMEOUT,TimeUnit.MINUTES);
  }
 catch (  InterruptedException|KubernetesClientTimeoutException e) {
    throw new IOException("String_Node_Str" + "String_Node_Str" + containerName + "String_Node_Str"+ podName+ "String_Node_Str"+ "String_Node_Str",e);
  }
}

Fixed version (ground truth):
private void waitUntilContainerIsReady() throws IOException {
  try {
    Pod pod=client.pods().inNamespace(namespace).withName(podName).waitUntilReady(CONTAINER_READY_TIMEOUT,TimeUnit.MINUTES);
    if (pod == null || pod.getStatus() == null || pod.getStatus().getContainerStatuses() == null) {
      throw new IOException("String_Node_Str" + "String_Node_Str" + containerName + "String_Node_Str"+ podName+ "String_Node_Str"+ "String_Node_Str");
    }
    for (    ContainerStatus info : pod.getStatus().getContainerStatuses()) {
      if (info.getName().equals(containerName)) {
        if (info.getReady()) {
          return;
        }
 else {
          throw new IOException("String_Node_Str" + containerName + "String_Node_Str"+ podName+ "String_Node_Str"+ info.getState());
        }
      }
    }
    throw new IOException("String_Node_Str" + containerName + "String_Node_Str"+ podName+ "String_Node_Str");
  }
 catch (  InterruptedException|KubernetesClientTimeoutException e) {
    throw new IOException("String_Node_Str" + "String_Node_Str" + containerName + "String_Node_Str"+ podName+ "String_Node_Str"+ "String_Node_Str",e);
  }
}
Program: 41295
Project: 41295
Buggy source:
@Before public void configureCloud() throws Exception {
  client=setupCloud().connect();
  deletePods(client,labels,false);
  String image="String_Node_Str";
  Container c=new ContainerBuilder().withName(image).withImagePullPolicy("String_Node_Str").withImage(image).withCommand("String_Node_Str").withTty(true).build();
  String podName="String_Node_Str" + RandomStringUtils.random(5,"String_Node_Str");
  Pod pod=client.pods().create(new PodBuilder().withNewMetadata().withName(podName).withLabels(labels).endMetadata().withNewSpec().withContainers(c).endSpec().build());
  System.out.println("String_Node_Str" + pod.getMetadata().getName());
  decorator=new ContainerExecDecorator(client,pod.getMetadata().getName(),image,client.getNamespace());
}

Fixed version (ground truth):
@Before public void configureCloud() throws Exception {
  client=setupCloud().connect();
  deletePods(client,labels,false);
  String image="String_Node_Str";
  Container c=new ContainerBuilder().withName(image).withImagePullPolicy("String_Node_Str").withImage(image).withCommand("String_Node_Str").withTty(true).build();
  String podName="String_Node_Str" + RandomStringUtils.random(5,"String_Node_Str");
  pod=client.pods().create(new PodBuilder().withNewMetadata().withName(podName).withLabels(labels).endMetadata().withNewSpec().withContainers(c).endSpec().build());
  System.out.println("String_Node_Str" + pod.getMetadata().getName());
  decorator=new ContainerExecDecorator(client,pod.getMetadata().getName(),image,client.getNamespace());
}
Program: 41298
Project: 41298
Buggy source:
@Test public void testCommandExecutionWithNohup() throws Exception {
  ProcReturn r=execCommand(false,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  assertFalse("String_Node_Str" + r.output,PID_PATTERN.matcher(r.output).find());
  assertEquals(0,r.exitCode);
  assertFalse(r.proc.isAlive());
}

Fixed version (ground truth):
@Test public void testCommandExecutionWithNohup() throws Exception {
  ProcReturn r=execCommand(false,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  assertTrue("String_Node_Str" + r.output,PID_PATTERN.matcher(r.output).find());
  assertEquals(0,r.exitCode);
  assertFalse(r.proc.isAlive());
}
Program: 41299
Project: 41299
Buggy source:
@Test public void testCommandExecutionWithNohupAndError() throws Exception {
  ProcReturn r=execCommand(false,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  assertFalse("String_Node_Str" + r.output,PID_PATTERN.matcher(r.output).find());
  assertEquals(127,r.exitCode);
  assertFalse(r.proc.isAlive());
}

Fixed version (ground truth):
@Test public void testCommandExecutionWithNohupAndError() throws Exception {
  ProcReturn r=execCommand(false,"String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str");
  assertEquals(127,r.exitCode);
  assertFalse(r.proc.isAlive());
}
Program: 41300
Project: 41300
Buggy source:
@Test(timeout=10000) public void testCommandExecution() throws Exception {
  Thread[] t=new Thread[10];
  List<ProcReturn> results=new ArrayList<>(t.length);
  for (int i=0; i < t.length; i++) {
    t[i]=newThread(i,results);
  }
  for (int i=0; i < t.length; i++) {
    t[i].start();
  }
  for (int i=0; i < t.length; i++) {
    t[i].join();
  }
  assertEquals("String_Node_Str",t.length,results.size());
  for (  ProcReturn r : results) {
    assertTrue("String_Node_Str" + r.output,PID_PATTERN.matcher(r.output).find());
    assertEquals(0,r.exitCode);
    assertFalse(r.proc.isAlive());
  }
}

Fixed version (ground truth):
@Test(timeout=10000) public void testCommandExecution() throws Exception {
  Thread[] t=new Thread[10];
  List<ProcReturn> results=Collections.synchronizedList(new ArrayList<>(t.length));
  for (int i=0; i < t.length; i++) {
    t[i]=newThread(i,results);
  }
  for (int i=0; i < t.length; i++) {
    t[i].start();
  }
  for (int i=0; i < t.length; i++) {
    t[i].join();
  }
  assertEquals("String_Node_Str",t.length,results.size());
  for (  ProcReturn r : results) {
    assertTrue("String_Node_Str" + r.output,PID_PATTERN.matcher(r.output).find());
    assertEquals(0,r.exitCode);
    assertFalse(r.proc.isAlive());
  }
}
Program: 41301
Project: 41301
Buggy source:
@Test @LocalData() public void upgradeFrom_0_12(){
  KubernetesCloud cloud=r.jenkins.clouds.get(KubernetesCloud.class);
  List<PodTemplate> templates=cloud.getTemplates();
  assertPodTemplates(templates);
  assertEquals(Arrays.asList(new KeyValueEnvVar("String_Node_Str","String_Node_Str"),new KeyValueEnvVar("String_Node_Str","String_Node_Str")),templates.get(0).getEnvVars());
}

Fixed version (ground truth):
@Test @LocalData() public void upgradeFrom_0_12() throws Exception {
  List<PodTemplate> templates=cloud.getTemplates();
  assertPodTemplates(templates);
  assertEquals(Arrays.asList(new KeyValueEnvVar("String_Node_Str","String_Node_Str"),new KeyValueEnvVar("String_Node_Str","String_Node_Str")),templates.get(0).getEnvVars());
}
Program: 41302
Project: 41302
Buggy source:
@Test @LocalData() public void upgradeFrom_0_8(){
  KubernetesCloud cloud=r.jenkins.clouds.get(KubernetesCloud.class);
  List<PodTemplate> templates=cloud.getTemplates();
  assertPodTemplates(templates);
}

Fixed version (ground truth):
@Test @LocalData() public void upgradeFrom_0_8() throws Exception {
  List<PodTemplate> templates=cloud.getTemplates();
  assertPodTemplates(templates);
}
Program: 41305
Project: 41305
Buggy source:
@Override public void kill(Map<String,String> modelEnvVars) throws IOException, InterruptedException {
  getListener().getLogger().println("String_Node_Str");
  ContainerExecDecorator.this.close();
}

Fixed version (ground truth):
@Override public void kill(Map<String,String> modelEnvVars) throws IOException, InterruptedException {
  getListener().getLogger().println("String_Node_Str");
}
Program: 41306
Project: 41306
Buggy source:
@Override public int join() throws IOException, InterruptedException {
  LOGGER.log(Level.FINEST,"String_Node_Str",finished);
  finished.await();
  LOGGER.log(Level.FINEST,"String_Node_Str",finished);
  try {
    return exitCode.call();
  }
 catch (  Exception e) {
    LOGGER.log(Level.WARNING,"String_Node_Str",e);
    return -1;
  }
 finally {
    watch.close();
  }
}

Fixed version (ground truth):
@Override public int join() throws IOException, InterruptedException {
  try {
    LOGGER.log(Level.FINEST,"String_Node_Str",finished);
    finished.await();
    LOGGER.log(Level.FINEST,"String_Node_Str",finished);
    return exitCode.call();
  }
 catch (  Exception e) {
    LOGGER.log(Level.WARNING,"String_Node_Str",e);
    return -1;
  }
 finally {
    try {
      watch.close();
    }
 catch (    Exception e) {
      LOGGER.log(Level.INFO,"String_Node_Str",e);
    }
  }
}
Program: 41307
Project: 41307
Buggy source:
@Override public void stop(Throwable cause) throws Exception {
  LOGGER.log(Level.FINE,"String_Node_Str");
  closeQuietly(client,decorator);
}

Fixed version (ground truth):
@Override public void stop(Throwable cause) throws Exception {
  LOGGER.log(Level.FINE,"String_Node_Str");
  closeQuietly(client);
}