nus-yam/ex-repair huggingface dataset:
Program: 113293
Project: 113293
Buggy source:
private CharSequence attributeValueAsString(Optional<?> value){
  if (value.isPresent()) {
    return TextValueSerializer.asString(Optional.fromNullable((Object)value.get()));
  }
 else {
    return "String_Node_Str";
  }
}

Fixed version (ground truth):
private CharSequence attributeValueAsString(@Nullable Object value){
  if (null == value) {
    return "String_Node_Str";
  }
  return TextValueSerializer.asString(value);
}
Program: 113295
Project: 113295
Buggy source:
private RevCommit commit(boolean fastForward){
  RevCommit mergeCommit;
  if (fastForward) {
    mergeCommit=repository().getCommit(commits.get(0));
  }
 else {
    String commitMessage=message;
    if (commitMessage == null) {
      commitMessage="String_Node_Str";
      for (      ObjectId commit : commits) {
        Optional<Ref> ref=command(ResolveBranchId.class).setObjectId(commit).call();
        if (ref.isPresent()) {
          commitMessage+="String_Node_Str" + ref.get().getName();
        }
 else {
          commitMessage+="String_Node_Str" + commit.toString() + "String_Node_Str";
        }
      }
    }
    if (noCommit) {
      final Optional<Ref> currHead=command(RefParse.class).setName(Ref.HEAD).call();
      SymRef headRef=(SymRef)currHead.get();
      RevCommit headCommit=repository().getCommit(headRef.getObjectId());
      command(UpdateRef.class).setName(Ref.MERGE_HEAD).setNewValue(commits.get(0)).call();
      command(UpdateRef.class).setName(Ref.ORIG_HEAD).setNewValue(headCommit.getId()).call();
      mergeCommit=headCommit;
      command(SaveMergeCommitMessageOp.class).setMessage(commitMessage).call();
    }
 else {
      mergeCommit=command(CommitOp.class).setAllowEmpty(true).setMessage(commitMessage).addParents(commits).setAuthor(authorName.orNull(),authorEmail.orNull()).call();
    }
  }
  getProgressListener().complete();
  return mergeCommit;
}

Fixed version (ground truth):
private RevCommit commit(boolean fastForward){
  RevCommit mergeCommit;
  if (fastForward) {
    mergeCommit=repository().getCommit(commits.get(0));
  }
 else {
    String commitMessage=message;
    if (commitMessage == null) {
      commitMessage="String_Node_Str";
      for (      ObjectId commit : commits) {
        Optional<Ref> ref=command(ResolveBranchId.class).setObjectId(commit).call();
        if (ref.isPresent()) {
          commitMessage+="String_Node_Str" + ref.get().getName();
        }
 else {
          commitMessage+="String_Node_Str" + commit.toString() + "String_Node_Str";
        }
      }
    }
    if (noCommit) {
      final Optional<Ref> currHead=command(RefParse.class).setName(Ref.HEAD).call();
      SymRef headRef=(SymRef)currHead.get();
      RevCommit headCommit=repository().getCommit(headRef.getObjectId());
      command(UpdateRef.class).setName(Ref.MERGE_HEAD).setNewValue(commits.get(0)).call();
      command(UpdateRef.class).setName(Ref.ORIG_HEAD).setNewValue(headCommit.getId()).call();
      mergeCommit=headCommit;
      command(SaveMergeCommitMessageOp.class).setMessage(commitMessage).call();
    }
 else {
      CommitOp commit=command(CommitOp.class).setAllowEmpty(true).setMessage(commitMessage).addParents(commits);
      if (authorName.isPresent() || authorEmail.isPresent()) {
        commit.setAuthor(authorName.orNull(),authorEmail.orNull());
      }
      mergeCommit=commit.call();
    }
  }
  getProgressListener().complete();
  return mergeCommit;
}
Program: 113296
Project: 113296
Buggy source:
@Test public void testNoFastForward() throws Exception {
  insertAndAdd(points1);
  RevCommit masterCommit=geogig.command(CommitOp.class).call();
  geogig.command(BranchCreateOp.class).setName("String_Node_Str").call();
  geogig.command(CheckoutOp.class).setSource("String_Node_Str").call();
  insertAndAdd(points2);
  RevCommit branchCommit=geogig.command(CommitOp.class).call();
  geogig.command(CheckoutOp.class).setSource("String_Node_Str").call();
  Ref branch=geogig.command(RefParse.class).setName("String_Node_Str").call().get();
  MergeOp mergeOp=geogig.command(MergeOp.class).addCommit(Suppliers.ofInstance(branch.getObjectId()));
  mergeOp.setNoFastForward(true).call();
  Iterator<RevCommit> log=geogig.command(LogOp.class).call();
  RevCommit mergeCommit=log.next();
  assertEquals(2,mergeCommit.getParentIds().size());
  assertEquals(masterCommit.getId(),mergeCommit.getParentIds().get(0));
  assertEquals(branchCommit.getId(),mergeCommit.getParentIds().get(1));
}

Fixed version (ground truth):
@Test public void testNoFastForward() throws Exception {
  insertAndAdd(points1);
  RevCommit masterCommit=geogig.command(CommitOp.class).call();
  geogig.command(BranchCreateOp.class).setName("String_Node_Str").call();
  geogig.command(CheckoutOp.class).setSource("String_Node_Str").call();
  insertAndAdd(points2);
  RevCommit branchCommit=geogig.command(CommitOp.class).call();
  geogig.command(CheckoutOp.class).setSource("String_Node_Str").call();
  Ref branch=geogig.command(RefParse.class).setName("String_Node_Str").call().get();
  MergeOp mergeOp=geogig.command(MergeOp.class).addCommit(Suppliers.ofInstance(branch.getObjectId()));
  mergeOp.setNoFastForward(true).call();
  Iterator<RevCommit> log=geogig.command(LogOp.class).call();
  RevCommit mergeCommit=log.next();
  assertEquals(2,mergeCommit.getParentIds().size());
  assertEquals(masterCommit.getId(),mergeCommit.getParentIds().get(0));
  assertEquals(branchCommit.getId(),mergeCommit.getParentIds().get(1));
  assertEquals(COMMITTER_NAME,mergeCommit.getAuthor().getName().get());
  assertEquals(COMMITTER_EMAIL,mergeCommit.getAuthor().getEmail().get());
  assertEquals(COMMITTER_NAME,mergeCommit.getCommitter().getName().get());
  assertEquals(COMMITTER_EMAIL,mergeCommit.getCommitter().getEmail().get());
}
Program: 113297
Project: 113297
Buggy source:
@Override protected void setUpInternal() throws Exception {
  repo.command(ConfigOp.class).setAction(ConfigAction.CONFIG_SET).setName("String_Node_Str").setValue("String_Node_Str").call();
  repo.command(ConfigOp.class).setAction(ConfigAction.CONFIG_SET).setName("String_Node_Str").setValue("String_Node_Str").call();
}

