nus-yam/ex-repair huggingface dataset:
Program: 33073
Project: 33073
Buggy source:
public void stopProcess(){
  DataOutputStream os;
  Timer tm;
  os=new DataOutputStream(nodeProcess.getOutputStream());
  try {
    os.writeChars("String_Node_Str");
    os.flush();
    nodeProcess.getOutputStream().close();
    isStopping=true;
    tm=new Timer("String_Node_Str",true);
    tm.schedule(new TimerTask(){
      @Override public void run(){
        Log.w(TAG,"String_Node_Str");
        nodeProcess.destroy();
      }
    }
,5000);
  }
 catch (  IOException e) {
    Log.w(TAG,"String_Node_Str");
    nodeProcess.destroy();
  }
}

Fixed version (ground truth):
public void stopProcess(){
  tm.schedule(new TimerTask(){
    @Override public void run(){
      Log.w(TAG,"String_Node_Str");
      nodeProcess.destroy();
    }
  }
,5000);
  try {
    OutputStream stdin=nodeProcess.getOutputStream();
    stdin.write("String_Node_Str".getBytes());
    stdin.flush();
    stdin.close();
  }
 catch (  IOException e) {
    Log.w(TAG,"String_Node_Str");
    nodeProcess.destroy();
  }
}
Program: 33074
Project: 33074
Buggy source:
public NodeProcessThread(String dir,String execfile,String jsfile,Handler msgHandler,ProcessExplorerService service){
  this.dir=dir;
  this.msgHandler=msgHandler;
  this.service=service;
  this.exec=dir + "String_Node_Str" + execfile;
  this.js=dir + "String_Node_Str" + jsfile;
  this.nodeProcessBuilder=new ProcessBuilder();
}

Fixed version (ground truth):
public NodeProcessThread(String dir,String execfile,String jsfile,Handler msgHandler,ProcessExplorerService service){
  this.dir=dir;
  this.msgHandler=msgHandler;
  this.service=service;
  this.exec=dir + "String_Node_Str" + execfile;
  this.js=dir + "String_Node_Str" + jsfile;
  this.nodeProcessBuilder=new ProcessBuilder();
  this.tm=new Timer("String_Node_Str",true);
}
Program: 33075
Project: 33075
Buggy source:
@Override public int onStartCommand(Intent intent,int flags,int startId){
  startForeground(notifMgr.getForegroundNotificationId(),notifMgr.getForegroundNotification());
  if (intent.getExtras().containsKey("String_Node_Str") && ((Boolean)intent.getExtras().get("String_Node_Str")))   startServices();
  return super.onStartCommand(intent,flags,startId);
}

Fixed version (ground truth):
@Override public int onStartCommand(Intent intent,int flags,int startId){
  startForeground(notifMgr.getForegroundNotificationId(),notifMgr.getForegroundNotification());
  if (intent.getExtras() != null && intent.getExtras().containsKey("String_Node_Str") && ((Boolean)intent.getExtras().get("String_Node_Str")))   startServices();
  return super.onStartCommand(intent,flags,startId);
}
Program: 33076
Project: 33076
Buggy source:
@Override public void ProcessExplorerServiceEvent(NodeThreadEvent ev,NodeThreadEventData evData){
  Notification notif;
  String contentText=null;
  if (ev == NodeThreadEvent.NODE_STARTING)   contentText="String_Node_Str";
 else   if (ev == NodeThreadEvent.NODE_STARTED)   contentText="String_Node_Str";
 else   if (ev == NodeThreadEvent.NODE_ERROR || ev == NodeThreadEvent.NODE_STOPPED)   contentText="String_Node_Str";
 else   return;
  notifBuilder.setTicker(contentText);
  notifBuilder.setContentText(contentText);
  notifBuilder.setContentTitle("String_Node_Str");
  notif=notifBuilder.build();
  notifService.notify(SERVICE_NOTIFICATION_ID,notif);
}

Fixed version (ground truth):
@Override public void ProcessExplorerServiceEvent(NodeThreadEvent ev,NodeThreadEventData evData){
  Notification notif;
  String contentText=null;
  if (ev == NodeThreadEvent.NODE_STARTING)   contentText="String_Node_Str";
 else   if (ev == NodeThreadEvent.NODE_STARTED)   contentText="String_Node_Str";
 else   if (ev == NodeThreadEvent.NODE_STOPPED)   contentText="String_Node_Str";
 else   if (ev == NodeThreadEvent.NODE_ERROR)   contentText="String_Node_Str";
 else   return;
  notifBuilder.setTicker(contentText);
  notifBuilder.setContentText(contentText);
  notifBuilder.setContentTitle("String_Node_Str");
  notif=notifBuilder.build();
  notifService.notify(SERVICE_NOTIFICATION_ID,notif);
}
Program: 33077
Project: 33077
Buggy source:
protected void startNodeProcess(){
  SharedPreferences sharedPrefs;
  if (nodeThread != null) {
    Log.w(TAG,"String_Node_Str");
    return;
  }
  Log.i(TAG,"String_Node_Str");
  sharedPrefs=PreferenceManager.getDefaultSharedPreferences(this);
  nodeThread=new NodeProcessThread(getFilesDir().toString(),"String_Node_Str","String_Node_Str",new NodeProcessHandler(),this);
  nodeThread.setEnvironment("String_Node_Str",sharedPrefs.getString("String_Node_Str","String_Node_Str"));
  nodeThread.setUncaughtExceptionHandler(this);
  nodeThread.startProcess();
}

Fixed version (ground truth):
protected void startNodeProcess(){
  SharedPreferences sharedPrefs;
  if (nodeThread != null) {
    Log.w(TAG,"String_Node_Str");
    return;
  }
  Log.i(TAG,"String_Node_Str");
  sharedPrefs=PreferenceManager.getDefaultSharedPreferences(this);
  nodeThread=new NodeProcessThread(getFilesDir().toString(),"String_Node_Str","String_Node_Str",new NodeProcessHandler(),this);
  addNodeThreadListener(this);
  nodeThread.setEnvironment("String_Node_Str",sharedPrefs.getString("String_Node_Str","String_Node_Str"));
  nodeThread.setUncaughtExceptionHandler(this);
  nodeThread.startProcess();
}
Program: 33078
Project: 33078
Buggy source:
/** 
 * All the actions that are to be executed when the service stops or is stopped when the activity is started.
 */
protected void updateOnServiceStopped(){
  findPreference("String_Node_Str").setEnabled(false);
  findPreference("String_Node_Str").setEnabled(true);
}

Fixed version (ground truth):
/** 
 * All the actions that are to be executed when the service stops or is stopped when the activity is started.
 */
