nus-yam/ex-repair huggingface dataset:
Program: 27235
Project: 27235
Buggy source:
@Override public String getQuery(){
  if (isChanged || mQuery.length() == 0) {
    isChanged=false;
    mQuery=new StringBuilder();
    Set<String> keys=mParams.keySet();
    int count=0;
    for (    String key : keys) {
      appendParam(mParams.get(key));
      if (count < keys.size() - 1) {
        appendSpaceSeparated("String_Node_Str");
      }
    }
  }
  return mQuery.toString();
}

Fixed version (ground truth):
@Override public String getQuery(){
  if (isChanged || mQuery.length() == 0) {
    isChanged=false;
    mQuery=new StringBuilder();
    Set<String> keys=mParams.keySet();
    int count=0;
    for (    String key : keys) {
      appendParam(mParams.get(key));
      if (count < keys.size() - 1) {
        appendSpaceSeparated("String_Node_Str");
      }
      count++;
    }
  }
  return mQuery.toString();
}
Program: 27237
Project: 27237
Buggy source:
/** 
 * Gets all of the primary fields from the specified class.
 * @param outFields
 * @param inClass
 * @return
 */
public static List<Field> getPrimaryColumnFields(List<Field> outFields,Class<?> inClass){
  for (  Field field : inClass.getDeclaredFields()) {
    Column column=field.getAnnotation(Column.class);
    if (column != null && (column.columnType().type() == ColumnType.PRIMARY_KEY || column.columnType().type() == ColumnType.PRIMARY_KEY_AUTO_INCREMENT)) {
      outFields.add(field);
    }
  }
  if (inClass.getSuperclass() != null && !inClass.getSuperclass().equals(Model.class)) {
    outFields=getAllColumns(outFields,inClass.getSuperclass());
  }
  return outFields;
}

Fixed version (ground truth):
/** 
 * Gets all of the primary fields from the specified class.
 * @param outFields
 * @param inClass
 * @return
 */
public static List<Field> getPrimaryColumnFields(List<Field> outFields,Class<?> inClass){
  for (  Field field : inClass.getDeclaredFields()) {
    if (StructureUtils.isPrimaryKey(field)) {
      outFields.add(field);
    }
  }
  if (inClass.getSuperclass() != null && !inClass.getSuperclass().equals(Model.class)) {
    outFields=getAllColumns(outFields,inClass.getSuperclass());
  }
  return outFields;
}
Program: 27238
Project: 27238
Buggy source:
public void initialize(DBConfiguration dbConfiguration,DatabaseHelperListener helperListener){
  mDbConfiguration=dbConfiguration;
  mStructure=new DBStructure(dbConfiguration);
  mHelper=new FlowSQLiteOpenHelper(dbConfiguration);
  mHelper.setDatabaseListener(helperListener);
}

Fixed version (ground truth):
public void initialize(DBConfiguration dbConfiguration,DatabaseHelperListener helperListener){
  mDbConfiguration=dbConfiguration;
  mStructure=new DBStructure(dbConfiguration);
  mHelper=new FlowSQLiteOpenHelper(dbConfiguration);
  mHelper.setDatabaseListener(helperListener);
  getHelper().getWritableDatabase();
}
Program: 27239
Project: 27239
Buggy source:
public static void initialize(DBConfiguration dbConfiguration,DatabaseHelperListener databaseHelperListener){
  cache=new ModelCache();
  cache.initialize(dbConfiguration,databaseHelperListener);
}

Fixed version (ground truth):
public static void initialize(DBConfiguration dbConfiguration,DatabaseHelperListener databaseHelperListener){
  if (!isInitialized) {
    getCache().initialize(dbConfiguration,databaseHelperListener);
  }
 else {
    FlowLog.v(FlowManager.class.getSimpleName(),"String_Node_Str");
  }
}
Program: 27240
Project: 27240
Buggy source:
/** 
 * If foreign keys are supported, we turn it on the DB.
 * @param database
 */