Fixed version (ground truth):
@Override protected void setUpInternal() throws Exception {
  repo.command(ConfigOp.class).setAction(ConfigAction.CONFIG_SET).setName("String_Node_Str").setValue(COMMITTER_NAME).call();
  repo.command(ConfigOp.class).setAction(ConfigAction.CONFIG_SET).setName("String_Node_Str").setValue(COMMITTER_EMAIL).call();
}
Program: 113298
Project: 113298
Buggy source:
public static void createTables(final Environment config){
  DataSource ds=PGStorage.newDataSource(config);
  try {
    new DbOp<Void>(){
      @Override protected Void doRun(      final Connection cx) throws SQLException {
        DatabaseMetaData md=cx.getMetaData();
        final TableNames tables=config.getTables();
        final String reposTable=tables.repositories();
        final String schema=PGStorage.schema(reposTable);
        final String table=PGStorage.stripSchema(reposTable);
        try (ResultSet rs=md.getTables(null,schema,table,null)){
          if (rs.next()) {
            return null;
          }
        }
         cx.setAutoCommit(false);
        try {
          String sql=String.format("String_Node_Str",config.getDatabaseName());
          PGStorage.run(cx,sql);
          PGStorage.run(cx,"String_Node_Str");
          createConfigTable(cx,tables);
          cx.commit();
          cx.setAutoCommit(false);
          createRefsTable(cx,tables);
          createConflictsTable(cx,tables);
          createBlobsTable(cx,tables);
          createObjectsTables(cx,tables);
          createGraphTables(cx,tables);
          cx.commit();
        }
 catch (        SQLException|RuntimeException e) {
          cx.rollback();
          Throwables.propagateIfInstanceOf(e,SQLException.class);
          throw Throwables.propagate(e);
        }
        return null;
      }
    }
.run(ds);
  }
  finally {
    PGStorage.closeDataSource(ds);
  }
}

Fixed version (ground truth):
public static void createTables(final Environment config){
  DataSource ds=PGStorage.newDataSource(config);
  try {
    new DbOp<Void>(){
      @Override protected Void doRun(      final Connection cx) throws SQLException {
        DatabaseMetaData md=cx.getMetaData();
        final TableNames tables=config.getTables();
        final String reposTable=tables.repositories();
        final String schema=PGStorage.schema(reposTable);
        final String table=PGStorage.stripSchema(reposTable);
        try (ResultSet rs=md.getTables(null,schema,table,null)){
          if (rs.next()) {
            return null;
          }
        }
         try {
          cx.setAutoCommit(true);
          PGStorage.run(cx,"String_Node_Str");
          String sql=String.format("String_Node_Str",config.getDatabaseName());
          PGStorage.run(cx,sql);
          PGStorage.run(cx,"String_Node_Str");
          cx.setAutoCommit(false);
          PGStorage.run(cx,"String_Node_Str");
          createConfigTable(cx,tables);
          cx.commit();
          cx.setAutoCommit(false);
          createRefsTable(cx,tables);
          createConflictsTable(cx,tables);
          createBlobsTable(cx,tables);
          createObjectsTables(cx,tables);
          createGraphTables(cx,tables);
          cx.commit();
        }
 catch (        SQLException|RuntimeException e) {
          cx.rollback();
          Throwables.propagateIfInstanceOf(e,SQLException.class);
          throw Throwables.propagate(e);
        }
        return null;
      }
    }
.run(ds);
  }
  finally {
    PGStorage.closeDataSource(ds);
  }
}
Program: 113299
Project: 113299
Buggy source:
@Override protected Void doRun(final Connection cx) throws SQLException {
  DatabaseMetaData md=cx.getMetaData();
  final TableNames tables=config.getTables();
  final String reposTable=tables.repositories();
  final String schema=PGStorage.schema(reposTable);
  final String table=PGStorage.stripSchema(reposTable);
  try (ResultSet rs=md.getTables(null,schema,table,null)){
    if (rs.next()) {
      return null;
    }
  }
   cx.setAutoCommit(false);
  try {
    String sql=String.format("String_Node_Str",config.getDatabaseName());
    PGStorage.run(cx,sql);
    PGStorage.run(cx,"String_Node_Str");
    createConfigTable(cx,tables);
    cx.commit();
    cx.setAutoCommit(false);
    createRefsTable(cx,tables);
    createConflictsTable(cx,tables);
    createBlobsTable(cx,tables);
    createObjectsTables(cx,tables);
    createGraphTables(cx,tables);
    cx.commit();
  }
 catch (  SQLException|RuntimeException e) {
    cx.rollback();
    Throwables.propagateIfInstanceOf(e,SQLException.class);
    throw Throwables.propagate(e);
  }
  return null;
}

Fixed version (ground truth):
@Override protected Void doRun(final Connection cx) throws SQLException {
  DatabaseMetaData md=cx.getMetaData();
  final TableNames tables=config.getTables();
  final String reposTable=tables.repositories();
  final String schema=PGStorage.schema(reposTable);
  final String table=PGStorage.stripSchema(reposTable);
  try (ResultSet rs=md.getTables(null,schema,table,null)){
    if (rs.next()) {
      return null;
    }
  }
   try {
    cx.setAutoCommit(true);
    PGStorage.run(cx,"String_Node_Str");
    String sql=String.format("String_Node_Str",config.getDatabaseName());
    PGStorage.run(cx,sql);
    PGStorage.run(cx,"String_Node_Str");
    cx.setAutoCommit(false);
    PGStorage.run(cx,"String_Node_Str");
    createConfigTable(cx,tables);
    cx.commit();
    cx.setAutoCommit(false);
    createRefsTable(cx,tables);
    createConflictsTable(cx,tables);
    createBlobsTable(cx,tables);
    createObjectsTables(cx,tables);
    createGraphTables(cx,tables);
    cx.commit();
  }
 catch (  SQLException|RuntimeException e) {
    cx.rollback();
    Throwables.propagateIfInstanceOf(e,SQLException.class);
    throw Throwables.propagate(e);
  }
  return null;
}
Program: 113300
Project: 113300
Buggy source:
/** 
 * Encodes a value using the variable-length encoding from <a href="http://code.google.com/apis/protocolbuffers/docs/encoding.html"> Google Protocol Buffers</a>. Zig-zag is not used, so input must not be negative. If values can be negative, use   {@link #writeSignedVarLong(long,DataOutput)} instead. This method treats negative inputas like a large unsigned value.
 * @param value value to encode
 * @param out to write bytes to
 * @throws IOException if {@link DataOutput} throws {@link IOException}
 */