protected void updateOnServiceStopped(){
  findPreference("String_Node_Str").setEnabled(false);
  findPreference("String_Node_Str").setEnabled(true);
  findPreference("String_Node_Str").setEnabled(false);
}
Program: 33079
Project: 33079
Buggy source:
@Override public void ProcessExplorerServiceEvent(NodeThreadEvent ev,NodeThreadEventData evData){
  Notification notif;
  String contentText=null;
  if (ev == NodeThreadEvent.NODE_STARTING)   contentText="String_Node_Str";
 else   if (ev == NodeThreadEvent.NODE_STARTED)   contentText="String_Node_Str";
 else   if (ev == NodeThreadEvent.NODE_ERROR || ev == NodeThreadEvent.NODE_STOPPED)   contentText="String_Node_Str";
 else   return;
  notifBuilder.setTicker(contentText);
  notifBuilder.setContentText(contentText);
  notifBuilder.setContentTitle("String_Node_Str");
  notif=notifBuilder.build();
  notifService.notify(SERVICE_NOTIFICATION_ID,notif);
}

Fixed version (ground truth):
@Override public void ProcessExplorerServiceEvent(NodeThreadEvent ev,NodeThreadEventData evData){
  Notification notif;
  String contentText=null;
  if (ev == NodeThreadEvent.NODE_STARTING)   contentText="String_Node_Str";
 else   if (ev == NodeThreadEvent.NODE_STARTED)   contentText="String_Node_Str";
 else   if (ev == NodeThreadEvent.NODE_STOPPED)   contentText="String_Node_Str";
 else   if (ev == NodeThreadEvent.NODE_ERROR)   contentText="String_Node_Str";
 else   return;
  notifBuilder.setTicker(contentText);
  notifBuilder.setContentText(contentText);
  notifBuilder.setContentTitle("String_Node_Str");
  notif=notifBuilder.build();
  notifService.notify(SERVICE_NOTIFICATION_ID,notif);
}
Program: 33080
Project: 33080
Buggy source:
protected void startNodeProcess(){
  SharedPreferences sharedPrefs;
  if (nodeThread != null) {
    Log.w(TAG,"String_Node_Str");
    return;
  }
  Log.i(TAG,"String_Node_Str");
  sharedPrefs=PreferenceManager.getDefaultSharedPreferences(this);
  nodeThread=new NodeProcessThread(getFilesDir().toString(),"String_Node_Str","String_Node_Str",new NodeProcessHandler(),this);
  nodeThread.setEnvironment("String_Node_Str",sharedPrefs.getString("String_Node_Str","String_Node_Str"));
  nodeThread.setUncaughtExceptionHandler(this);
  nodeThread.startProcess();
}

Fixed version (ground truth):
protected void startNodeProcess(){
  SharedPreferences sharedPrefs;
  if (nodeThread != null) {
    Log.w(TAG,"String_Node_Str");
    return;
  }
  Log.i(TAG,"String_Node_Str");
  sharedPrefs=PreferenceManager.getDefaultSharedPreferences(this);
  nodeThread=new NodeProcessThread(getFilesDir().toString(),"String_Node_Str","String_Node_Str",new NodeProcessHandler(),this);
  addNodeThreadListener(this);
  nodeThread.setEnvironment("String_Node_Str",sharedPrefs.getString("String_Node_Str","String_Node_Str"));
  nodeThread.setUncaughtExceptionHandler(this);
  nodeThread.startProcess();
}
Program: 33081
Project: 33081
Buggy source:
/** 
 * All the actions that are to be executed when the service stops or is stopped when the activity is started.
 */
protected void updateOnServiceStopped(){
  findPreference("String_Node_Str").setEnabled(false);
  findPreference("String_Node_Str").setEnabled(true);
}

Fixed version (ground truth):
/** 
 * All the actions that are to be executed when the service stops or is stopped when the activity is started.
 */
protected void updateOnServiceStopped(){
  findPreference("String_Node_Str").setEnabled(false);
  findPreference("String_Node_Str").setEnabled(true);
  findPreference("String_Node_Str").setEnabled(false);
}
Program: 33082
Project: 33082
Buggy source:
@Override public int onStartCommand(Intent intent,int flags,int startId){
  startForeground(notifMgr.getForegroundNotificationId(),notifMgr.getForegroundNotification());
  if (intent.getExtras().containsKey("String_Node_Str") && ((Boolean)intent.getExtras().get("String_Node_Str")))   startServices();
  return super.onStartCommand(intent,flags,startId);
}

Fixed version (ground truth):
@Override public int onStartCommand(Intent intent,int flags,int startId){
  startForeground(notifMgr.getForegroundNotificationId(),notifMgr.getForegroundNotification());
  if (intent.getExtras() != null && intent.getExtras().containsKey("String_Node_Str") && ((Boolean)intent.getExtras().get("String_Node_Str")))   startServices();
  return super.onStartCommand(intent,flags,startId);
}
Program: 33083
Project: 33083
Buggy source:
/** 
 * Checks if the Bot is active and what it should do.
 * @param evt
 */
@SubscribeEvent public void onPlayerTick(ClientTickEvent evt){
  if (evt.phase != ClientTickEvent.Phase.START || getMinecraft().thePlayer == null) {
    return;
  }
  if (skipNextTick) {
    skipNextTick=false;
    return;
  }
  testUngrabMode();
  invalidateObjectMouseOver();
  resetAllInputs();
  invalidateChunkCache();
  if (ungrab.isPressed()) {
    doUngrab=true;
  }
  AIStrategy newStrat;
  if (dead || stop.isPressed() || stop.isKeyDown()) {
    deactivateCurrentStrategy();
    dead=false;
  }
 else   if ((newStrat=findNewStrategy()) != null) {
    deactivateCurrentStrategy();
    currentStrategy=newStrat;
    System.out.println("String_Node_Str" + newStrat);
    currentStrategy.setActive(true,this);
  }
  if (currentStrategy != null) {
    TickResult result=null;
    for (int i=0; i < 100; i++) {
      result=currentStrategy.gameTick(this);
      if (result != TickResult.TICK_AGAIN) {
        break;
      }
    }
    if (result == TickResult.ABORT || result == TickResult.NO_MORE_WORK) {
      dead=true;
    }
synchronized (strategyDescrMutex) {
      strategyDescr=currentStrategy.getDescription(this);
    }
  }
 else {
synchronized (strategyDescrMutex) {
      strategyDescr="String_Node_Str";
    }
  }
}

Fixed version (ground truth):
/** 
 * Checks if the Bot is active and what it should do.
 * @param evt
 */