private void checkForeignKeySupport(SQLiteDatabase database){
  if (foreignKeysSupported) {
    database.execSQL("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * If foreign keys are supported, we turn it on the DB.
 * @param database
 */
private void checkForeignKeySupport(SQLiteDatabase database){
  if (foreignKeysSupported) {
    database.execSQL("String_Node_Str");
    FlowLog.i(getClass().getSimpleName(),"String_Node_Str");
  }
}
Program: 27241
Project: 27241
Buggy source:
/** 
 * Deletes all of the models in the specified table with the   {@link com.raizlabs.android.dbflow.runtime.transaction.DeleteTransaction.DeleteWhereArgs}on the   {@link com.raizlabs.android.dbflow.runtime.DBTransactionQueue}
 * @param transctionInfo The information on how we should approach this request.
 * @param deleteWhereArgs The arguments of the deletion
 * @param table The table to delete models from.
 * @param < ModelClass > The class that implements {@link com.raizlabs.android.dbflow.structure.Model}.
 */
public <ModelClass extends Model>void deleteModelsWithQuery(DBTransactionInfo transctionInfo,DeleteTransaction.DeleteWhereArgs deleteWhereArgs,Class<ModelClass> table){
  addTransaction(new DeleteTransaction<ModelClass>(transctionInfo,deleteWhereArgs,table));
}

Fixed version (ground truth):
/** 
 * Deletes all of the models in the specified table with the   {@link com.raizlabs.android.dbflow.sql.builder.AbstractWhereQueryBuilder}on the   {@link com.raizlabs.android.dbflow.runtime.DBTransactionQueue}
 * @param transctionInfo The information on how we should approach this request.
 * @param whereQueryBuilder The where arguments of the deletion
 * @param table The table to delete models from.
 * @param < ModelClass > The class that implements {@link com.raizlabs.android.dbflow.structure.Model}.
 */
public <ModelClass extends Model>void deleteModelsWithQuery(DBTransactionInfo transctionInfo,AbstractWhereQueryBuilder<ModelClass> whereQueryBuilder,Class<ModelClass> table){
  addTransaction(new DeleteTransaction<ModelClass>(transctionInfo,whereQueryBuilder,table));
}
Program: 27242
Project: 27242
Buggy source:
/** 
 * Saves al of the passed in models to the   {@link com.raizlabs.android.dbflow.runtime.DBBatchSaveQueue}. This method is recommended for saving large amounts of continuous data as to batch up as much data as possible in a save.
 * @param models The list of models to save
 * @param < ModelClass > The class that implements {@link com.raizlabs.android.dbflow.structure.Model}.
 */
public <ModelClass extends Model>void saveOnSaveQueue(Collection<ModelClass> models){
  getSaveQueue().addAll(models);
}

Fixed version (ground truth):
/** 
 * Saves all of the passed in models to the   {@link com.raizlabs.android.dbflow.runtime.DBBatchSaveQueue}. This method is recommended for saving large amounts of continuous data as to batch up as much data as possible in a save.
 * @param models The list of models to save
 * @param < ModelClass > The class that implements {@link com.raizlabs.android.dbflow.structure.Model}.
 */
public <ModelClass extends Model>void saveOnSaveQueue(Collection<ModelClass> models){
  getSaveQueue().addAll(models);
}
Program: 27243
Project: 27243
Buggy source:
public Where<ModelClass> params(Map<String,String> params){
  mWhereQueryBuilder.params(params);
  return this;
}

Fixed version (ground truth):
public Where<ModelClass> params(Map<String,WhereQueryBuilder.WhereArgs> params){
  mWhereQueryBuilder.params(params);
  return this;
}
Program: 27244
Project: 27244
Buggy source:
public Where<ModelClass> param(String key,Object value){
  mWhereQueryBuilder.param(key,value);
  return this;
}

Fixed version (ground truth):
public Where<ModelClass> param(String key,WhereQueryBuilder.WhereArgs whereArgs){
  mWhereQueryBuilder.param(key,whereArgs);
  return this;
}
Program: 27245
Project: 27245
Buggy source:
protected char[] ensurePadding(char[] chars){
  char[] result=chars;
  int paddingCount=chars.length % 4;
  if (paddingCount > 0) {
    result=new char[chars.length + paddingCount];
    System.arraycopy(chars,0,result,0,chars.length);
    for (int i=0; i < paddingCount; i++) {
      result[chars.length + i]='=';
    }
  }
  return result;
}

Fixed version (ground truth):
protected char[] ensurePadding(char[] chars){
  char[] result=chars;
  int paddingCount=0;
  int remainder=chars.length % 4;
  if (remainder == 2 || remainder == 3) {
    paddingCount=4 - remainder;
  }
  if (paddingCount > 0) {
    result=new char[chars.length + paddingCount];
    System.arraycopy(chars,0,result,0,chars.length);
    for (int i=0; i < paddingCount; i++) {
      result[chars.length + i]='=';
    }
  }
  return result;
}
Program: 27246
Project: 27246
Buggy source:
@Override public <T>T parse(String compact,JwtHandler<T> handler) throws MalformedJwtException, SignatureException {
  Assert.notNull(handler,"String_Node_Str");
  Assert.hasText(compact,"String_Node_Str");
  Jwt jwt=parse(compact);
  if (jwt instanceof Jws) {
    Jws jws=(Jws)jwt;
    Object body=jws.getBody();
    if (body instanceof Claims) {
      return handler.onClaimsJws(jws);
    }
 else {
      return handler.onPlaintextJws(jws);
    }
  }
 else {
    Object body=jwt.getBody();
    if (body instanceof Claims) {
      return handler.onPlaintextJwt(jwt);
    }
 else {
      return handler.onClaimsJwt(jwt);
    }
  }
}

Fixed version (ground truth):
@Override public <T>T parse(String compact,JwtHandler<T> handler) throws MalformedJwtException, SignatureException {
  Assert.notNull(handler,"String_Node_Str");
  Assert.hasText(compact,"String_Node_Str");
  Jwt jwt=parse(compact);
  if (jwt instanceof Jws) {
    Jws jws=(Jws)jwt;
    Object body=jws.getBody();
    if (body instanceof Claims) {
      return handler.onClaimsJws((Jws<Claims>)jws);
    }
 else {
      return handler.onPlaintextJws((Jws<String>)jws);
    }
  }
 else {
    Object body=jwt.getBody();
    if (body instanceof Claims) {
      return handler.onClaimsJwt((Jwt<Header,Claims>)jwt);
    }
 else {
      return handler.onPlaintextJwt((Jwt<Header,String>)jwt);
    }
  }
}
Program: 27248
Project: 27248
Buggy source:
public void setVerticalFlingEnabled(boolean enabled){
  mVerticalFlingEnabled=enabled;
}

Fixed version (ground truth):
/** 
 * Set whether the week view should fling vertically.
 * @return True if it should have vertical fling enabled.
 */
public void setVerticalFlingEnabled(boolean enabled){
  mVerticalFlingEnabled=enabled;
}
Program: 27249
Project: 27249
Buggy source:
public void setHorizontalFlingEnabled(boolean enabled){
  mHorizontalFlingEnabled=enabled;
}

Fixed version (ground truth):
/** 
 * Set whether the week view should fling horizontally.
 * @return True if it should have horizontal fling enabled.
 */
public void setHorizontalFlingEnabled(boolean enabled){
  mHorizontalFlingEnabled=enabled;
}
Program: 27250
Project: 27250
Buggy source:
public boolean isHorizontalFlingEnabled(){
  return mHorizontalFlingEnabled;
}

Fixed version (ground truth):
/** 
 * Get whether the week view should fling horizontally.
 * @return True if the week view has horizontal fling enabled.
 */
public boolean isHorizontalFlingEnabled(){
  return mHorizontalFlingEnabled;
}
Program: 27251
Project: 27251
Buggy source:
public boolean isVerticalFlingEnabled(){
  return mVerticalFlingEnabled;
}

Fixed version (ground truth):
/** 
 * Get whether the week view should fling vertically.
 * @return True if the week view has vertical fling enabled.
 */
public boolean isVerticalFlingEnabled(){
  return mVerticalFlingEnabled;
}
Program: 27254
Project: 27254
Buggy source:
@Override public void computeScroll(){
  super.computeScroll();
  if (mScroller.isFinished()) {
    if (mCurrentFlingDirection != Direction.NONE) {
      goToNearestOrigin();
    }
  }
 else {
    if (mScroller.computeScrollOffset()) {
      mCurrentOrigin.y=mScroller.getCurrY();
      mCurrentOrigin.x=mScroller.getCurrX();
      ViewCompat.postInvalidateOnAnimation(this);
    }
  }
}

Fixed version (ground truth):
@Override public void computeScroll(){
  super.computeScroll();
  if (mScroller.isFinished()) {
    if (mCurrentFlingDirection != Direction.NONE) {
      goToNearestOrigin();
    }
  }
 else {
    if (mCurrentFlingDirection != Direction.NONE && forceFinishScroll()) {
      goToNearestOrigin();
    }
 else     if (mScroller.computeScrollOffset()) {
      mCurrentOrigin.y=mScroller.getCurrY();
      mCurrentOrigin.x=mScroller.getCurrX();
      ViewCompat.postInvalidateOnAnimation(this);
    }
  }
}
Program: 27255
Project: 27255
Buggy source:
@Override public boolean onTouchEvent(MotionEvent event){
  mScaleDetector.onTouchEvent(event);
  boolean val=mGestureDetector.onTouchEvent(event);
  if (event.getAction() == MotionEvent.ACTION_UP && !mIsZooming && mCurrentFlingDirection == Direction.NONE) {
    if (mCurrentScrollDirection == Direction.HORIZONTAL) {
      goToNearestOrigin();
    }
    mCurrentScrollDirection=Direction.NONE;
  }
  return val;
}

Fixed version (ground truth):
@Override public boolean onTouchEvent(MotionEvent event){
  mScaleDetector.onTouchEvent(event);
  boolean val=mGestureDetector.onTouchEvent(event);
  if (event.getAction() == MotionEvent.ACTION_UP && !mIsZooming && mCurrentFlingDirection == Direction.NONE) {
    if (mCurrentScrollDirection == Direction.RIGHT || mCurrentScrollDirection == Direction.LEFT) {
      goToNearestOrigin();
    }
    mCurrentScrollDirection=Direction.NONE;
  }
  return val;
}
Program: 27256
Project: 27256
Buggy source:
private void goToNearestOrigin(){
  float leftDays=Math.round(mCurrentOrigin.x / (mWidthPerDay + mColumnGap));
  int nearestOrigin=(int)(mCurrentOrigin.x - leftDays * (mWidthPerDay + mColumnGap));
  if (nearestOrigin != 0) {
    mScroller.forceFinished(true);
    mScroller.startScroll((int)mCurrentOrigin.x,(int)mCurrentOrigin.y,-nearestOrigin,0,50);
    ViewCompat.postInvalidateOnAnimation(WeekView.this);
  }
  mCurrentScrollDirection=mCurrentFlingDirection=Direction.NONE;
}

Fixed version (ground truth):
private void goToNearestOrigin(){
  double leftDays=mCurrentOrigin.x / (mWidthPerDay + mColumnGap);
  if (mCurrentFlingDirection != Direction.NONE) {
    leftDays=Math.round(leftDays);
  }
 else   if (mCurrentScrollDirection == Direction.LEFT) {
    leftDays=Math.floor(leftDays);
  }
 else   if (mCurrentScrollDirection == Direction.RIGHT) {
    leftDays=Math.ceil(leftDays);
  }
 else {
    leftDays=Math.round(leftDays);
  }
  int nearestOrigin=(int)(mCurrentOrigin.x - leftDays * (mWidthPerDay + mColumnGap));
  if (nearestOrigin != 0) {
    mScroller.forceFinished(true);
    mScroller.startScroll((int)mCurrentOrigin.x,(int)mCurrentOrigin.y,-nearestOrigin,0,(int)(Math.abs(nearestOrigin) / mWidthPerDay * 500));
    ViewCompat.postInvalidateOnAnimation(WeekView.this);
  }
  mCurrentScrollDirection=mCurrentFlingDirection=Direction.NONE;
}
Program: 27260
Project: 27260
Buggy source:
/** 
 * Show a specific day on the week view.
 * @param date The date to show.
 */
public void goToDate(Calendar date){
  mScroller.forceFinished(true);
  date.set(Calendar.HOUR_OF_DAY,0);
  date.set(Calendar.MINUTE,0);
  date.set(Calendar.SECOND,0);
  date.set(Calendar.MILLISECOND,0);
  if (mAreDimensionsInvalid) {
    mScrollToDay=date;
    return;
  }
  mRefreshEvents=true;
  Calendar today=Calendar.getInstance();
  today.set(Calendar.HOUR_OF_DAY,0);
  today.set(Calendar.MINUTE,0);
  today.set(Calendar.SECOND,0);
  today.set(Calendar.MILLISECOND,0);
  int dateDifference=(int)((date.getTimeInMillis() - today.getTimeInMillis()) / (1000 * 60 * 60* 24));
  mCurrentOrigin.x=-dateDifference * (mWidthPerDay + mColumnGap);
  invalidate();
}

Fixed version (ground truth):
/** 
 * Show a specific day on the week view.
 * @param date The date to show.
 */
public void goToDate(Calendar date){
  mScroller.forceFinished(true);
  date.set(Calendar.HOUR_OF_DAY,0);
  date.set(Calendar.MINUTE,0);
  date.set(Calendar.SECOND,0);
  date.set(Calendar.MILLISECOND,0);
  if (mAreDimensionsInvalid) {
    mScrollToDay=date;
    return;
  }
  mRefreshEvents=true;
  Calendar today=Calendar.getInstance();
  today.set(Calendar.HOUR_OF_DAY,0);
  today.set(Calendar.MINUTE,0);
  today.set(Calendar.SECOND,0);
  today.set(Calendar.MILLISECOND,0);
  long dateInMillis=date.getTimeInMillis() + date.getTimeZone().getOffset(date.getTimeInMillis());
  long todayInMillis=today.getTimeInMillis() + today.getTimeZone().getOffset(today.getTimeInMillis());
  int dateDifference=(int)((dateInMillis - todayInMillis) / (1000 * 60 * 60* 24));
  mCurrentOrigin.x=-dateDifference * (mWidthPerDay + mColumnGap);
  invalidate();
}
Program: 27262
Project: 27262
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_pull_to_zoom_scroll_view);
  getSupportActionBar().setDisplayHomeAsUpEnabled(true);
  scrollView=(PullToZoomScrollViewEx)findViewById(R.id.scroll_view);
  scrollView.getRootView().findViewById(R.id.tv_test1).setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      Log.e("String_Node_Str","String_Node_Str");
    }
  }
);
  DisplayMetrics localDisplayMetrics=new DisplayMetrics();
  getWindowManager().getDefaultDisplay().getMetrics(localDisplayMetrics);
  int mScreenHeight=localDisplayMetrics.heightPixels;
  int mScreenWidth=localDisplayMetrics.widthPixels;
  LinearLayout.LayoutParams localObject=new LinearLayout.LayoutParams(mScreenWidth,(int)(9.0F * (mScreenWidth / 16.0F)));
  scrollView.setHeaderLayoutParams(localObject);
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_pull_to_zoom_scroll_view);
  getSupportActionBar().setDisplayHomeAsUpEnabled(true);
  scrollView=(PullToZoomScrollViewEx)findViewById(R.id.scroll_view);
  scrollView.getPullRootView().findViewById(R.id.tv_test1).setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      Log.e("String_Node_Str","String_Node_Str");
    }
  }
);
  scrollView.getPullRootView().findViewById(R.id.tv_test2).setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      Log.e("String_Node_Str","String_Node_Str");
    }
  }
);
  scrollView.getPullRootView().findViewById(R.id.tv_test3).setOnClickListener(new View.OnClickListener(){
    @Override public void onClick(    View v){
      Log.e("String_Node_Str","String_Node_Str");
    }
  }
);
  DisplayMetrics localDisplayMetrics=new DisplayMetrics();
  getWindowManager().getDefaultDisplay().getMetrics(localDisplayMetrics);
  int mScreenHeight=localDisplayMetrics.heightPixels;
  int mScreenWidth=localDisplayMetrics.widthPixels;
  LinearLayout.LayoutParams localObject=new LinearLayout.LayoutParams(mScreenWidth,(int)(9.0F * (mScreenWidth / 16.0F)));
  scrollView.setHeaderLayoutParams(localObject);
}
Program: 27263
Project: 27263
Buggy source:
/** 
 * 创建listView 如果要兼容API9,需要修改此处
 * @param context 上下文
 * @param attrs   AttributeSet
 * @return ListView
 */