public static void writeUnsignedVarLong(long value,DataOutput out) throws IOException {
  byte[] buff=new byte[9];
  int cnt=0;
  while ((value & 0xFFFFFFFFFFFFFF80L) != 0L) {
    buff[cnt++]=(byte)(((int)value & 0x7F) | 0x80);
    value>>>=7;
  }
  buff[cnt++]=(byte)((int)value & 0x7F);
  out.write(buff,0,cnt);
}

Fixed version (ground truth):
/** 
 * Encodes a value using the variable-length encoding from <a href="http://code.google.com/apis/protocolbuffers/docs/encoding.html"> Google Protocol Buffers</a>. Zig-zag is not used, so input must not be negative. If values can be negative, use   {@link #writeSignedVarLong(long,DataOutput)} instead. This method treats negative inputas like a large unsigned value.
 * @param value value to encode
 * @param out to write bytes to
 * @throws IOException if {@link DataOutput} throws {@link IOException}
 */
public static void writeUnsignedVarLong(long value,DataOutput out) throws IOException {
  byte[] buff=new byte[10];
  int cnt=0;
  while ((value & 0xFFFFFFFFFFFFFF80L) != 0L) {
    buff[cnt++]=(byte)(((int)value & 0x7F) | 0x80);
    value>>>=7;
  }
  buff[cnt++]=(byte)((int)value & 0x7F);
  out.write(buff,0,cnt);
}
Program: 113301
Project: 113301
Buggy source:
/** 
 * Constructs the transaction with the given ID and Injector.
 * @param context the non transactional command locator
 * @param transactionId the id of the transaction
 */
public GeogigTransaction(Context context,UUID transactionId){
  Preconditions.checkArgument(!(context instanceof GeogigTransaction));
  this.context=context;
  this.transactionId=transactionId;
  transactionIndex=new TransactionStagingArea(new Index(this),transactionId);
  transactionWorkTree=new WorkingTree(this);
  transactionRefDatabase=new TransactionRefDatabase(context.refDatabase(),transactionId);
}

Fixed version (ground truth):
/** 
 * Constructs the transaction with the given ID and Injector.
 * @param context the non transactional command locator
 * @param transactionId the id of the transaction
 */
public GeogigTransaction(Context context,UUID transactionId){
  Preconditions.checkArgument(!(context instanceof GeogigTransaction));
  this.context=context;
  this.transactionId=transactionId;
  transactionIndex=new TransactionStagingArea(new Index(this),transactionId);
  transactionWorkTree=new WorkingTree(this);
  transactionRefDatabase=new TransactionRefDatabase(context.refDatabase(),transactionId);
  transactionBlobStore=new TransactionBlobStoreImpl((TransactionBlobStore)context.blobStore(),transactionId);
}
Program: 113302
Project: 113302
Buggy source:
public void create(){
  transactionBlobStore=new TransactionBlobStoreImpl((TransactionBlobStore)context.blobStore(),transactionId);
  transactionRefDatabase.create();
}

Fixed version (ground truth):
public void create(){
  transactionRefDatabase.create();
}
Program: 113303
Project: 113303
Buggy source:
@Override @Nullable public Optional<Feature> apply(@Nullable Feature feature){
  SimpleFeatureBuilder builder=new SimpleFeatureBuilder(featureType);
  for (  Property property : feature.getProperties()) {
    if (property instanceof GeometryAttribute) {
      builder.set(featureType.getGeometryDescriptor().getName(),property.getValue());
    }
 else {
      builder.set(property.getName(),property.getValue());
    }
  }
  Feature modifiedFeature=builder.buildFeature(feature.getIdentifier().getID());
  return Optional.fromNullable(modifiedFeature);
}

Fixed version (ground truth):
@Override @Nullable public Optional<Feature> apply(@Nullable Feature feature){
  SimpleFeatureBuilder builder=new SimpleFeatureBuilder(featureType);
  for (  Property property : feature.getProperties()) {
    if (property instanceof GeometryAttribute) {
      builder.set(featureType.getGeometryDescriptor().getName(),property.getValue());
    }
 else {
      String name=property.getName().getLocalPart();
      if (name.length() > 10) {
        name=name.substring(0,10);
      }
      builder.set(name,property.getValue());
    }
  }
  Feature modifiedFeature=builder.buildFeature(feature.getIdentifier().getID());
  return Optional.fromNullable(modifiedFeature);
}
Program: 113304
Project: 113304
Buggy source:
private Function<Feature,Optional<Feature>> getTransformingFunction(final SimpleFeatureType featureType){
  Function<Feature,Optional<Feature>> function=new Function<Feature,Optional<Feature>>(){
    @Override @Nullable public Optional<Feature> apply(    @Nullable Feature feature){
      SimpleFeatureBuilder builder=new SimpleFeatureBuilder(featureType);
      for (      Property property : feature.getProperties()) {
        if (property instanceof GeometryAttribute) {
          builder.set(featureType.getGeometryDescriptor().getName(),property.getValue());
        }
 else {
          builder.set(property.getName(),property.getValue());
        }
      }
      Feature modifiedFeature=builder.buildFeature(feature.getIdentifier().getID());
      return Optional.fromNullable(modifiedFeature);
    }
  }
;
  return function;
}

Fixed version (ground truth):
private Function<Feature,Optional<Feature>> getTransformingFunction(final SimpleFeatureType featureType){
  Function<Feature,Optional<Feature>> function=new Function<Feature,Optional<Feature>>(){
    @Override @Nullable public Optional<Feature> apply(    @Nullable Feature feature){
      SimpleFeatureBuilder builder=new SimpleFeatureBuilder(featureType);
      for (      Property property : feature.getProperties()) {
        if (property instanceof GeometryAttribute) {
          builder.set(featureType.getGeometryDescriptor().getName(),property.getValue());
        }
 else {
          String name=property.getName().getLocalPart();
          if (name.length() > 10) {
            name=name.substring(0,10);
          }
          builder.set(name,property.getValue());
        }
      }
      Feature modifiedFeature=builder.buildFeature(feature.getIdentifier().getID());
      return Optional.fromNullable(modifiedFeature);
    }
  }
;
  return function;
}
Program: 113305
Project: 113305
Buggy source:
public DiffTree setCustomFilter(Predicate<Bounded> customFilter){
  this.customFilter=customFilter;
  return this;
}