@SubscribeEvent public void onPlayerTick(ClientTickEvent evt){
  if (evt.phase != ClientTickEvent.Phase.START || getMinecraft().thePlayer == null) {
    return;
  }
  if (skipNextTick) {
    skipNextTick=false;
    return;
  }
  testUngrabMode();
  invalidateObjectMouseOver();
  resetAllInputs();
  invalidateChunkCache();
  if (ungrab.isPressed()) {
    doUngrab=true;
  }
  AIStrategy newStrat;
  if (dead || stop.isPressed() || stop.isKeyDown()) {
    deactivateCurrentStrategy();
    dead=false;
  }
 else   if ((newStrat=findNewStrategy()) != null) {
    deactivateCurrentStrategy();
    currentStrategy=newStrat;
    System.out.println("String_Node_Str" + newStrat);
    currentStrategy.setActive(true,this);
  }
  if (currentStrategy != null) {
    TickResult result=null;
    for (int i=0; i < 100; i++) {
      result=currentStrategy.gameTick(this);
      if (result != TickResult.TICK_AGAIN) {
        break;
      }
    }
    if (result == TickResult.ABORT || result == TickResult.NO_MORE_WORK) {
      dead=true;
    }
synchronized (strategyDescrMutex) {
      strategyDescr=currentStrategy.getDescription(this);
    }
  }
 else {
synchronized (strategyDescrMutex) {
      strategyDescr="String_Node_Str";
    }
  }
  if (activeMapReader != null) {
    activeMapReader.tick(this);
  }
}
Program: 33084
Project: 33084
Buggy source:
public boolean walkTowards(double x,double z,boolean jump,boolean face){
  final double dx=x - mc.thePlayer.posX;
  final double dz=z - mc.thePlayer.posZ;
  final double distTo=Math.sqrt(dx * dx + dz * dz);
  boolean arrived=distTo > MIN_DISTANCE_ERROR;
  if (arrived) {
    if (face) {
      face(x,mc.thePlayer.getEyeHeight() + mc.thePlayer.posY,z);
    }
    double speed=1;
    if (distTo < 4 * WALK_PER_STEP) {
      speed=Math.max(distTo / WALK_PER_STEP / 4,0.1);
    }
    final double yaw=mc.thePlayer.rotationYaw / 180 * Math.PI;
    final double lookX=-Math.sin(yaw);
    final double lookZ=Math.cos(yaw);
    final double dlength=Math.sqrt(dx * dx + dz * dz);
    final double same=(lookX * dx + lookZ * dz) / dlength;
    final double strafe=(lookZ * dx - lookX * dz) / dlength;
    final MovementInput movement=new MovementInput();
    movement.moveForward=(float)(speed * same);
    movement.moveStrafe=(float)(speed * strafe);
    movement.jump=jump;
    overrideMovement(movement);
    if (distTo < 0.5) {
      overrideSneak();
    }
    return false;
  }
 else {
    return true;
  }
}

Fixed version (ground truth):
public boolean walkTowards(double x,double z,boolean jump,boolean face){
  final double dx=x - mc.thePlayer.posX;
  final double dz=z - mc.thePlayer.posZ;
  final double distTo=Math.sqrt(dx * dx + dz * dz);
  boolean arrived=distTo > MIN_DISTANCE_ERROR;
  if (arrived) {
    if (face) {
      face(x,mc.thePlayer.getEyeHeight() + mc.thePlayer.posY,z,1,.1f);
    }
    double speed=1;
    if (distTo < 4 * WALK_PER_STEP) {
      speed=Math.max(distTo / WALK_PER_STEP / 4,0.1);
    }
    final double yaw=mc.thePlayer.rotationYaw / 180 * Math.PI;
    final double lookX=-Math.sin(yaw);
    final double lookZ=Math.cos(yaw);
    final double dlength=Math.sqrt(dx * dx + dz * dz);
    final double same=(lookX * dx + lookZ * dz) / dlength;
    final double strafe=(lookZ * dx - lookX * dz) / dlength;
    final MovementInput movement=new MovementInput();
    movement.moveForward=(float)(speed * same);
    movement.moveStrafe=(float)(speed * strafe);
    movement.jump=jump;
    overrideMovement(movement);
    if (distTo < 0.5 || mc.thePlayer.isSprinting() && distTo < 0.8) {
      overrideSneak();
    }
 else     if (distTo > 6) {
      overrideSprint();
    }
    return false;
  }
 else {
    return true;
  }
}
Program: 33085
Project: 33085
Buggy source:
/** 
 * Restore all inputs to the default minecraft inputs.
 */
protected void resetAllInputs(){
  if (resetMovementInput != null) {
    mc.thePlayer.movementInput=resetMovementInput;
    resetMovementInput=null;
  }
  attackKeyJustPressed=resetAttackKey != null;
  if (resetAttackKey != null) {
    mc.gameSettings.keyBindAttack=resetAttackKey;
    resetAttackKey=null;
  }
  useItemKeyJustPressed=resetUseItemKey != null;
  if (resetUseItemKey != null) {
    mc.gameSettings.keyBindUseItem=resetUseItemKey;
    resetUseItemKey=null;
  }
  sneakKeyJustPressed=resetSneakKey != null;
  if (resetSneakKey != null) {
    mc.gameSettings.keyBindSneak=resetSneakKey;
    resetSneakKey=null;
  }
}

Fixed version (ground truth):
/** 
 * Restore all inputs to the default minecraft inputs.
 */
protected void resetAllInputs(){
  if (resetMovementInput != null) {
    mc.thePlayer.movementInput=resetMovementInput;
    resetMovementInput=null;
  }
  attackKeyJustPressed=resetAttackKey != null;
  if (resetAttackKey != null) {
    mc.gameSettings.keyBindAttack=resetAttackKey;
    resetAttackKey=null;
  }
  useItemKeyJustPressed=resetUseItemKey != null;
  if (resetUseItemKey != null) {
    mc.gameSettings.keyBindUseItem=resetUseItemKey;
    resetUseItemKey=null;
  }
  sneakKeyJustPressed=resetSneakKey != null;
  if (resetSneakKey != null) {
    mc.gameSettings.keyBindSneak=resetSneakKey;
    resetSneakKey=null;
  }
  sprintKeyJustPressed=resetSprintKey != null;
  if (resetSprintKey != null) {
    mc.gameSettings.keyBindSprint=resetSprintKey;
    resetSprintKey=null;
  }
}
Program: 33086
Project: 33086
Buggy source:
/** 
 * Finds any Block of that type directly around the player.
 * @param blockType The block to search.
 * @return the position or <code>null</code> if it was not found.
 */
public BlockPos findBlock(Block blockType){
  final BlockPos current=getPlayerPosition();
  BlockPos pos=null;
  for (int x=current.getX() - 2; x <= current.getX() + 2; x++) {
    for (int z=current.getZ() - 2; z <= current.getZ() + 2; z++) {
      for (int y=current.getY() - 1; y <= current.getY() + 2; y++) {
        final Block block=getBlock(x,y,z);
        if (Block.isEqualTo(block,blockType)) {
          pos=new BlockPos(x,y,z);
        }
      }
    }
  }
  return pos;
}

Fixed version (ground truth):
/** 
 * Finds any Block of that type directly around the player.
 * @param blockType The block to search.
 * @return the position or <code>null</code> if it was not found.
 */