@Override protected ListView createRootView(Context context,AttributeSet attrs){
  return new ListView(context,attrs);
}

Fixed version (ground truth):
/** 
 * 创建listView 如果要兼容API9,需要修改此处
 * @param context 上下文
 * @param attrs   AttributeSet
 * @return ListView
 */
@Override protected ListView createRootView(Context context,AttributeSet attrs){
  ListView lv=new ListView(context,attrs);
  lv.setId(android.R.id.list);
  return lv;
}
Program: 27264
Project: 27264
Buggy source:
@Override protected ScrollView createRootView(Context context,AttributeSet attrs){
  return new InternalScrollView(context,attrs);
}

Fixed version (ground truth):
@Override protected ScrollView createRootView(Context context,AttributeSet attrs){
  ScrollView scrollView=new InternalScrollView(context,attrs);
  scrollView.setId(R.id.scrollview);
  return scrollView;
}
Program: 27265
Project: 27265
Buggy source:
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_pull_to_zoom_list_view);
  getSupportActionBar().setDisplayHomeAsUpEnabled(true);
  listView=(PullToZoomListView)findViewById(R.id.listview);
  String[] adapterData=new String[]{"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"};
  listView.setAdapter(new ArrayAdapter<String>(PullToZoomListActivity.this,android.R.layout.simple_list_item_1,adapterData));
}