Fixed version (ground truth):
public DiffTree setCustomFilter(@Nullable Predicate<Bounded> customFilter){
  this.customFilter=customFilter;
  return this;
}
Program: 113306
Project: 113306
Buggy source:
@Override public void run(){
  Consumer consumer=diffProducer;
  if (customFilter != null) {
    consumer=new DiffTreeVisitor.FilteringConsumer(consumer,customFilter);
  }
  if (changeTypeFilter != null) {
    consumer=new ChangeTypeFilteringDiffConsumer(changeTypeFilter,consumer);
  }
  if (boundsFilter != null) {
    consumer=new BoundsFilteringDiffConsumer(boundsFilter,consumer,stagingDatabase());
  }
  if (!pathFilters.isEmpty()) {
    consumer=new PathFilteringDiffConsumer(pathFilters,consumer);
  }
  try {
    visitor.walk(consumer);
  }
 catch (  RuntimeException e) {
    LOGGER.error("String_Node_Str",e);
    producerErrors.add(e);
    diffProducer.finished=true;
  }
}

Fixed version (ground truth):
@Override public void run(){
  Consumer consumer=diffProducer;
  if (customFilter != null) {
    consumer=new DiffTreeVisitor.FilteringConsumer(consumer,customFilter);
  }
  if (changeTypeFilter != null) {
    consumer=new ChangeTypeFilteringDiffConsumer(changeTypeFilter,consumer);
  }
  if (boundsFilter != null) {
    consumer=new BoundsFilteringDiffConsumer(boundsFilter,consumer,stagingDatabase());
  }
  if (!pathFilters.isEmpty()) {
    consumer=new PathFilteringDiffConsumer(pathFilters,consumer);
  }
  try {
    visitor.walk(consumer);
  }
 catch (  RuntimeException e) {
    LOGGER.error("String_Node_Str",e);
    producerErrors.add(e);
  }
 finally {
    diffProducer.finished=true;
  }
}
Program: 113308
Project: 113308
Buggy source:
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  final Activity activity=getActivity();
  activity.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
  mVibrator=(Vibrator)activity.getSystemService(Context.VIBRATOR_SERVICE);
  if (savedInstanceState != null) {
    mCalendar.set(Calendar.YEAR,savedInstanceState.getInt(KEY_SELECTED_YEAR));
    mCalendar.set(Calendar.MONTH,savedInstanceState.getInt(KEY_SELECTED_MONTH));
    mCalendar.set(Calendar.DAY_OF_MONTH,savedInstanceState.getInt(KEY_SELECTED_DAY));
  }
}

Fixed version (ground truth):
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  final Activity activity=getActivity();
  activity.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
  if (savedInstanceState != null) {
    mCalendar.set(Calendar.YEAR,savedInstanceState.getInt(KEY_SELECTED_YEAR));
    mCalendar.set(Calendar.MONTH,savedInstanceState.getInt(KEY_SELECTED_MONTH));
    mCalendar.set(Calendar.DAY_OF_MONTH,savedInstanceState.getInt(KEY_SELECTED_DAY));
  }
}
Program: 113309
Project: 113309
Buggy source:
/** 
 * Try to vibrate. To prevent this becoming a single continuous vibration, nothing will happen if we have vibrated very recently.
 */
@Override public void tryVibrate(){
  if (mVibrator != null) {
    long now=SystemClock.uptimeMillis();
    if (now - mLastVibrate >= 125) {
      mVibrator.vibrate(5);
      mLastVibrate=now;
    }
  }
}

Fixed version (ground truth):
@Override public void tryVibrate(){
  mHapticFeedbackController.tryVibrate();
}
Program: 113311
Project: 113311
Buggy source:
public RadialPickerLayout(Context context,AttributeSet attrs){
  super(context,attrs);
  setOnTouchListener(this);
  ViewConfiguration vc=ViewConfiguration.get(context);
  TOUCH_SLOP=vc.getScaledTouchSlop();
  TAP_TIMEOUT=ViewConfiguration.getTapTimeout();
  mDoingMove=false;
  mCircleView=new CircleView(context);
  addView(mCircleView);
  mAmPmCirclesView=new AmPmCirclesView(context);
  addView(mAmPmCirclesView);
  mHourRadialTextsView=new RadialTextsView(context);
  addView(mHourRadialTextsView);
  mMinuteRadialTextsView=new RadialTextsView(context);
  addView(mMinuteRadialTextsView);
  mHourRadialSelectorView=new RadialSelectorView(context);
  addView(mHourRadialSelectorView);
  mMinuteRadialSelectorView=new RadialSelectorView(context);
  addView(mMinuteRadialSelectorView);
  preparePrefer30sMap();
  mVibrator=(Vibrator)context.getSystemService(Service.VIBRATOR_SERVICE);
  mLastVibrate=0;
  mLastValueSelected=-1;
  mInputEnabled=true;
  mGrayBox=new View(context);
  mGrayBox.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,ViewGroup.LayoutParams.MATCH_PARENT));
  mGrayBox.setBackgroundColor(getResources().getColor(R.color.transparent_black));
  mGrayBox.setVisibility(View.INVISIBLE);
  addView(mGrayBox);
  mAccessibilityManager=(AccessibilityManager)context.getSystemService(Context.ACCESSIBILITY_SERVICE);
  mTimeInitialized=false;
}

Fixed version (ground truth):
public RadialPickerLayout(Context context,AttributeSet attrs){
  super(context,attrs);
  setOnTouchListener(this);
  ViewConfiguration vc=ViewConfiguration.get(context);
  TOUCH_SLOP=vc.getScaledTouchSlop();
  TAP_TIMEOUT=ViewConfiguration.getTapTimeout();
  mDoingMove=false;
  mCircleView=new CircleView(context);
  addView(mCircleView);
  mAmPmCirclesView=new AmPmCirclesView(context);
  addView(mAmPmCirclesView);
  mHourRadialTextsView=new RadialTextsView(context);
  addView(mHourRadialTextsView);
  mMinuteRadialTextsView=new RadialTextsView(context);
  addView(mMinuteRadialTextsView);
  mHourRadialSelectorView=new RadialSelectorView(context);
  addView(mHourRadialSelectorView);
  mMinuteRadialSelectorView=new RadialSelectorView(context);
  addView(mMinuteRadialSelectorView);
  preparePrefer30sMap();
  mLastValueSelected=-1;
  mInputEnabled=true;
  mGrayBox=new View(context);
  mGrayBox.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,ViewGroup.LayoutParams.MATCH_PARENT));
  mGrayBox.setBackgroundColor(getResources().getColor(R.color.transparent_black));
  mGrayBox.setVisibility(View.INVISIBLE);
  addView(mGrayBox);
  mAccessibilityManager=(AccessibilityManager)context.getSystemService(Context.ACCESSIBILITY_SERVICE);
  mTimeInitialized=false;
}
Program: 113314
Project: 113314
Buggy source:
@Override public void onClick(View v){
  mTimePicker.tryVibrate();
  int amOrPm=mTimePicker.getIsCurrentlyAmOrPm();
  if (amOrPm == AM) {
    amOrPm=PM;
  }
 else   if (amOrPm == PM) {
    amOrPm=AM;
  }
  updateAmPmDisplay(amOrPm);
  mTimePicker.setAmOrPm(amOrPm);
}