public BlockPos findBlock(Block blockType){
  List<BlockPos> pos=findBlocks(blockType,2);
  return pos.isEmpty() ? null : pos.get(0);
}
Program: 33087
Project: 33087
Buggy source:
/** 
 * Faces a block and destroys it if possible.
 * @param x
 * @param y
 * @param z
 */
public void faceAndDestroy(final BlockPos pos){
  if (!isFacingBlock(pos)) {
    faceBlock(pos);
  }
  if (isFacingBlock(pos)) {
    selectToolFor(pos);
    overrideAttack();
  }
}

Fixed version (ground truth):
/** 
 * Faces a block and destroys it if possible.
 * @param pos the Position of that block.
 */
public void faceAndDestroy(final BlockPos pos){
  if (!isFacingBlock(pos)) {
    faceBlock(pos);
  }
  if (isFacingBlock(pos)) {
    selectToolFor(pos);
    overrideAttack();
  }
}
Program: 33088
Project: 33088
Buggy source:
/** 
 * Faces an exact position in space.
 * @param x
 * @param y
 * @param z
 */
public void face(double x,double y,double z){
  final double d0=x - mc.thePlayer.posX;
  final double d1=z - mc.thePlayer.posZ;
  final double d2=y - mc.thePlayer.posY - mc.thePlayer.getEyeHeight();
  final double d3=d0 * d0 + d2 * d2 + d1 * d1;
  if (d3 >= 2.500000277905201E-7D) {
    final float rotationYaw=mc.thePlayer.rotationYaw;
    final float rotationPitch=mc.thePlayer.rotationPitch;
    final float yaw=(float)(Math.atan2(d1,d0) * 180.0D / Math.PI) - 90.0F;
    final float pitch=(float)-(Math.atan2(d2,Math.sqrt(d0 * d0 + d1 * d1)) * 180.0D / Math.PI);
    mc.thePlayer.setAngles((yaw - rotationYaw) / 0.15f,-(pitch - rotationPitch) / 0.15f);
    invalidateObjectMouseOver();
  }
}

Fixed version (ground truth):
private void face(double x,double y,double z,float yawInfluence,float pitchInfluence){
  final double d0=x - mc.thePlayer.posX;
  final double d1=z - mc.thePlayer.posZ;
  final double d2=y - mc.thePlayer.posY - mc.thePlayer.getEyeHeight();
  final double d3=d0 * d0 + d2 * d2 + d1 * d1;
  if (d3 >= 2.500000277905201E-7D) {
    final float rotationYaw=mc.thePlayer.rotationYaw;
    final float rotationPitch=mc.thePlayer.rotationPitch;
    final float yaw=(float)(Math.atan2(d1,d0) * 180.0D / Math.PI) - 90.0F;
    final float pitch=(float)-(Math.atan2(d2,Math.sqrt(d0 * d0 + d1 * d1)) * 180.0D / Math.PI);
    float rotations=fullRotations(yaw - rotationYaw);
    mc.thePlayer.setAngles(rotations / .15f + (yaw - rotationYaw - rotations) / 0.15f * yawInfluence,-(pitch - rotationPitch) / 0.15f * pitchInfluence);
    invalidateObjectMouseOver();
  }
}
Program: 33089
Project: 33089
Buggy source:
public static ArrayList<CommandDefinition> getDefinitions(Method m){
  ArrayList<CommandDefinition> list=new ArrayList<CommandDefinition>();
  final Class<?>[] types=m.getParameterTypes();
  final Annotation[][] parameterAnnotations=m.getParameterAnnotations();
  ArrayList<ParameterBuilder> builders=new ArrayList<ParameterBuilder>();
  ArrayList<ArgumentDefinition> arguments=new ArrayList<ArgumentDefinition>();
  ArrayList<Integer> parameterStarts=new ArrayList<Integer>();
  addParametersFromTo(list,m,types,parameterAnnotations,builders,arguments,parameterStarts,0);
  return list;
}

Fixed version (ground truth):
public static ArrayList<CommandDefinition> getDefinitions(Method m){
  ArrayList<CommandDefinition> list=new ArrayList<CommandDefinition>();
  final Class<?>[] types=m.getParameterTypes();
  final Annotation[][] parameterAnnotations=m.getParameterAnnotations();
  ArrayList<ParameterBuilder> builders=new ArrayList<ParameterBuilder>();
  ArrayList<ArgumentDefinition> arguments=new ArrayList<ArgumentDefinition>();
  ArrayList<Integer> parameterStarts=new ArrayList<Integer>();
  checkParameters(m,types,parameterAnnotations);
  addParametersFromTo(list,m,types,parameterAnnotations,builders,arguments,parameterStarts,0);
  return list;
}
Program: 33090
Project: 33090
Buggy source:
public AIStrategy evaluate(AIHelper helper,String[] args){
  final Object[] params=new Object[builders.size()];
  for (int parameter=0; parameter < builders.size(); parameter++) {
    final String[] argsPart=Arrays.copyOfRange(args,parameterStarts.get(parameter),parameterStarts.get(parameter + 1));
    params[parameter]=builders.get(parameter).getParameter(helper,argsPart);
  }
  try {
    final Object result=method.invoke(null,params);
    if (result instanceof AIStrategy) {
      return (AIStrategy)result;
    }
 else {
      return null;
    }
  }
 catch (  final IllegalAccessException e) {
    doThrow(e);
  }
catch (  final IllegalArgumentException e) {
    doThrow(e);
  }
catch (  final InvocationTargetException e) {
    final Throwable exception=e.getTargetException();
    doThrow(exception);
  }
  return null;
}

Fixed version (ground truth):
public AIStrategy evaluate(AIHelper helper,String[] args){
  final Object[] params=new Object[builders.size()];
  for (int parameter=0; parameter < builders.size(); parameter++) {
    final String[] argsPart=Arrays.copyOfRange(args,parameterStarts.get(parameter),parameterStarts.get(parameter + 1));
    params[parameter]=builders.get(parameter).getParameter(helper,argsPart);
  }
  try {
    final Object result=method.invoke(null,params);
    if (result instanceof AIStrategy) {
      return (AIStrategy)result;
    }
 else {
      return null;
    }
  }
 catch (  final IllegalAccessException e) {
    doThrow(e);
  }
catch (  final IllegalArgumentException e) {
    dumIAE(e,params);
    doThrow(e);
  }
catch (  final InvocationTargetException e) {
    final Throwable exception=e.getTargetException();
    doThrow(exception);
  }
  return null;
}
Program: 33091
Project: 33091
Buggy source:
private void checkCommandClass(Class<?> commandClass){
  if (!commandClass.isAnnotationPresent(AICommand.class)) {
    throw new IllegalArgumentException("String_Node_Str");
  }
}