Fixed version (ground truth):
@Override protected void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setContentView(R.layout.activity_pull_to_zoom_list_view);
  getSupportActionBar().setDisplayHomeAsUpEnabled(true);
  listView=(PullToZoomListViewEx)findViewById(R.id.listview);
  String[] adapterData=new String[]{"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"};
  listView.setAdapter(new ArrayAdapter<String>(PullToZoomListActivity.this,android.R.layout.simple_list_item_1,adapterData));
  listView.setOnItemClickListener(new AdapterView.OnItemClickListener(){
    @Override public void onItemClick(    AdapterView<?> parent,    View view,    int position,    long id){
      Log.e("String_Node_Str","String_Node_Str" + position);
    }
  }
);
}
Program: 27266
Project: 27266
Buggy source:
@Override public boolean onOptionsItemSelected(MenuItem item){
  int id=item.getItemId();
  if (id == android.R.id.home) {
    finish();
    return true;
  }
 else   if (id == R.id.action_normal) {
    listView.setParallax(false);
    return true;
  }
 else   if (id == R.id.action_parallax) {
    listView.setParallax(true);
    return true;
  }
 else   if (id == R.id.action_show_head) {
    listView.showHeadView();
    return true;
  }
 else   if (id == R.id.action_hide_head) {
    listView.hideHeadView();
    return true;
  }
 else   if (id == R.id.action_disable_zoom) {
    listView.setEnableZoom(false);
    return true;
  }
 else   if (id == R.id.action_enable_zoom) {
    listView.setEnableZoom(true);
    return true;
  }
  return super.onOptionsItemSelected(item);
}

Fixed version (ground truth):
@Override public boolean onOptionsItemSelected(MenuItem item){
  int id=item.getItemId();
  if (id == android.R.id.home) {
    finish();
    return true;
  }
 else   if (id == R.id.action_normal) {
    listView.setParallax(false);
    return true;
  }
 else   if (id == R.id.action_parallax) {
    listView.setParallax(true);
    return true;
  }
 else   if (id == R.id.action_show_head) {
    listView.setHideHeader(false);
    return true;
  }
 else   if (id == R.id.action_hide_head) {
    listView.setHideHeader(true);
    return true;
  }
 else   if (id == R.id.action_disable_zoom) {
    listView.setZoomEnabled(false);
    return true;
  }
 else   if (id == R.id.action_enable_zoom) {
    listView.setZoomEnabled(true);
    return true;
  }
  return super.onOptionsItemSelected(item);
}
Program: 27270
Project: 27270
Buggy source:
public void setView(View view){
  LinearLayout l=(LinearLayout)mAlertDialogWindow.findViewById(R.id.contentView);
  l.removeAllViews();
  l.addView(view);
}

Fixed version (ground truth):
public void setView(View view){
  LinearLayout l=(LinearLayout)mAlertDialogWindow.findViewById(R.id.contentView);
  l.removeAllViews();
  ViewGroup.LayoutParams layoutParams=new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,ViewGroup.LayoutParams.WRAP_CONTENT);
  view.setLayoutParams(layoutParams);
  l.addView(view);
}
Program: 27271
Project: 27271
Buggy source:
public void setContentView(View contentView){
  LinearLayout linearLayout=(LinearLayout)mAlertDialogWindow.findViewById(R.id.message_content_view);
  if (linearLayout != null) {
    linearLayout.removeAllViews();
    linearLayout.addView(contentView);
  }
}

Fixed version (ground truth):
public void setContentView(View contentView){
  ViewGroup.LayoutParams layoutParams=new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,ViewGroup.LayoutParams.WRAP_CONTENT);
  contentView.setLayoutParams(layoutParams);
  LinearLayout linearLayout=(LinearLayout)mAlertDialogWindow.findViewById(R.id.message_content_view);
  if (linearLayout != null) {
    linearLayout.removeAllViews();
    linearLayout.addView(contentView);
  }
}
Program: 27272
Project: 27272
Buggy source:
public void setDefaultRippleAlpha(int alpha){
  this.rippleAlpha=alpha;
  paint.setAlpha(alpha);
}