Fixed version (ground truth):
@Override public void onClick(View v){
  tryVibrate();
  int amOrPm=mTimePicker.getIsCurrentlyAmOrPm();
  if (amOrPm == AM) {
    amOrPm=PM;
  }
 else   if (amOrPm == PM) {
    amOrPm=AM;
  }
  updateAmPmDisplay(amOrPm);
  mTimePicker.setAmOrPm(amOrPm);
}
Program: 113316
Project: 113316
Buggy source:
/** 
 * Called by the picker for updating the header display.
 */
@Override public void onValueSelected(int pickerIndex,int newValue,boolean autoAdvance){
  if (pickerIndex == HOUR_INDEX) {
    setHour(newValue,false);
    String announcement=String.format("String_Node_Str",newValue);
    if (mAllowAutoAdvance && autoAdvance) {
      setCurrentItemShowing(MINUTE_INDEX,true,true,false);
      announcement+="String_Node_Str" + mSelectMinutes;
    }
    Utils.tryAccessibilityAnnounce(mTimePicker,announcement);
  }
 else   if (pickerIndex == MINUTE_INDEX) {
    setMinute(newValue);
  }
 else   if (pickerIndex == AMPM_INDEX) {
    updateAmPmDisplay(newValue);
  }
 else   if (pickerIndex == ENABLE_PICKER_INDEX) {
    if (!isTypedTimeFullyLegal()) {
      mTypedTimes.clear();
    }
    finishKbMode(true);
  }
}

Fixed version (ground truth):
/** 
 * Called by the picker for updating the header display.
 */
@Override public void onValueSelected(int pickerIndex,int newValue,boolean autoAdvance){
  if (pickerIndex == HOUR_INDEX) {
    setHour(newValue,false);
    String announcement=String.format("String_Node_Str",newValue);
    if (mAllowAutoAdvance && autoAdvance) {
      setCurrentItemShowing(MINUTE_INDEX,true,true,false);
      announcement+="String_Node_Str" + mSelectMinutes;
    }
 else {
      mTimePicker.setContentDescription(mHourPickerDescription + "String_Node_Str" + newValue);
    }
    Utils.tryAccessibilityAnnounce(mTimePicker,announcement);
  }
 else   if (pickerIndex == MINUTE_INDEX) {
    setMinute(newValue);
    mTimePicker.setContentDescription(mMinutePickerDescription + "String_Node_Str" + newValue);
  }
 else   if (pickerIndex == AMPM_INDEX) {
    updateAmPmDisplay(newValue);
  }
 else   if (pickerIndex == ENABLE_PICKER_INDEX) {
    if (!isTypedTimeFullyLegal()) {
      mTypedTimes.clear();
    }
    finishKbMode(true);
  }
}
Program: 113317
Project: 113317
Buggy source:
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  final Activity activity=getActivity();
  activity.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
  mVibrator=(Vibrator)activity.getSystemService(Context.VIBRATOR_SERVICE);
  if (savedInstanceState != null) {
    mCalendar.set(Calendar.YEAR,savedInstanceState.getInt(KEY_SELECTED_YEAR));
    mCalendar.set(Calendar.MONTH,savedInstanceState.getInt(KEY_SELECTED_MONTH));
    mCalendar.set(Calendar.DAY_OF_MONTH,savedInstanceState.getInt(KEY_SELECTED_DAY));
  }
}

Fixed version (ground truth):
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  final Activity activity=getActivity();
  activity.getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
  if (savedInstanceState != null) {
    mCalendar.set(Calendar.YEAR,savedInstanceState.getInt(KEY_SELECTED_YEAR));
    mCalendar.set(Calendar.MONTH,savedInstanceState.getInt(KEY_SELECTED_MONTH));
    mCalendar.set(Calendar.DAY_OF_MONTH,savedInstanceState.getInt(KEY_SELECTED_DAY));
  }
}
Program: 113318
Project: 113318
Buggy source:
/** 
 * Try to vibrate. To prevent this becoming a single continuous vibration, nothing will happen if we have vibrated very recently.
 */
@Override public void tryVibrate(){
  if (mVibrator != null) {
    long now=SystemClock.uptimeMillis();
    if (now - mLastVibrate >= 125) {
      mVibrator.vibrate(5);
      mLastVibrate=now;
    }
  }
}

Fixed version (ground truth):
@Override public void tryVibrate(){
  mHapticFeedbackController.tryVibrate();
}
Program: 113320
Project: 113320
Buggy source:
public RadialPickerLayout(Context context,AttributeSet attrs){
  super(context,attrs);
  setOnTouchListener(this);
  ViewConfiguration vc=ViewConfiguration.get(context);
  TOUCH_SLOP=vc.getScaledTouchSlop();
  TAP_TIMEOUT=ViewConfiguration.getTapTimeout();
  mDoingMove=false;
  mCircleView=new CircleView(context);
  addView(mCircleView);
  mAmPmCirclesView=new AmPmCirclesView(context);
  addView(mAmPmCirclesView);
  mHourRadialTextsView=new RadialTextsView(context);
  addView(mHourRadialTextsView);
  mMinuteRadialTextsView=new RadialTextsView(context);
  addView(mMinuteRadialTextsView);
  mHourRadialSelectorView=new RadialSelectorView(context);
  addView(mHourRadialSelectorView);
  mMinuteRadialSelectorView=new RadialSelectorView(context);
  addView(mMinuteRadialSelectorView);
  preparePrefer30sMap();
  mVibrator=(Vibrator)context.getSystemService(Service.VIBRATOR_SERVICE);
  mLastVibrate=0;
  mLastValueSelected=-1;
  mInputEnabled=true;
  mGrayBox=new View(context);
  mGrayBox.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,ViewGroup.LayoutParams.MATCH_PARENT));
  mGrayBox.setBackgroundColor(getResources().getColor(R.color.transparent_black));
  mGrayBox.setVisibility(View.INVISIBLE);
  addView(mGrayBox);
  mAccessibilityManager=(AccessibilityManager)context.getSystemService(Context.ACCESSIBILITY_SERVICE);
  mTimeInitialized=false;
}