Fixed version (ground truth):
private void checkCommandClass(Class<?> commandClass){
  if (!commandClass.isAnnotationPresent(AICommand.class)) {
    throw new IllegalArgumentException("String_Node_Str" + commandClass.getName() + "String_Node_Str");
  }
}
Program: 33093
Project: 33093
Buggy source:
private void pqRemove(int n,int oldDistance){
  if (pqMinDistance >= 0 && oldDistance < pqMinDistance + FAST_DISTANCE_ACCESS) {
    int slot=pqSlotFor(oldDistance);
    int[] slotArray=pqByDistance[slot];
    int fill=pqByDistanceFill[slot];
    pqByDistanceFill[slot]=fill - 1;
    for (int i=0; i < fill - 1; i++) {
      if (slotArray[i] == n) {
        slotArray[i]=slotArray[fill - 1];
        break;
      }
    }
    if (fill == 1 && oldDistance == pqMinDistance) {
      pqFindNextMin();
    }
  }
 else {
    pq.remove(n);
  }
}

Fixed version (ground truth):
private void pqRemove(int n,int oldDistance){
  if (pqMinDistance >= 0 && oldDistance < pqMinDistance + FAST_DISTANCE_ACCESS) {
    int slot=pqSlotFor(oldDistance);
    int[] slotArray=pqByDistance[slot];
    int fill=pqByDistanceFill[slot];
    pqByDistanceFill[slot]=fill - 1;
    boolean found=false;
    for (int i=0; i < fill - 1; i++) {
      if (slotArray[i] == n) {
        slotArray[i]=slotArray[fill - 1];
        found=true;
        break;
      }
    }
    if (!found) {
      System.out.println("String_Node_Str" + n + "String_Node_Str"+ oldDistance+ "String_Node_Str");
    }
    if (fill == 1 && oldDistance == pqMinDistance) {
      pqFindNextMin();
    }
  }
 else {
    pq.remove(n);
  }
}
Program: 33094
Project: 33094
Buggy source:
private void pqAdd(int node,int distance){
  if (getDistance(node) != distance) {
    throw new IllegalArgumentException("String_Node_Str" + distance + "String_Node_Str"+ getDistance(node));
  }
  if (pqMinDistance < 0) {
    pqMinDistance=distance;
  }
  if (distance < pqMinDistance + FAST_DISTANCE_ACCESS) {
    int slot=pqSlotFor(distance);
    int[] slotArray=pqByDistance[slot];
    int fill=pqByDistanceFill[slot];
    pqByDistanceFill[slot]=fill + 1;
    if (slotArray.length <= fill + 1) {
      slotArray=Arrays.copyOf(slotArray,slotArray.length * 2);
      pqByDistance[slot]=slotArray;
    }
    slotArray[fill]=node;
  }
 else {
    pq.offer(node);
  }
}

Fixed version (ground truth):
private void pqAdd(int node,int distance){
  if (getDistance(node) != distance) {
    throw new IllegalArgumentException("String_Node_Str" + distance + "String_Node_Str"+ getDistance(node));
  }
  if (pqMinDistance < 0) {
    pqMinDistance=distance;
  }
  while (distance < pqMinDistance) {
    pqMinDistance--;
    int slotToEmpty=pqSlotFor(pqMinDistance);
    for (int i=0; i < pqByDistanceFill[slotToEmpty]; i++) {
      pq.offer(pqByDistance[slotToEmpty][i]);
    }
    pqByDistanceFill[slotToEmpty]=0;
  }
  if (distance < pqMinDistance + FAST_DISTANCE_ACCESS) {
    int slot=pqSlotFor(distance);
    int[] slotArray=pqByDistance[slot];
    int fill=pqByDistanceFill[slot];
    pqByDistanceFill[slot]=fill + 1;
    if (slotArray.length <= fill + 1) {
      slotArray=Arrays.copyOf(slotArray,slotArray.length * 2);
      pqByDistance[slot]=slotArray;
    }
    slotArray[fill]=node;
  }
 else {
    pq.offer(node);
  }
}
Program: 33095
Project: 33095
Buggy source:
@AICommandInvocation() public static AIStrategy run2(AIHelper helper,@AICommandParameter(type=ParameterType.FIXED,fixedName="String_Node_Str",description="String_Node_Str") String nameArg,@AICommandParameter(type=ParameterType.POSITION,description="String_Node_Str",optional=true) Pos pos){
  setPos(helper,pos,true);
  return null;
}

Fixed version (ground truth):
@AICommandInvocation() public static AIStrategy run2(AIHelper helper,@AICommandParameter(type=ParameterType.FIXED,fixedName="String_Node_Str",description="String_Node_Str") String nameArg,@AICommandParameter(type=ParameterType.POSITION,description="String_Node_Str",optional=true) BlockPos pos){
  setPos(helper,pos,true);
  return null;
}
Program: 33096
Project: 33096
Buggy source:
public Pos add(int x,int y,int z){
  return new Pos(this.x + x,this.y + y,this.z + z);
}

Fixed version (ground truth):
public Pos add(Pos pos){
  return add(pos.x,pos.y,pos.z);
}
Program: 33097
Project: 33097
Buggy source:
@Override public void addTask(AITask task){
  tasks.add(task);
}

Fixed version (ground truth):
@Override public void addTask(AITask task){
  if (task == null) {
    throw new NullPointerException();
  }
  tasks.add(task);
}
Program: 33099
Project: 33099
Buggy source:
@SubscribeEvent public void drawMarkers(RenderWorldLastEvent event){
  final EntityLivingBase player=getMinecraft().renderViewEntity;
  if (player.getHeldItem() != null && player.getHeldItem().getItem() == Items.wooden_axe) {
    final double x=player.lastTickPosX + (player.posX - player.lastTickPosX) * event.partialTicks;
    final double y=player.lastTickPosY + (player.posY - player.lastTickPosY) * event.partialTicks;
    final double z=player.lastTickPosZ + (player.posZ - player.lastTickPosZ) * event.partialTicks;
    if (markerRenderer == null) {
      markerRenderer=new MarkerRenderer();
    }
    markerRenderer.render(x,y,z,pos1,pos2);
  }
}

Fixed version (ground truth):
/** 
 * Draws the position markers.
 * @param event
 */
@SubscribeEvent public void drawMarkers(RenderWorldLastEvent event){
  final EntityLivingBase player=getMinecraft().renderViewEntity;
  if (player.getHeldItem() != null && player.getHeldItem().getItem() == Items.wooden_axe) {
    final double x=player.lastTickPosX + (player.posX - player.lastTickPosX) * event.partialTicks;
    final double y=player.lastTickPosY + (player.posY - player.lastTickPosY) * event.partialTicks;
    final double z=player.lastTickPosZ + (player.posZ - player.lastTickPosZ) * event.partialTicks;
    if (markerRenderer == null) {
      markerRenderer=new MarkerRenderer();
    }
    markerRenderer.render(x,y,z,pos1,pos2);
  }
}
Program: 33100
Project: 33100
Buggy source:
protected void attachTag(String imageId,String nameAndTag) throws MojoFailureException {
  try {
    getLog().info(String.format("String_Node_Str",imageId,nameAndTag));
    getDockerProvider().tagImage(imageId,nameAndTag);
  }
 catch (  DockerException e) {
    String message=String.format("String_Node_Str",imageId,nameAndTag);
    handleDockerException(message,e);
  }
}