Fixed version (ground truth):
public void setDefaultRippleAlpha(int alpha){
  this.rippleAlpha=alpha;
  paint.setAlpha(alpha);
  invalidate();
}
Program: 27273
Project: 27273
Buggy source:
public void setRippleColor(int rippleColor){
  this.rippleColor=rippleColor;
  paint.setColor(rippleColor);
}

Fixed version (ground truth):
public void setRippleColor(int rippleColor){
  this.rippleColor=rippleColor;
  paint.setColor(rippleColor);
  paint.setAlpha(rippleAlpha);
  invalidate();
}
Program: 27274
Project: 27274
Buggy source:
public void setRippleBackground(int color){
  this.rippleBackground=new ColorDrawable(color);
}

Fixed version (ground truth):
public void setRippleBackground(int color){
  rippleBackground=new ColorDrawable(color);
  rippleBackground.setBounds(bounds);
  invalidate();
}
Program: 27275
Project: 27275
Buggy source:
public MenuItem setVisible(boolean visible){
  mFlags=(mFlags & HIDDEN) | (visible ? 0 : HIDDEN);
  return this;
}

Fixed version (ground truth):
public MenuItem setVisible(boolean visible){
  mFlags=(mFlags & ~HIDDEN) | (visible ? 0 : HIDDEN);
  return this;
}
Program: 27276
Project: 27276
Buggy source:
private void dismiss(View view,float yvel){
  mDragHelper.smoothSlideViewTo(view,0,top + height);
  mDragHelper.cancel();
  ViewCompat.postInvalidateOnAnimation(ClosableSlidingLayout.this);
}

Fixed version (ground truth):
private void dismiss(View view,float yvel){
  mDragHelper.smoothSlideViewTo(view,0,top + height);
  ViewCompat.postInvalidateOnAnimation(ClosableSlidingLayout.this);
}
Program: 27277
Project: 27277
Buggy source:
@Override public void onViewPositionChanged(View changedView,int left,int top,int dx,int dy){
  if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) {
    invalidate();
  }
  if (height - top < 1 && mListener != null) {
    mListener.onClosed();
  }
}

Fixed version (ground truth):
@Override public void onViewPositionChanged(View changedView,int left,int top,int dx,int dy){
  if (Build.VERSION.SDK_INT < Build.VERSION_CODES.HONEYCOMB) {
    invalidate();
  }
  if (height - top < 1 && mListener != null) {
    mDragHelper.cancel();
    mListener.onClosed();
    mDragHelper.smoothSlideViewTo(changedView,0,top);
  }
}
Program: 27278
Project: 27278
Buggy source:
@Override public void onViewReleased(View releasedChild,float xvel,float yvel){
  if (yvel > MINVEL) {
    dismiss(releasedChild,yvel);
  }
 else {
    if (releasedChild.getTop() >= top + height / 2) {
      dismiss(releasedChild,yvel);
    }
 else {
      mDragHelper.smoothSlideViewTo(releasedChild,0,top);
    }
  }
  ViewCompat.postInvalidateOnAnimation(ClosableSlidingLayout.this);
}

Fixed version (ground truth):
@Override public void onViewReleased(View releasedChild,float xvel,float yvel){
  if (yvel > MINVEL) {
    dismiss(releasedChild,yvel);
  }
 else {
    if (releasedChild.getTop() >= top + height / 2) {
      dismiss(releasedChild,yvel);
    }
 else {
      mDragHelper.smoothSlideViewTo(releasedChild,0,top);
      ViewCompat.postInvalidateOnAnimation(ClosableSlidingLayout.this);
    }
  }
}
Program: 27281
Project: 27281
Buggy source:
public static int getDaysInMonth(int month,int year){
switch (month) {
case Calendar.JANUARY:
case Calendar.MARCH:
case Calendar.MAY:
case Calendar.JULY:
case Calendar.AUGUST:
case Calendar.OCTOBER:
case Calendar.DECEMBER:
    return 31;
case Calendar.APRIL:
case Calendar.JUNE:
case Calendar.SEPTEMBER:
case Calendar.NOVEMBER:
  return 30;
case Calendar.FEBRUARY:
return ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)) ? 28 : 29;
default :
throw new IllegalArgumentException("String_Node_Str");
}
}

Fixed version (ground truth):
public static int getDaysInMonth(int month,int year){
switch (month) {
case Calendar.JANUARY:
case Calendar.MARCH:
case Calendar.MAY:
case Calendar.JULY:
case Calendar.AUGUST:
case Calendar.OCTOBER:
case Calendar.DECEMBER:
    return 31;
case Calendar.APRIL:
case Calendar.JUNE:
case Calendar.SEPTEMBER:
case Calendar.NOVEMBER:
  return 30;
case Calendar.FEBRUARY:
return ((year % 4 == 0 && year % 100 != 0) || (year % 400 == 0)) ? 29 : 28;
default :
throw new IllegalArgumentException("String_Node_Str");
}
}
Program: 27282
Project: 27282
Buggy source:
/** 
 * Method to replace String.join, since it was only introduced in java8
 * @param array the array to be concatenated
 * @return concatenated String
 */
private String stringJoin(String[] array){
  String joined="String_Node_Str";
  for (  String str : array)   joined+=str;
  return joined;
}

Fixed version (ground truth):
/** 
 * Method to replace String.join, since it was only introduced in java8
 * @param array the array to be concatenated
 * @return concatenated String
 */
private String stringJoin(String[] array,int count){
  String joined="String_Node_Str";
  for (int i=0; i < count; i++)   joined+=array[i];
  return joined;
}
Program: 27283
Project: 27283
Buggy source:
/** 
 * Constructor for the Emoji.
 * @param description         The description of the emoji
 * @param supportsFitzpatrick wether the emoji supports the Fitzpatrick modifiers or not
 * @param aliases             the aliases for this emoji
 * @param tags                the tags associated with this emoji
 * @param bytes               the bytes that represent the emoji
 */