Fixed version (ground truth):
public RadialPickerLayout(Context context,AttributeSet attrs){
  super(context,attrs);
  setOnTouchListener(this);
  ViewConfiguration vc=ViewConfiguration.get(context);
  TOUCH_SLOP=vc.getScaledTouchSlop();
  TAP_TIMEOUT=ViewConfiguration.getTapTimeout();
  mDoingMove=false;
  mCircleView=new CircleView(context);
  addView(mCircleView);
  mAmPmCirclesView=new AmPmCirclesView(context);
  addView(mAmPmCirclesView);
  mHourRadialTextsView=new RadialTextsView(context);
  addView(mHourRadialTextsView);
  mMinuteRadialTextsView=new RadialTextsView(context);
  addView(mMinuteRadialTextsView);
  mHourRadialSelectorView=new RadialSelectorView(context);
  addView(mHourRadialSelectorView);
  mMinuteRadialSelectorView=new RadialSelectorView(context);
  addView(mMinuteRadialSelectorView);
  preparePrefer30sMap();
  mLastValueSelected=-1;
  mInputEnabled=true;
  mGrayBox=new View(context);
  mGrayBox.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT,ViewGroup.LayoutParams.MATCH_PARENT));
  mGrayBox.setBackgroundColor(getResources().getColor(R.color.transparent_black));
  mGrayBox.setVisibility(View.INVISIBLE);
  addView(mGrayBox);
  mAccessibilityManager=(AccessibilityManager)context.getSystemService(Context.ACCESSIBILITY_SERVICE);
  mTimeInitialized=false;
}
Program: 113323
Project: 113323
Buggy source:
@Override public void onClick(View v){
  mTimePicker.tryVibrate();
  int amOrPm=mTimePicker.getIsCurrentlyAmOrPm();
  if (amOrPm == AM) {
    amOrPm=PM;
  }
 else   if (amOrPm == PM) {
    amOrPm=AM;
  }
  updateAmPmDisplay(amOrPm);
  mTimePicker.setAmOrPm(amOrPm);
}

Fixed version (ground truth):
@Override public void onClick(View v){
  tryVibrate();
  int amOrPm=mTimePicker.getIsCurrentlyAmOrPm();
  if (amOrPm == AM) {
    amOrPm=PM;
  }
 else   if (amOrPm == PM) {
    amOrPm=AM;
  }
  updateAmPmDisplay(amOrPm);
  mTimePicker.setAmOrPm(amOrPm);
}
Program: 113329
Project: 113329
Buggy source:
/** 
 * updates the capability and XLocations-list, if they are newer
 * @return true, if something has changed
 */
public boolean update(Capability cap,XLocations xLoc,CowPolicy cow){
  boolean changed=false;
  this.cow=cow;
  if (cap.getExpires() > this.cap.getExpires() || cap.getEpochNo() > this.cap.getEpochNo()) {
    this.cap=cap;
    changed=true;
  }
  if (hasXLocChanged(xLoc)) {
    this.xLoc=xLoc;
    this.strategy.updateXLoc(xLoc);
    changed=true;
  }
  return changed;
}

Fixed version (ground truth):
/** 
 * updates the capability and XLocations-list, if they are newer
 * @return true, if something has changed
 */
public boolean update(Capability cap,XLocations xLoc,CowPolicy cow){
  boolean changed=false;
  this.cow=cow;
  if (cap.getExpires() > this.cap.getExpires() || cap.getEpochNo() > this.cap.getEpochNo()) {
    this.cap=cap;
    changed=true;
  }
  if (hasXLocChanged(xLoc)) {
    this.xLoc=xLoc;
    this.strategy.updateXLoc(xLoc);
    this.viewOutdated=false;
    changed=true;
  }
  return changed;
}
Program: 113330
Project: 113330
Buggy source:
@Override public void responseAvailable(RPCResponse<InternalReadLocalResponse> r){
  InternalReadLocalResponse internalReadLocalResponse=null;
  try {
    internalReadLocalResponse=r.get();
    ObjectData metadata=internalReadLocalResponse.getData();
    InternalObjectData data=new InternalObjectData(metadata,r.getData());
    ObjectList objectList=null;
    if (internalReadLocalResponse.getObjectSetCount() == 1)     objectList=internalReadLocalResponse.getObjectSet(0);
    master.getReplicationStage().internalObjectFetched(fileID,objectNo,osd,data,objectList,null);
  }
 catch (  PBRPCException e) {
    osdAvailability.setServiceWasNotAvailable(osd);
    master.getReplicationStage().internalObjectFetched(fileID,objectNo,osd,null,null,e.getErrorResponse());
  }
catch (  IOException e) {
    osdAvailability.setServiceWasNotAvailable(osd);
    master.getReplicationStage().internalObjectFetched(fileID,objectNo,osd,null,null,ErrorUtils.getErrorResponse(ErrorType.ERRNO,POSIXErrno.POSIX_ERROR_EIO,e.toString()));
  }
catch (  InterruptedException e) {
  }
 finally {
    r.freeBuffers();
  }
}

Fixed version (ground truth):
@Override public void responseAvailable(RPCResponse<InternalReadLocalResponse> r){
  InternalReadLocalResponse internalReadLocalResponse=null;
  try {
    internalReadLocalResponse=r.get();
    ObjectData metadata=internalReadLocalResponse.getData();
    InternalObjectData data=new InternalObjectData(metadata,r.getData());
    ObjectList objectList=null;
    if (internalReadLocalResponse.getObjectSetCount() == 1)     objectList=internalReadLocalResponse.getObjectSet(0);
    master.getReplicationStage().internalObjectFetched(fileID,objectNo,osd,data,objectList,null);
  }
 catch (  PBRPCException e) {
    if (e.getErrorType() != ErrorType.INVALID_VIEW) {
      osdAvailability.setServiceWasNotAvailable(osd);
    }
    master.getReplicationStage().internalObjectFetched(fileID,objectNo,osd,null,null,e.getErrorResponse());
  }
catch (  IOException e) {
    osdAvailability.setServiceWasNotAvailable(osd);
    master.getReplicationStage().internalObjectFetched(fileID,objectNo,osd,null,null,ErrorUtils.getErrorResponse(ErrorType.ERRNO,POSIXErrno.POSIX_ERROR_EIO,e.toString()));
  }
catch (  InterruptedException e) {
  }
 finally {
    r.freeBuffers();
  }
}
Program: 113331
Project: 113331
Buggy source:
private void processInternalObjectFetched(StageRequest rq){
  String fileId=(String)rq.getArgs()[0];
  long objectNo=(Long)rq.getArgs()[1];
  final ServiceUUID usedOSD=(ServiceUUID)rq.getArgs()[2];
  InternalObjectData data=(InternalObjectData)rq.getArgs()[3];
  ObjectList objectList=(ObjectList)rq.getArgs()[4];
  final ErrorResponse error=(ErrorResponse)rq.getArgs()[5];
  if (error != null) {
    if (error.getErrorType() == ErrorType.INVALID_VIEW) {
      disseminationLayer.sendError(fileId,error);
    }
 else {
      disseminationLayer.objectNotFetched(fileId,usedOSD,objectNo,data);
      if (data != null && data.getData() != null)       BufferPool.free(data.getData());
    }
  }
 else {
    if (objectList != null) {
      try {
        ObjectSet objectSet=new ObjectSet(objectList.getStripeWidth(),objectList.getFirst(),objectList.getSet().toByteArray());
        disseminationLayer.objectSetFetched(fileId,usedOSD,objectSet,objectList.getSet().size());
      }
 catch (      IOException e) {
        Logging.logError(Logging.LEVEL_ERROR,this,e);
      }
catch (      ClassNotFoundException e) {
        Logging.logError(Logging.LEVEL_ERROR,this,e);
      }
    }
    if (data != null && data.getData() != null && data.getData().limit() != 0)     disseminationLayer.objectFetched(fileId,objectNo,usedOSD,data);
 else {
      disseminationLayer.objectNotFetched(fileId,usedOSD,objectNo,data);
      if (data != null)       BufferPool.free(data.getData());
    }
  }
}