Fixed version (ground truth):
protected void attachTag(String imageId,String nameAndTag) throws MojoFailureException {
  try {
    getLog().info(String.format("String_Node_Str",imageId,nameAndTag));
    getDockerProvider().tagImage(imageId,nameAndTag);
  }
 catch (  DockerException e) {
    String message=String.format("String_Node_Str",nameAndTag,imageId);
    handleDockerException(message,e);
  }
}
Program: 33101
Project: 33101
Buggy source:
/** 
 * Common method for re-throwing a   {@link DockerException} as a {@link MojoFailureException} with a more specificerror message. Extract into a common, template method in this base class to allow pre "verify" Mojos to handle errors differently.
 * @param message The message for the exception
 * @param e       The Docker Exception
 * @throws org.apache.maven.plugin.MojoFailureException to indicate Plugin failure
 */
protected void handleDockerException(String message,DockerException e) throws MojoFailureException {
  Optional<String> apiResponse=e.getApiResponse();
  if (apiResponse.isPresent()) {
    message+="String_Node_Str" + apiResponse.get();
  }
  throw new MojoFailureException(message,e);
}

Fixed version (ground truth):
/** 
 * Common method for re-throwing a   {@link DockerException} as a {@link MojoFailureException} with a more specificerror message. Extract into a common, template method in this base class to allow pre "verify" Mojos to handle errors differently.
 * @param message The message for the exception
 * @param e       The Docker Exception
 * @throws org.apache.maven.plugin.MojoFailureException to indicate Plugin failure
 */
protected void handleDockerException(final String message,DockerException e) throws MojoFailureException {
  Optional<String> apiResponse=e.getApiResponse();
  String exceptionMessage=apiResponse.isPresent() ? (message + "String_Node_Str" + apiResponse.get()) : message;
  throw new MojoFailureException(exceptionMessage,e);
}
Program: 33102
Project: 33102
Buggy source:
protected String getRegistryAuthHeaderValue(){
  if (credentials == null) {
    return REGISTRY_AUTH_NULL_VALUE;
  }
  return BaseEncoding.base64().encode(toJson(credentials).getBytes());
}

Fixed version (ground truth):
protected String getRegistryAuthHeaderValue(){
  if (credentials == null) {
    return REGISTRY_AUTH_NULL_VALUE;
  }
  return BaseEncoding.base64().encode(toJson(credentials).getBytes(Charset.forName("String_Node_Str")));
}
Program: 33103
Project: 33103
Buggy source:
public String getLogs(final String containerId){
  byte[] bytes=getServiceEndPoint().path(containerId).path("String_Node_Str").queryParam("String_Node_Str",1).queryParam("String_Node_Str",1).request("String_Node_Str").get(byte[].class);
  StringBuilder logs=new StringBuilder();
  ByteBuffer bb=ByteBuffer.wrap(bytes).order(ByteOrder.BIG_ENDIAN);
  while (bb.hasRemaining()) {
    bb.position(bb.position() + 4);
    int frameLength=bb.getInt();
    byte[] frame=new byte[frameLength];
    bb.get(frame);
    logs.append(new String(frame));
  }
  return logs.toString();
}

Fixed version (ground truth):
public String getLogs(final String containerId){
  byte[] bytes=getServiceEndPoint().path(containerId).path("String_Node_Str").queryParam("String_Node_Str",1).queryParam("String_Node_Str",1).request("String_Node_Str").get(byte[].class);
  StringBuilder logs=new StringBuilder();
  ByteBuffer bb=ByteBuffer.wrap(bytes).order(ByteOrder.BIG_ENDIAN);
  while (bb.hasRemaining()) {
    bb.position(bb.position() + 4);
    int frameLength=bb.getInt();
    byte[] frame=new byte[frameLength];
    bb.get(frame);
    logs.append(new String(frame,Charset.forName("String_Node_Str")));
  }
  return logs.toString();
}
Program: 33104
Project: 33104
Buggy source:
protected Optional<URI> getDockerUriFromEnvironment(){
  String envDockerHost=System.getenv(RemoteDockerProvider.DOCKER_HOST_SYSTEM_ENV);
  try {
    return Optional.of(URI.create(envDockerHost));
  }
 catch (  NullPointerException|IllegalArgumentException ignored) {
    return Optional.absent();
  }
}

Fixed version (ground truth):
protected Optional<URI> getDockerUriFromEnvironment(){
  String envDockerHost=System.getenv(RemoteDockerProvider.DOCKER_HOST_SYSTEM_ENV);
  if (envDockerHost == null) {
    return Optional.absent();
  }
  try {
    URI uri=URI.create(envDockerHost);
    return Optional.of(uri);
  }
 catch (  IllegalArgumentException ignored) {
    return Optional.absent();
  }
}
Program: 33105
Project: 33105
Buggy source:
@Override public Optional<Integer> get(){
  Optional<String> port=Optional.fromNullable(System.getProperty(RemoteDockerProvider.DOCKER_PORT_PROPERTY));
  return port.isPresent() ? Optional.of(new Integer(port.get())) : Optional.<Integer>absent();
}

Fixed version (ground truth):
@Override public Optional<Integer> get(){
  Optional<String> port=Optional.fromNullable(System.getProperty(RemoteDockerProvider.DOCKER_PORT_PROPERTY));
  return port.isPresent() ? Optional.of(Integer.valueOf(port.get())) : Optional.<Integer>absent();
}
Program: 33106
Project: 33106
Buggy source:
@Test public void testSuccessfulOAuth2LoginWithoutAuthorities() throws Exception {
  LOG.info("String_Node_Str");
  LOG.debug("String_Node_Str");
  startOAuth2ProviderMimic("String_Node_Str");
  startWebServer(TEST_OAUTH2_SUCCESS_URL,null);
  loginSuccessfullyExpectingAuthorizedUser(Void -> testComplete());
  await(1,TimeUnit.SECONDS);
}