protected Emoji(String description,boolean supportsFitzpatrick,List<String> aliases,List<String> tags,byte... bytes){
  this.description=description;
  this.supportsFitzpatrick=supportsFitzpatrick;
  this.aliases=Collections.unmodifiableList(aliases);
  this.tags=Collections.unmodifiableList(tags);
  int count=0;
  try {
    this.unicode=new String(bytes,"String_Node_Str");
    int stringLength=getUnicode().length();
    String[] pointCodes=new String[stringLength];
    String[] pointCodesHex=new String[stringLength];
    for (int offset=0; offset < stringLength; ) {
      final int codePoint=getUnicode().codePointAt(offset);
      pointCodes[count]=String.format("String_Node_Str",codePoint);
      pointCodesHex[count++]=String.format("String_Node_Str",codePoint);
      offset+=Character.charCount(codePoint);
    }
    this.htmlDec=stringJoin(pointCodes);
    this.htmlHex=stringJoin(pointCodesHex);
  }
 catch (  UnsupportedEncodingException e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
/** 
 * Constructor for the Emoji.
 * @param description         The description of the emoji
 * @param supportsFitzpatrick wether the emoji supports the Fitzpatrick modifiers or not
 * @param aliases             the aliases for this emoji
 * @param tags                the tags associated with this emoji
 * @param bytes               the bytes that represent the emoji
 */
protected Emoji(String description,boolean supportsFitzpatrick,List<String> aliases,List<String> tags,byte... bytes){
  this.description=description;
  this.supportsFitzpatrick=supportsFitzpatrick;
  this.aliases=Collections.unmodifiableList(aliases);
  this.tags=Collections.unmodifiableList(tags);
  int count=0;
  try {
    this.unicode=new String(bytes,"String_Node_Str");
    int stringLength=getUnicode().length();
    String[] pointCodes=new String[stringLength];
    String[] pointCodesHex=new String[stringLength];
    for (int offset=0; offset < stringLength; ) {
      final int codePoint=getUnicode().codePointAt(offset);
      pointCodes[count]=String.format("String_Node_Str",codePoint);
      pointCodesHex[count++]=String.format("String_Node_Str",codePoint);
      offset+=Character.charCount(codePoint);
    }
    this.htmlDec=stringJoin(pointCodes,count);
    this.htmlHex=stringJoin(pointCodesHex,count);
  }
 catch (  UnsupportedEncodingException e) {
    throw new RuntimeException(e);
  }
}
Program: 27286
Project: 27286
Buggy source:
/** 
 * Adds the specified path to the list of URLs (for   {@code URLClassLoader}) to search for classes and resources. It internally calls   {@code URLClassLoader#addURL}. Some plugins (embulk-input-jdbc, for example) are calling this method to load external JAR files.
 * @see https://github.com/embulk/embulk-input-jdbc/blob/ebfff0b249d507fc730c87e08b56e6aa492060ca/embulk-input-jdbc/src/main/java/org/embulk/input/jdbc/AbstractJdbcInputPlugin.java#L586-L595
 */
public void addPath(Path path){
  try {
    addUrl(path.toUri().toURL());
  }
 catch (  MalformedURLException ex) {
    throw new IllegalArgumentException(ex);
  }
}

Fixed version (ground truth):
/** 
 * Adds the specified path to the list of URLs (for   {@code URLClassLoader}) to search for classes and resources. It internally calls   {@code URLClassLoader#addURL}. Some plugins (embulk-input-jdbc, for example) are calling this method to load external JAR files.
 * @see <a href="https://github.com/embulk/embulk-input-jdbc/blob/ebfff0b249d507fc730c87e08b56e6aa492060ca/embulk-input-jdbc/src/main/java/org/embulk/input/jdbc/AbstractJdbcInputPlugin.java#L586-L595">embulk-input-jdbc</a>
 */
public void addPath(Path path){
  try {
    addUrl(path.toUri().toURL());
  }
 catch (  MalformedURLException ex) {
    throw new IllegalArgumentException(ex);
  }
}
Program: 27287
Project: 27287
Buggy source:
@Test @Ignore("String_Node_Str") public void checkCharacterTypesRuleLongReplace(){
  final String original[]={"String_Node_Str"};
  final String pass_types[]={"String_Node_Str"};
  exception.expect(AssertionError.class);
  checkCharacterTypesRuleInternal(original,original,pass_types,"String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
@Test public void checkCharacterTypesRuleLongReplace(){
  final String original[]={"String_Node_Str"};
  final String pass_types[]={"String_Node_Str"};
  exception.expect(TaskValidationException.class);
  checkCharacterTypesRuleInternal(original,original,pass_types,"String_Node_Str","String_Node_Str");
}
Program: 27288
Project: 27288
Buggy source:
@Test @Ignore("String_Node_Str") public void checkUniqueNumberSuffixRuleNegativeLength(){
  final String originalColumnNames[]={"String_Node_Str"};
  exception.expect(AssertionError.class);
  checkUniqueNumberSuffixRuleInternal(originalColumnNames,originalColumnNames,DEFAULT,-1,-2);
}

Fixed version (ground truth):
@Test public void checkUniqueNumberSuffixRuleNegativeLength(){
  final String originalColumnNames[]={"String_Node_Str"};
  exception.expect(ConfigException.class);
  checkUniqueNumberSuffixRuleInternal(originalColumnNames,originalColumnNames,DEFAULT,-1,-2);
}
Program: 27289
Project: 27289
Buggy source:
@Test @Ignore("String_Node_Str") public void checkCharacterTypesRuleEmptyReplace(){
  final String original[]={"String_Node_Str"};
  final String pass_types[]={"String_Node_Str"};
  exception.expect(AssertionError.class);
  checkCharacterTypesRuleInternal(original,original,pass_types,"String_Node_Str","String_Node_Str");
}

Fixed version (ground truth):
@Test public void checkCharacterTypesRuleEmptyReplace(){
  final String original[]={"String_Node_Str"};
  final String pass_types[]={"String_Node_Str"};
  exception.expect(TaskValidationException.class);
  checkCharacterTypesRuleInternal(original,original,pass_types,"String_Node_Str","String_Node_Str");
}
Program: 27290
Project: 27290
Buggy source:
@Test @Ignore("String_Node_Str") public void checkTruncateRuleNegative(){
  final String original[]={"String_Node_Str"};
  ConfigSource config=Exec.newConfigSource().set("String_Node_Str",ImmutableList.of(ImmutableMap.of("String_Node_Str","String_Node_Str","String_Node_Str",-1)));
  exception.expect(AssertionError.class);
  renameAndCheckSchema(config,original,original);
}

Fixed version (ground truth):
@Test public void checkTruncateRuleNegative(){
  final String original[]={"String_Node_Str"};
  ConfigSource config=Exec.newConfigSource().set("String_Node_Str",ImmutableList.of(ImmutableMap.of("String_Node_Str","String_Node_Str","String_Node_Str",-1)));
  exception.expect(TaskValidationException.class);
  renameAndCheckSchema(config,original,original);
}
Program: 27291
Project: 27291
Buggy source:
private TimestampFormatter[] newTimestampFormatters(TimestampFormatter.Task formatterTask,Schema schema,Map<String,TimestampColumnOption> columnOptions){
  TimestampFormatter[] formatters=new TimestampFormatter[schema.getColumnCount()];
  int i=0;
  for (  Column column : schema.getColumns()) {
    if (column.getType() instanceof TimestampType) {
      Optional<TimestampColumnOption> option=Optional.fromNullable(columnOptions.get(column.getName()));
      formatters[i]=new TimestampFormatter(formatterTask,option);
    }
  }
  return formatters;
}

Fixed version (ground truth):
private TimestampFormatter[] newTimestampFormatters(TimestampFormatter.Task formatterTask,Schema schema,Map<String,TimestampColumnOption> columnOptions){
  TimestampFormatter[] formatters=new TimestampFormatter[schema.getColumnCount()];
  int i=0;
  for (  Column column : schema.getColumns()) {
    if (column.getType() instanceof TimestampType) {
      Optional<TimestampColumnOption> option=Optional.fromNullable(columnOptions.get(column.getName()));
      formatters[i]=new TimestampFormatter(formatterTask,option);
    }
    i++;
  }
  return formatters;
}
Program: 27292
Project: 27292
Buggy source:
public static void main(String[] args) throws Exception {
  System.out.println(Arrays.asList(args));
  File thisFolder=new File(SelfrunTest.class.getResource("String_Node_Str").toURI()).getParentFile();
  try (FileWriter writer=new FileWriter(new File(thisFolder,"String_Node_Str"))){
    for (    String arg : args) {
      writer.write(arg);
      writer.write(System.getProperty("String_Node_Str"));
    }
  }
 }

Fixed version (ground truth):
public static void main(String[] args) throws Exception {
  System.out.println(Arrays.asList(args));
  File thisFolder=new File(SelfrunTest.class.getResource("String_Node_Str").toURI()).getParentFile();
  try (BufferedWriter writer=new BufferedWriter(new OutputStreamWriter(new FileOutputStream(new File(thisFolder,"String_Node_Str")),Charset.defaultCharset()))){
    for (    String arg : args) {
      writer.write(arg);
      writer.newLine();
    }
  }
 }
Program: 27293
Project: 27293
Buggy source:
@BeforeClass public static void prepare() throws Exception {
  File selfrun=findSelfrun();
  FileSystem fs=FileSystems.getDefault();
  String line=new String(Files.readAllBytes(fs.getPath(selfrun.getAbsolutePath())),Charset.defaultCharset());
  File thisFolder=new File(SelfrunTest.class.getResource("String_Node_Str").toURI()).getParentFile();
  testSelfrun=new File(thisFolder,System.getProperty("String_Node_Str").equals("String_Node_Str") ? "String_Node_Str" : "String_Node_Str");
  testSelfrun.setExecutable(true);
  File classpath=thisFolder.getParentFile().getParentFile().getParentFile();
  line=line.replaceAll("String_Node_Str","String_Node_Str" + classpath.getAbsolutePath().replaceAll("String_Node_Str","String_Node_Str") + "String_Node_Str");
  Files.write(fs.getPath(testSelfrun.getAbsolutePath()),line.getBytes(Charset.defaultCharset()),StandardOpenOption.CREATE);
}

Fixed version (ground truth):
@BeforeClass public static void prepare() throws Exception {
  File selfrun=findSelfrun();
  FileSystem fs=FileSystems.getDefault();
  String line=new String(Files.readAllBytes(fs.getPath(selfrun.getAbsolutePath())),Charset.defaultCharset());
  File thisFolder=new File(SelfrunTest.class.getResource("String_Node_Str").toURI()).getParentFile();
  testSelfrun=new File(thisFolder,System.getProperty("String_Node_Str").equals("String_Node_Str") ? "String_Node_Str" : "String_Node_Str");
  File classpath=thisFolder.getParentFile().getParentFile().getParentFile();
  line=line.replaceAll("String_Node_Str","String_Node_Str" + classpath.getAbsolutePath().replaceAll("String_Node_Str","String_Node_Str") + "String_Node_Str");
  Files.write(fs.getPath(testSelfrun.getAbsolutePath()),line.getBytes(Charset.defaultCharset()),StandardOpenOption.CREATE);
  if (!testSelfrun.setExecutable(true)) {
    throw new Exception("String_Node_Str");
  }
}
Program: 27294
Project: 27294
Buggy source:
private List<String> execute(String... arguments) throws Exception {
  File temp=new File(testSelfrun.getParentFile(),"String_Node_Str" + testSelfrun.getName());
  try (FileWriter writer=new FileWriter(temp)){
    writer.write(testSelfrun.getAbsolutePath());
    for (    String argument : arguments) {
      writer.write("String_Node_Str");
      writer.write(argument);
    }
  }
   temp.setExecutable(true);
  File argsFile=new File(testSelfrun.getParentFile(),"String_Node_Str");
  argsFile.delete();
  Process process=Runtime.getRuntime().exec(temp.getAbsolutePath());
  int exitCode=process.waitFor();
  if (exitCode != 0 || !argsFile.exists()) {
    StringBuilder builder=new StringBuilder();
    try (BufferedReader reader=new BufferedReader(new InputStreamReader(process.getErrorStream()))){
      builder.append(reader.readLine());
      builder.append(System.getProperty("String_Node_Str"));
    }
     throw new Exception(builder.toString());
  }
  FileSystem fs=FileSystems.getDefault();
  List<String> args=Files.readAllLines(fs.getPath(argsFile.getAbsolutePath()),Charset.defaultCharset());
  return args;
}

Fixed version (ground truth):
private List<String> execute(String... arguments) throws Exception {
  File temp=new File(testSelfrun.getParentFile(),"String_Node_Str" + testSelfrun.getName());
  try (BufferedWriter writer=new BufferedWriter(new OutputStreamWriter(new FileOutputStream(temp),Charset.defaultCharset()))){
    writer.write(testSelfrun.getAbsolutePath());
    for (    String argument : arguments) {
      writer.write("String_Node_Str");
      writer.write(argument);
    }
  }
   if (!temp.setExecutable(true)) {
    throw new Exception("String_Node_Str");
  }
  File argsFile=new File(testSelfrun.getParentFile(),"String_Node_Str");
  if (argsFile.exists()) {
    if (!argsFile.delete()) {
      throw new IOException("String_Node_Str" + argsFile);
    }
  }
  Process process=Runtime.getRuntime().exec(temp.getAbsolutePath());
  int exitCode=process.waitFor();
  if (exitCode != 0 || !argsFile.exists()) {
    StringBuilder builder=new StringBuilder();
    try (BufferedReader reader=new BufferedReader(new InputStreamReader(process.getErrorStream(),Charset.defaultCharset()))){
      builder.append(reader.readLine());
      builder.append(System.getProperty("String_Node_Str"));
    }
     throw new Exception(builder.toString());
  }
  FileSystem fs=FileSystems.getDefault();
  List<String> args=Files.readAllLines(fs.getPath(argsFile.getAbsolutePath()),Charset.defaultCharset());
  return args;
}
Program: 27295
Project: 27295
Buggy source:
@Test public void testJFile() throws Exception {
  File javaArgsFile=new File(testSelfrun.getParentFile(),"String_Node_Str");
  FileSystem fs=FileSystems.getDefault();
  Files.write(fs.getPath(javaArgsFile.getAbsolutePath()),"String_Node_Str".getBytes(),StandardOpenOption.CREATE);
  List<String> args=execute("String_Node_Str",javaArgsFile.getAbsolutePath(),"String_Node_Str","String_Node_Str");
  assertEquals(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",testSelfrun.getAbsolutePath(),"String_Node_Str","String_Node_Str"),args);
}

Fixed version (ground truth):
@Test public void testJFile() throws Exception {
  File javaArgsFile=new File(testSelfrun.getParentFile(),"String_Node_Str");
  FileSystem fs=FileSystems.getDefault();
  Files.write(fs.getPath(javaArgsFile.getAbsolutePath()),"String_Node_Str".getBytes(Charset.defaultCharset()),StandardOpenOption.CREATE);
  List<String> args=execute("String_Node_Str",javaArgsFile.getAbsolutePath(),"String_Node_Str","String_Node_Str");
  assertEquals(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str","String_Node_Str",testSelfrun.getAbsolutePath(),"String_Node_Str","String_Node_Str"),args);
}
Program: 27296
Project: 27296
Buggy source:
public static Buffer runFileInputSampling(final FileInputRunner runner,ConfigSource inputConfig){
  ConfigSource samplingInputConfig=inputConfig.deepCopy();
  samplingInputConfig.getNestedOrSetEmpty("String_Node_Str").set("String_Node_Str","String_Node_Str");
  try {
    runner.transaction(samplingInputConfig,new InputPlugin.Control(){
      public List<CommitReport> run(      TaskSource taskSource,      Schema schema,      int taskCount){
        runner.run(taskSource,schema,0,new PageOutput(){
          @Override public void add(          Page page){
            throw new RuntimeException("String_Node_Str");
          }
          public void finish(){
          }
          public void close(){
          }
        }
);
        throw new NoSampleException("String_Node_Str");
      }
    }
);
    throw new AssertionError("String_Node_Str");
  }
 catch (  SampledNoticeError error) {
    return error.getSample();
  }
}

Fixed version (ground truth):
public static Buffer runFileInputSampling(final FileInputRunner runner,ConfigSource inputConfig){
  ConfigSource samplingInputConfig=inputConfig.deepCopy();
  samplingInputConfig.getNestedOrSetEmpty("String_Node_Str").set("String_Node_Str","String_Node_Str");
  samplingInputConfig.set("String_Node_Str",null);
  try {
    runner.transaction(samplingInputConfig,new InputPlugin.Control(){
      public List<CommitReport> run(      TaskSource taskSource,      Schema schema,      int taskCount){
        runner.run(taskSource,schema,0,new PageOutput(){
          @Override public void add(          Page page){
            throw new RuntimeException("String_Node_Str");
          }
          public void finish(){
          }
          public void close(){
          }
        }
);
        throw new NoSampleException("String_Node_Str");
      }
    }
);
    throw new AssertionError("String_Node_Str");
  }
 catch (  SampledNoticeError error) {
    return error.getSample();
  }
}
Program: 27297
Project: 27297
Buggy source:
@Override public long skip(long len){
  return read(null,0,(int)Math.min(len,Integer.MAX_VALUE));
}

Fixed version (ground truth):
@Override public long skip(long len){
  int skipped=read(null,0,(int)Math.min(len,Integer.MAX_VALUE));
  return skipped > 0 ? skipped : 0;
}
Program: 27298
Project: 27298
Buggy source:
public void cleanup(String configPath){
  String resumePath=options.getResumeStatePath();
  if (resumePath == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  ConfigSource config=loadYamlConfig(configPath);
  ConfigSource resumeConfig=loadYamlConfig(resumePath);
  ResumeState resume=resumeConfig.loadConfig(ResumeState.class);
  ExecSession exec=newExecSession(config);
  LocalExecutor local=injector.getInstance(LocalExecutor.class);
  local.cleanup(config,resume);
  boolean dontCare=new File(options.getResumeStatePath()).delete();
}

Fixed version (ground truth):
public void cleanup(String configPath){
  String resumePath=options.getResumeStatePath();
  if (resumePath == null) {
    throw new IllegalArgumentException("String_Node_Str");
  }
  ConfigSource config=loadYamlConfig(configPath);
  ConfigSource resumeConfig=loadYamlConfig(resumePath);
  ResumeState resume=resumeConfig.loadConfig(ResumeState.class);
  LocalExecutor local=injector.getInstance(LocalExecutor.class);
  local.cleanup(config,resume);
  boolean dontCare=new File(options.getResumeStatePath()).delete();
}
Program: 27299
Project: 27299
Buggy source:
@Override public ConfigDiff transaction(ConfigSource config,int taskCount,FileOutputPlugin.Control control){
  PluginTask task=config.loadConfig(PluginTask.class);
  String.format(task.getSequenceFormat(),0,0);
  return resume(task.dump(),taskCount,control);
}

Fixed version (ground truth):
@Override public ConfigDiff transaction(ConfigSource config,int taskCount,FileOutputPlugin.Control control){
  PluginTask task=config.loadConfig(PluginTask.class);
  try {
    String dontCare=String.format(Locale.ENGLISH,task.getSequenceFormat(),0,0);
  }
 catch (  IllegalFormatException ex) {
    throw new ConfigException("String_Node_Str",ex);
  }
  return resume(task.dump(),taskCount,control);
}