Fixed version (ground truth):
private void processInternalObjectFetched(StageRequest rq){
  String fileId=(String)rq.getArgs()[0];
  long objectNo=(Long)rq.getArgs()[1];
  final ServiceUUID usedOSD=(ServiceUUID)rq.getArgs()[2];
  InternalObjectData data=(InternalObjectData)rq.getArgs()[3];
  ObjectList objectList=(ObjectList)rq.getArgs()[4];
  final ErrorResponse error=(ErrorResponse)rq.getArgs()[5];
  if (error != null) {
    if (error.getErrorType() == ErrorType.INVALID_VIEW) {
      disseminationLayer.objectNotFetchedBecauseViewError(fileId,usedOSD,objectNo,error);
    }
 else {
      disseminationLayer.objectNotFetchedBecauseError(fileId,usedOSD,objectNo,error);
    }
    if (data != null && data.getData() != null)     BufferPool.free(data.getData());
  }
 else {
    if (objectList != null) {
      try {
        ObjectSet objectSet=new ObjectSet(objectList.getStripeWidth(),objectList.getFirst(),objectList.getSet().toByteArray());
        disseminationLayer.objectSetFetched(fileId,usedOSD,objectSet,objectList.getSet().size());
      }
 catch (      IOException e) {
        Logging.logError(Logging.LEVEL_ERROR,this,e);
      }
catch (      ClassNotFoundException e) {
        Logging.logError(Logging.LEVEL_ERROR,this,e);
      }
    }
    if (data != null && data.getData() != null && data.getData().limit() != 0)     disseminationLayer.objectFetched(fileId,objectNo,usedOSD,data);
 else {
      disseminationLayer.objectNotFetched(fileId,usedOSD,objectNo,data);
      if (data != null)       BufferPool.free(data.getData());
    }
  }
}
Program: 113334
Project: 113334
Buggy source:
private void fetchObjects(){
  while (numObjsInFlight < MAX_OBJS_IN_FLIGHT) {
    ReplicatedFileState fileInReset=filesInReset.poll();
    if (fileInReset == null)     break;
    ReplicatedFileState file=files.get(fileInReset.getFileId());
    if (file == null || file != fileInReset) {
      continue;
    }
    if (!file.getObjectsToFetch().isEmpty()) {
      ObjectVersionMapping o=file.getObjectsToFetch().remove(0);
      file.incrementNumObjectsPending();
      numObjsInFlight++;
      fetchObject(file,o);
    }
 else {
      Logging.logMessage(Logging.LEVEL_DEBUG,Category.replication,this,"String_Node_Str",localID,file.getFileId());
      doResetComplete(file);
    }
    if (!file.getObjectsToFetch().isEmpty()) {
      filesInReset.add(file);
    }
  }
}

Fixed version (ground truth):
private void fetchObjects(){
  while (numObjsInFlight < MAX_OBJS_IN_FLIGHT) {
    ReplicatedFileState fileInReset=filesInReset.poll();
    if (fileInReset == null)     break;
    ReplicatedFileState file=files.get(fileInReset.getFileId());
    if (file == null || file != fileInReset) {
      continue;
    }
    if (!file.getObjectsToFetch().isEmpty()) {
      ObjectVersionMapping o=file.getObjectsToFetch().remove(0);
      file.incrementNumObjectsPending();
      numObjsInFlight++;
      fetchObject(file,o);
    }
    if (!file.getObjectsToFetch().isEmpty()) {
      filesInReset.add(file);
    }
    if (file.getObjectsToFetch().isEmpty() && file.getNumObjectsPending() == 0) {
      Logging.logMessage(Logging.LEVEL_DEBUG,Category.replication,this,"String_Node_Str",localID,file.getFileId());
      doResetComplete(file);
    }
  }
}
Program: 113337
Project: 113337
Buggy source:
/** 
 * Transfers the space information (used & blocked) for a file to the new owner
 * @param quotaFileInformation
 * @param newOwnerId
 * @param filesize
 * @param blockedSpace
 * @param update
 * @throws UserException
 */
@SuppressWarnings("String_Node_Str") public synchronized void transferOwnerSpace(QuotaFileInformation quotaFileInformation,String newOwnerId,long filesize,long blockedSpace,AtomicDBUpdate update) throws UserException {
  Logging.logMessage(Logging.LEVEL_DEBUG,this,"String_Node_Str" + volumeId + "String_Node_Str");
  QuotaFileInformation newQuotaFileInformation=new QuotaFileInformation(quotaFileInformation);
  newQuotaFileInformation.setOwnerId(newOwnerId);
  QuotaInformation quotaInformationOldOwner=getAndApplyQuotaInformation(quotaFileInformation,true,update);
  QuotaInformation quotaInformationNewOwner=getAndApplyQuotaInformation(newQuotaFileInformation,true,update);
  if (QuotaConstants.checkQuotaOnChown && quotaInformationNewOwner.getFreeSpace() < (filesize + blockedSpace)) {
    throw new UserException(POSIXErrno.POSIX_ERROR_ENOSPC,"String_Node_Str" + quotaInformationNewOwner.getQuotaType() + "String_Node_Str");
  }
  updateUserSpaceUsage(quotaFileInformation,quotaInformationOldOwner,-1 * filesize,-1 * blockedSpace,update);
  updateUserSpaceUsage(newQuotaFileInformation,quotaInformationNewOwner,filesize,blockedSpace,update);
}