Fixed version (ground truth):
@Test public void testSuccessfulOAuth2LoginWithoutAuthorities() throws Exception {
  LOG.info("String_Node_Str");
  LOG.debug("String_Node_Str");
  startOAuth2ProviderMimic("String_Node_Str");
  startWebServer(TEST_OAUTH2_SUCCESS_URL,null);
  loginSuccessfullyExpectingAuthorizedUser(Void -> testComplete());
  await(2,TimeUnit.SECONDS);
}
Program: 33107
Project: 33107
Buggy source:
@UiThread @AfterViews void oncreate(){
  if (!EventBus.getDefault().isRegistered(this))   EventBus.getDefault().register(this);
  context=(ActionBarActivity)getActivity();
  VaultHolder.getInstance().clear();
  if (mLinearView != null)   mLinearView.removeAllViews();
  context.getSupportActionBar().setTitle(R.string.App__name);
  java.io.File root=Storage.getRoot();
  if (!Util.canWrite(root)) {
    Util.alert(CustomApp.context,CustomApp.context.getString(R.string.Error__root_IOException),CustomApp.context.getString(R.string.Error__root_IOException_message),new DialogInterface.OnClickListener(){
      @Override public void onClick(      DialogInterface dialogInterface,      int i){
        mFinishListener.onNew(null,new SettingsFragment_());
      }
    }
,null);
    return;
  }
  adapter=new VaultsAdapter(context,null);
  ArrayList<File> files=Storage.getDirectories(root);
  for (int i=0; i < files.size(); i++) {
    adapter.add(files.get(i).getName());
    final View mView=adapter.getView(i,mLinearView);
    mLinearView.addView(mView,i);
    setClickListener(mView,i);
  }
  if (adapter.getCount() == 0) {
    nothing.setVisibility(View.VISIBLE);
    mLinearView.setVisibility(View.GONE);
  }
 else {
    nothing.setVisibility(View.GONE);
    mLinearView.setVisibility(View.VISIBLE);
  }
  showTutorial();
}

Fixed version (ground truth):
@UiThread @AfterViews void oncreate(){
  if (!EventBus.getDefault().isRegistered(this))   EventBus.getDefault().register(this);
  context=(ActionBarActivity)getActivity();
  VaultHolder.getInstance().clear();
  if (mLinearView != null)   mLinearView.removeAllViews();
  if (context.getSupportActionBar() != null)   context.getSupportActionBar().setTitle(R.string.App__name);
  java.io.File root=Storage.getRoot();
  if (!Util.canWrite(root)) {
    Util.alert(CustomApp.context,CustomApp.context.getString(R.string.Error__root_IOException),CustomApp.context.getString(R.string.Error__root_IOException_message),new DialogInterface.OnClickListener(){
      @Override public void onClick(      DialogInterface dialogInterface,      int i){
        mFinishListener.onNew(null,new SettingsFragment_());
      }
    }
,null);
    return;
  }
  adapter=new VaultsAdapter(context,null);
  ArrayList<File> files=Storage.getDirectories(root);
  for (int i=0; i < files.size(); i++) {
    adapter.add(files.get(i).getName());
    final View mView=adapter.getView(i,mLinearView);
    mLinearView.addView(mView,i);
    setClickListener(mView,i);
  }
  if (adapter.getCount() == 0) {
    nothing.setVisibility(View.VISIBLE);
    mLinearView.setVisibility(View.GONE);
  }
 else {
    nothing.setVisibility(View.GONE);
    mLinearView.setVisibility(View.VISIBLE);
  }
  showTutorial();
}
Program: 33108
Project: 33108
Buggy source:
public String getTimestamp(){
  DateFormat df=new SimpleDateFormat("String_Node_Str");
  return df.format(Timestamp);
}

Fixed version (ground truth):
public String getTimestamp(){
  DateFormat df=new SimpleDateFormat("String_Node_Str");
  if (Timestamp == null)   return "String_Node_Str";
  return df.format(Timestamp);
}
Program: 33109
Project: 33109
Buggy source:
/** 
 * Bind the provided data to the view. This is the only method not required by base adapter.
 */
View bindData(View view,final int position){
  if (this.data.get(position) == null) {
    return view;
  }
  String vault=this.data.get(position);
  View viewElement=view.findViewById(R.id.name);
  TextView tv=(TextView)viewElement;
  tv.setText(vault);
  return view;
}

Fixed version (ground truth):
/** 
 * Bind the provided data to the view. This is the only method not required by base adapter.
 */
View bindData(View view,final int position){
  if (this.data.size() <= position)   return view;
  String vault=this.data.get(position);
  View viewElement=view.findViewById(R.id.name);
  TextView tv=(TextView)viewElement;
  tv.setText(vault);
  return view;
}
Program: 33110
Project: 33110
Buggy source:
@Override public void onEvent(int event,String path){
  if (path == null || !file.getName().equals(path)) {
    return;
  }
  if ((android.os.FileObserver.ACCESS & event) != 0) {
    Util.log(absolutePath + "String_Node_Str" + path+ "String_Node_Str");
    stopWatching();
    kill(file,0);
  }
}

Fixed version (ground truth):
@Override public void onEvent(int event,String path){
  if (path == null || !file.getName().equals(path)) {
    return;
  }
  if ((android.os.FileObserver.ACCESS & event) != 0) {
    Util.log(absolutePath + "String_Node_Str" + path+ "String_Node_Str");
    stopWatching();
    kill(file,10);
  }
}
Program: 33111
Project: 33111
Buggy source:
public Cipher decryptstream() throws Exception {
  try {
    Cipher c=Cipher.getInstance(mode);
    c.init(Cipher.DECRYPT_MODE,aesKey);
    return c;
  }
 catch (  Exception ex) {
    throw ex;
  }
}

Fixed version (ground truth):
public Cipher decryptstream() throws Exception {
  Cipher c=Cipher.getInstance(mode);
  c.init(Cipher.DECRYPT_MODE,aesKey);
  return c;
}
Program: 33112
Project: 33112
Buggy source:
public Cipher encryptstream() throws Exception {
  try {
    Cipher c=Cipher.getInstance(mode);
    c.init(Cipher.ENCRYPT_MODE,aesKey);
    return c;
  }
 catch (  Exception ex) {
    throw ex;
  }
}

Fixed version (ground truth):
public Cipher encryptstream() throws Exception {
  Cipher c=Cipher.getInstance(mode);
  c.init(Cipher.ENCRYPT_MODE,aesKey);
  return c;
}
Program: 33113
Project: 33113
Buggy source:
@Background void handleData(final Uri data){
  String filename=secret.addFile(this,data);
  Uri thumbnail=storage.saveThumbnail(this,data,filename);
  if (thumbnail != null) {
    secret.addFile(this,thumbnail);
    new java.io.File(thumbnail.getPath()).delete();
  }
  try {
    this.getContentResolver().delete(data,null,null);
  }
 catch (  Exception E) {
  }
 finally {
    new File(data.getPath()).delete();
  }
}

Fixed version (ground truth):
@Background void handleData(final Uri data){
  String filename=secret.addFile(this,data);
  Uri thumbnail=storage.saveThumbnail(this,data,filename);
  if (thumbnail != null) {
    secret.addFile(this,thumbnail);
    new java.io.File(thumbnail.getPath()).delete();
  }
  try {
    this.getContentResolver().delete(data,null,null);
  }
 catch (  Exception ignored) {
  }
 finally {
    new File(data.getPath()).delete();
  }
}
Program: 33114
Project: 33114
Buggy source:
@Background void addFile(final Intent data){
  String filename=secret.addFile(context,data.getData());
  Uri thumbnail=storage.saveThumbnail(context,data.getData(),filename);
  if (thumbnail != null) {
    secret.addFile(context,thumbnail);
    new File(thumbnail.getPath()).delete();
  }
  Util.alert(context,getString(R.string.add_successful),getString(R.string.add_successful_message),new DialogInterface.OnClickListener(){
    @Override public void onClick(    DialogInterface dialogInterface,    int i){
      try {
        context.getContentResolver().delete(data.getData(),null,null);
      }
 catch (      Exception E) {
      }
 finally {
        new File(data.getData().getPath()).delete();
      }
    }
  }
,Util.emptyClickListener);
  onCreate();
}

Fixed version (ground truth):
@Background void addFile(final Intent data){
  String filename=secret.addFile(context,data.getData());
  Uri thumbnail=storage.saveThumbnail(context,data.getData(),filename);
  if (thumbnail != null) {
    secret.addFile(context,thumbnail);
    new File(thumbnail.getPath()).delete();
  }
  Util.alert(context,getString(R.string.add_successful),getString(R.string.add_successful_message),new DialogInterface.OnClickListener(){
    @Override public void onClick(    DialogInterface dialogInterface,    int i){
      try {
        context.getContentResolver().delete(data.getData(),null,null);
      }
 catch (      Exception ignored) {
      }
 finally {
        new File(data.getData().getPath()).delete();
      }
    }
  }
,Util.emptyClickListener);
  onCreate();
}
Program: 33115
Project: 33115
Buggy source:
@Background void addFile(final Intent data){
  String filename=secret.addFile(context,data.getData());
  Uri thumbnail=storage.saveThumbnail(context,data.getData(),filename);
  if (thumbnail != null) {
    secret.addFile(context,thumbnail);
    new File(thumbnail.getPath()).delete();
  }
  Util.alert(context,getString(R.string.add_successful),getString(R.string.add_successful_message),new DialogInterface.OnClickListener(){
    @Override public void onClick(    DialogInterface dialogInterface,    int i){
      try {
        context.getContentResolver().delete(data.getData(),null,null);
      }
 catch (      Exception E) {
      }
 finally {
        new File(data.getData().getPath()).delete();
      }
    }
  }
,Util.emptyClickListener);
  onCreate();
}

Fixed version (ground truth):
@Background void addFile(final Intent data){
  String filename=secret.addFile(context,data.getData());
  Uri thumbnail=storage.saveThumbnail(context,data.getData(),filename);
  if (thumbnail != null) {
    secret.addFile(context,thumbnail);
    new File(thumbnail.getPath()).delete();
  }
  Util.alert(context,getString(R.string.add_successful),getString(R.string.add_successful_message),new DialogInterface.OnClickListener(){
    @Override public void onClick(    DialogInterface dialogInterface,    int i){
      try {
        context.getContentResolver().delete(data.getData(),null,null);
      }
 catch (      Exception ignored) {
      }
 finally {
        new File(data.getData().getPath()).delete();
      }
    }
  }
,Util.emptyClickListener);
  onCreate();
}
Program: 33116
Project: 33116
Buggy source:
public void place(OrderId orderId,CustomerInformation customerInformation,List<OrderLine> orderLines,long totalAmount){
  assertHasNotBeenPlaced();
  assertMoreThanZeroOrderLines(orderLines);
  applyChange(new OrderPlacedEvent(orderId,nextVersion(),now(),customerInformation,orderLines,totalAmount));
}

Fixed version (ground truth):
public void place(OrderId orderId,CustomerInformation customerInformation,List<OrderLine> orderLines,long totalAmount){
  assertHasNotBeenPlaced();
  assertMoreThanZeroOrderLines(orderLines);
  applyChange(new OrderPlacedEvent(orderId,nextVersion(),now(),toCustomerInformation(customerInformation),toOrderLines(orderLines),totalAmount));
}
Program: 33117
Project: 33117
Buggy source:
private static void importBooks(){
  try {
    TestHttpClient publisherClient=new TestHttpClient(SERVER_ADDRESS + "String_Node_Str").init();
    String contractsJson=Resources.toString(getResource("String_Node_Str"),UTF_8);
    TypeReference<List<RegisterPublisherContractRequest>> listOfRegisterPublisherRequests=new TypeReference<List<RegisterPublisherContractRequest>>(){
    }
;
    List<RegisterPublisherContractRequest> publisherContractsRequests=deserialize(contractsJson,listOfRegisterPublisherRequests);
    for (    RegisterPublisherContractRequest request : publisherContractsRequests) {
      publisherClient.post(JsonSerializer.serialize(request));
    }
    System.out.println("String_Node_Str" + publisherContractsRequests.size() + "String_Node_Str");
    TestHttpClient bookClient=new TestHttpClient(SERVER_ADDRESS + "String_Node_Str").init();
    String booksJson=Resources.toString(getResource("String_Node_Str"),UTF_8);
    TypeReference<List<BookDto>> listOfCreateBookRequests=new TypeReference<List<BookDto>>(){
    }
;
    List<BookDto> books=deserialize(booksJson,listOfCreateBookRequests);
    for (    BookDto book : books) {
      bookClient.post(JsonSerializer.serialize(book));
    }
    System.out.println("String_Node_Str" + publisherContractsRequests.size() + "String_Node_Str");
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
private static void importBooks(){
  try {
    TestHttpClient publisherClient=new TestHttpClient(SERVER_ADDRESS + "String_Node_Str").init();
    String contractsJson=Resources.toString(getResource("String_Node_Str"),UTF_8);
    TypeReference<List<RegisterPublisherContractRequest>> listOfRegisterPublisherRequests=new TypeReference<List<RegisterPublisherContractRequest>>(){
    }
;
    List<RegisterPublisherContractRequest> publisherContractsRequests=deserialize(contractsJson,listOfRegisterPublisherRequests);
    for (    RegisterPublisherContractRequest request : publisherContractsRequests) {
      publisherClient.post(JsonSerializer.serialize(request));
    }
    System.out.println("String_Node_Str" + publisherContractsRequests.size() + "String_Node_Str");
    TestHttpClient bookClient=new TestHttpClient(SERVER_ADDRESS + "String_Node_Str").init();
    String booksJson=Resources.toString(getResource("String_Node_Str"),UTF_8);
    TypeReference<List<BookDto>> listOfCreateBookRequests=new TypeReference<List<BookDto>>(){
    }
;
    List<BookDto> books=deserialize(booksJson,listOfCreateBookRequests);
    for (    BookDto book : books) {
      bookClient.post(JsonSerializer.serialize(book));
    }
    System.out.println("String_Node_Str" + books.size() + "String_Node_Str");
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}