Fixed version (ground truth):
/** 
 * Transfers the space information (used & blocked) for a file to the new owner
 * @param quotaFileInformation
 * @param newOwnerId
 * @param filesize
 * @param blockedSpace
 * @param update
 * @throws UserException
 */
public synchronized void transferOwnerSpace(QuotaFileInformation quotaFileInformation,String newOwnerId,long filesize,long blockedSpace,AtomicDBUpdate update) throws UserException {
  Logging.logMessage(Logging.LEVEL_DEBUG,this,"String_Node_Str" + volumeId + "String_Node_Str");
  QuotaFileInformation newQuotaFileInformation=new QuotaFileInformation(quotaFileInformation);
  newQuotaFileInformation.setOwnerId(newOwnerId);
  QuotaInformation quotaInformationOldOwner=getAndApplyUserQuotaInformation(null,quotaFileInformation,true,update);
  QuotaInformation quotaInformationNewOwner=getAndApplyUserQuotaInformation(null,newQuotaFileInformation,true,update);
  System.out.println("String_Node_Str" + quotaFileInformation.getOwnerId() + "String_Node_Str"+ newOwnerId);
  System.out.println("String_Node_Str" + quotaFileInformation.getOwnerGroupId());
  System.out.println("String_Node_Str" + quotaInformationNewOwner.getFreeSpace() + "String_Node_Str"+ filesize+ "String_Node_Str"+ blockedSpace);
  if (QuotaConstants.checkQuotaOnChown && quotaInformationNewOwner.getFreeSpace() < (filesize + blockedSpace)) {
    throw new UserException(POSIXErrno.POSIX_ERROR_ENOSPC,"String_Node_Str" + quotaInformationNewOwner.getQuotaType() + "String_Node_Str");
  }
  updateUserSpaceUsage(quotaFileInformation,quotaInformationOldOwner,-1 * filesize,-1 * blockedSpace,update);
  updateUserSpaceUsage(newQuotaFileInformation,quotaInformationNewOwner,filesize,blockedSpace,update);
}
Program: 113343
Project: 113343
Buggy source:
@Override public void setGroupBlockedSpace(String groupId,Long blockedSpace,AtomicDBUpdate update) throws DatabaseException {
  assert(groupId != null && groupId.isEmpty());
  setOwnerQuotaInfo(groupId,blockedSpace,OwnerType.GROUP,QuotaInfo.BLOCKED,update);
}

Fixed version (ground truth):
@Override public void setGroupBlockedSpace(String groupId,Long blockedSpace,AtomicDBUpdate update) throws DatabaseException {
  assert(groupId != null && !groupId.isEmpty());
  setOwnerQuotaInfo(groupId,blockedSpace,OwnerType.GROUP,QuotaInfo.BLOCKED,update);
}
Program: 113344
Project: 113344
Buggy source:
@Override public void setUserUsedSpace(String userId,Long usedSpace,AtomicDBUpdate update) throws DatabaseException {
  assert(userId != null && userId.isEmpty());
  setOwnerQuotaInfo(userId,usedSpace,OwnerType.USER,QuotaInfo.USED,update);
}

Fixed version (ground truth):
@Override public void setUserUsedSpace(String userId,Long usedSpace,AtomicDBUpdate update) throws DatabaseException {
  assert(userId != null && !userId.isEmpty());
  setOwnerQuotaInfo(userId,usedSpace,OwnerType.USER,QuotaInfo.USED,update);
}
Program: 113345
Project: 113345
Buggy source:
@Override public void setUserQuota(String userId,Long quota,AtomicDBUpdate update) throws DatabaseException {
  assert(userId != null && userId.isEmpty());
  setOwnerQuotaInfo(userId,quota,OwnerType.USER,QuotaInfo.QUOTA,update);
}

Fixed version (ground truth):
@Override public void setUserQuota(String userId,Long quota,AtomicDBUpdate update) throws DatabaseException {
  assert(userId != null && !userId.isEmpty());
  setOwnerQuotaInfo(userId,quota,OwnerType.USER,QuotaInfo.QUOTA,update);
}
Program: 113346
Project: 113346
Buggy source:
@Override public void setGroupQuota(String groupId,Long quota,AtomicDBUpdate update) throws DatabaseException {
  assert(groupId != null && groupId.isEmpty());
  setOwnerQuotaInfo(groupId,quota,OwnerType.GROUP,QuotaInfo.QUOTA,update);
}

Fixed version (ground truth):
@Override public void setGroupQuota(String groupId,Long quota,AtomicDBUpdate update) throws DatabaseException {
  assert(groupId != null && !groupId.isEmpty());
  setOwnerQuotaInfo(groupId,quota,OwnerType.GROUP,QuotaInfo.QUOTA,update);
}
Program: 113347
Project: 113347
Buggy source:
@Override public void setUserBlockedSpace(String userId,Long blockedSpace,AtomicDBUpdate update) throws DatabaseException {
  assert(userId != null && userId.isEmpty());
  setOwnerQuotaInfo(userId,blockedSpace,OwnerType.USER,QuotaInfo.BLOCKED,update);
}

Fixed version (ground truth):
@Override public void setUserBlockedSpace(String userId,Long blockedSpace,AtomicDBUpdate update) throws DatabaseException {
  assert(userId != null && !userId.isEmpty());
  setOwnerQuotaInfo(userId,blockedSpace,OwnerType.USER,QuotaInfo.BLOCKED,update);
}
Program: 113348
Project: 113348
Buggy source:
@Override public void setGroupUsedSpace(String groupId,Long usedSpace,AtomicDBUpdate update) throws DatabaseException {
  assert(groupId != null && groupId.isEmpty());
  setOwnerQuotaInfo(groupId,usedSpace,OwnerType.GROUP,QuotaInfo.USED,update);
}

Fixed version (ground truth):
@Override public void setGroupUsedSpace(String groupId,Long usedSpace,AtomicDBUpdate update) throws DatabaseException {
  assert(groupId != null && !groupId.isEmpty());
  setOwnerQuotaInfo(groupId,usedSpace,OwnerType.GROUP,QuotaInfo.USED,update);
}
Program: 113349
Project: 113349
Buggy source:
@Override public void setValue(long value){
  if (valBuf == null) {
    valLen=Long.SIZE / Byte.SIZE;
    valBuf=new byte[valLen];
  }
  ByteBuffer tmp=ByteBuffer.wrap(valBuf);
  tmp.putLong(value);
}

Fixed version (ground truth):
@Override public void setValue(long value){
  this.value=value;
  if (valBuf == null) {
    valLen=Long.SIZE / Byte.SIZE;
    valBuf=new byte[valLen];
  }
  ByteBuffer tmp=ByteBuffer.wrap(valBuf);
  tmp.putLong(value);
}