nus-yam/ex-repair huggingface dataset:
Program: 153014
Project: 153014
Buggy source:
public BBTHSimulation(Team localTeam,LockStepProtocol protocol,boolean isServer){
  super(3,0.1f,2,protocol,isServer);
  random.setSeed(0);
  aiController=new AIController();
  accel=new GridAcceleration(GAME_WIDTH,GAME_HEIGHT,GAME_WIDTH / 10);
  team=localTeam;
  serverPlayer=new Player(Team.SERVER,aiController,this);
  clientPlayer=new Player(Team.CLIENT,aiController,this);
  localPlayer=(team == Team.SERVER) ? serverPlayer : clientPlayer;
  remotePlayer=(team == Team.SERVER) ? clientPlayer : serverPlayer;
  playerMap=new HashMap<Boolean,Player>();
  playerMap.put(true,serverPlayer);
  playerMap.put(false,clientPlayer);
  graphGen=new FastGraphGenerator(15.0f,GAME_WIDTH,GAME_HEIGHT);
  accel.insertWalls(graphGen.walls);
  pathFinder=new Pathfinder(graphGen.graph);
  tester=new FastLineOfSightTester(15.f,accel);
  aiController.setPathfinder(pathFinder,graphGen.graph,tester,accel);
  aiController.setUpdateFraction(.1f);
  cachedUnits=new HashSet<Unit>();
}

Fixed version (ground truth):
public BBTHSimulation(Team localTeam,LockStepProtocol protocol,boolean isServer){
  super(3,0.1f,2,protocol,isServer);
  random.setSeed(0);
  tutorial=new Tutorial();
  other_ready=true;
  self_ready=false;
  aiController=new AIController();
  accel=new GridAcceleration(GAME_WIDTH,GAME_HEIGHT,GAME_WIDTH / 10);
  team=localTeam;
  serverPlayer=new Player(Team.SERVER,aiController,this);
  clientPlayer=new Player(Team.CLIENT,aiController,this);
  localPlayer=(team == Team.SERVER) ? serverPlayer : clientPlayer;
  remotePlayer=(team == Team.SERVER) ? clientPlayer : serverPlayer;
  playerMap=new HashMap<Boolean,Player>();
  playerMap.put(true,serverPlayer);
  playerMap.put(false,clientPlayer);
  graphGen=new FastGraphGenerator(15.0f,GAME_WIDTH,GAME_HEIGHT);
  accel.insertWalls(graphGen.walls);
  pathFinder=new Pathfinder(graphGen.graph);
  tester=new FastLineOfSightTester(15.f,accel);
  aiController.setPathfinder(pathFinder,graphGen.graph,tester,accel);
  aiController.setUpdateFraction(.1f);
  cachedUnits=new HashSet<Unit>();
}
Program: 153016
Project: 153016
Buggy source:
@Override public void onUpdate(float seconds){
  entireUpdateTimer.start();
  label.setText("String_Node_Str" + sim.getTimestep());
  if (bluetooth.getState() != State.CONNECTED) {
    beatTrack.stopMusic();
    nextScreen=new GameStatusMessageScreen.DisconnectScreen();
  }
  simUpdateTimer.start();
  sim.onUpdate(seconds);
  simUpdateTimer.stop();
  clientHealthRect.right=MathUtils.scale(0,100,minimapRect.left + 1,minimapRect.right - 1,sim.localPlayer.getHealth());
  serverHealthRect.right=MathUtils.scale(0,100,minimapRect.left + 1,minimapRect.right - 1,sim.remotePlayer.getHealth());
  if (sim.localPlayer.getHealth() <= 0.f) {
  }
  if (sim.remotePlayer.getHealth() <= 0.f) {
  }
  beatTrack.refreshBeats();
  Unit mostAdvanced=sim.getOpponentsMostAdvancedUnit();
  if (mostAdvanced != null) {
    this.scrollTo(mostAdvanced.getX(),mostAdvanced.getY() - BBTHGame.HEIGHT / 2);
  }
  particles.tick(seconds);
  entireUpdateTimer.stop();
}

Fixed version (ground truth):
@Override public void onUpdate(float seconds){
  entireUpdateTimer.start();
  label.setText("String_Node_Str" + sim.getTimestep());
  if (bluetooth.getState() != State.CONNECTED) {
    beatTrack.stopMusic();
    nextScreen=new GameStatusMessageScreen.DisconnectScreen();
  }
  simUpdateTimer.start();
  sim.onUpdate(seconds);
  simUpdateTimer.stop();
  if (sim.isReady() && !beatTrack.isPlaying()) {
    beatTrack.startMusic();
  }
  clientHealthRect.right=MathUtils.scale(0,100,minimapRect.left + 1,minimapRect.right - 1,sim.localPlayer.getHealth());
  serverHealthRect.right=MathUtils.scale(0,100,minimapRect.left + 1,minimapRect.right - 1,sim.remotePlayer.getHealth());
  if (sim.localPlayer.getHealth() <= 0.f) {
  }
  if (sim.remotePlayer.getHealth() <= 0.f) {
  }
  beatTrack.refreshBeats();
  Unit mostAdvanced=sim.getOpponentsMostAdvancedUnit();
  if (mostAdvanced != null) {
    this.scrollTo(mostAdvanced.getX(),mostAdvanced.getY() - BBTHGame.HEIGHT / 2);
  }
  particles.tick(seconds);
  entireUpdateTimer.stop();
}
Program: 153017
Project: 153017
Buggy source:
public Player(Team team,AIController controller,UnitManager unitManager){
  this.team=team;
  this.unitManager=unitManager;
  units=new ArrayList<Unit>();
  base=new Base(this,team);
  _health=100;
  setCombo(0);
  paint=new Paint();
  paint.setStrokeWidth(2.0f);
  paint.setStrokeJoin(Join.ROUND);
  paint.setTextSize(20);
  paint.setAntiAlias(true);
  paint.setColor(team.getUnitColor());
  paint.setStrokeCap(Cap.ROUND);
switch (team) {
case CLIENT:
    base.setAnchor(Anchor.BOTTOM_LEFT);
  base.setPosition(0,BBTHSimulation.GAME_HEIGHT);
break;
case SERVER:
base.setAnchor(Anchor.TOP_LEFT);
base.setPosition(0,0);
break;
}
this.aiController=controller;
selector=new UnitSelector(team,unitManager);
walls=new ArrayList<WallUnit>();
}

Fixed version (ground truth):
public Player(Team team,AIController controller,UnitManager unitManager){
  this.team=team;
  this.unitManager=unitManager;
  units=new ArrayList<Unit>();
  base=new Base(this,team);
  _health=100;
  setCombo(0);
  paint=new Paint();
  paint.setStrokeWidth(2.0f);
  paint.setStrokeJoin(Join.ROUND);
  paint.setTextSize(20);
  paint.setAntiAlias(true);
  paint.setColor(team.getUnitColor());
  paint.setStrokeCap(Cap.ROUND);
switch (team) {
case CLIENT:
    base.setAnchor(Anchor.BOTTOM_LEFT);
  base.setPosition(0,BBTHSimulation.GAME_HEIGHT);
break;
case SERVER:
base.setAnchor(Anchor.TOP_LEFT);
base.setPosition(0,0);
break;
}
this.aiController=controller;
selector=new UnitSelector(team,unitManager,BBTHSimulation.PARTICLES);
walls=new ArrayList<WallUnit>();
}
Program: 153018
Project: 153018
Buggy source:
public void draw(Canvas canvas){
  base.onDraw(canvas);
  paint.setColor(team.getWallColor());
  for (int i=0; i < walls.size(); i++) {
    walls.get(i).draw(canvas);
  }
  paint.setStyle(Style.STROKE);
  paint.setColor(team.getUnitColor());
  for (int i=0; i < units.size(); i++) {
    units.get(i).draw(canvas);
  }
  paint.setStyle(Style.FILL);
}

Fixed version (ground truth):
public void draw(Canvas canvas){
  base.onDraw(canvas);
  paint.setColor(team.getWallColor());
  for (int i=0; i < walls.size(); i++) {
    walls.get(i).drawChassis(canvas);
  }
  paint.setStyle(Style.STROKE);
  paint.setColor(team.getUnitColor());
  for (int i=0; i < units.size(); i++) {
    units.get(i).drawChassis(canvas);
  }
  for (int i=0; i < units.size(); i++) {
    units.get(i).drawEffects(canvas);
  }
}
Program: 153019
Project: 153019
Buggy source:
public void drawForMiniMap(Canvas canvas){
  paint.setStyle(Style.FILL);
  paint.setColor(team.getUnitColor());
  for (int i=0; i < units.size(); i++) {
    units.get(i).drawForMiniMap(canvas);
  }
  paint.setColor(team.getWallColor());
  for (int i=0; i < walls.size(); i++) {
    walls.get(i).draw(canvas);
  }
}

Fixed version (ground truth):
public void drawForMiniMap(Canvas canvas){
  paint.setStyle(Style.FILL);
  paint.setColor(team.getUnitColor());
  for (int i=0; i < units.size(); i++) {
    units.get(i).drawForMiniMap(canvas);
  }
  paint.setColor(team.getWallColor());
  for (int i=0; i < walls.size(); i++) {
    walls.get(i).drawChassis(canvas);
  }
}
Program: 153020
Project: 153020
Buggy source:
public Wall endWall(float x,float y){
  currentWall.b.set(x,y);
  currentWall.updateLength();
  if (currentWall.length < BBTHSimulation.MIN_WALL_LENGTH) {
    return null;
  }
  walls.add(new WallUnit(currentWall,unitManager,team,paint));
  Wall toReturn=currentWall;
  currentWall=null;
  return toReturn;
}

Fixed version (ground truth):
public Wall endWall(float x,float y){
  currentWall.b.set(x,y);
  currentWall.updateLength();
  if (currentWall.length < BBTHSimulation.MIN_WALL_LENGTH) {
    return null;
  }
  walls.add(new WallUnit(currentWall,unitManager,team,paint,BBTHSimulation.PARTICLES));
  Wall toReturn=currentWall;
  currentWall=null;
  return toReturn;
}
Program: 153021
Project: 153021
Buggy source:
public void spawnUnit(float x,float y){
  for (int i=0; i < 10; ++i) {
    float angle=MathUtils.randInRange(0,2 * MathUtils.PI);
    float xVel=MathUtils.randInRange(25.f,50.f) * FloatMath.cos(angle);
    float yVel=MathUtils.randInRange(25.f,50.f) * FloatMath.sin(angle);
    BBTHSimulation.PARTICLES.createParticle().circle().velocity(xVel,yVel).shrink(0.1f,0.15f).radius(3.0f).position(x,y).color(team.getRandomShade());
  }
  Unit newUnit=null;
  if (_combo != 0 && _combo % BBTHSimulation.UBER_UNIT_THRESHOLD == 0) {
    newUnit=UnitType.UBER.createUnit(unitManager,team,paint);
  }
 else {
    newUnit=selector.getUnitType().createUnit(unitManager,team,paint);
  }
  newUnit.setPosition(x,y);
  if (team == Team.SERVER) {
    newUnit.setVelocity(BBTHSimulation.randInRange(30,70),MathUtils.PI / 2.f);
  }
 else {
    newUnit.setVelocity(BBTHSimulation.randInRange(30,70),-MathUtils.PI / 2.f);
  }
  aiController.addEntity(newUnit);
  units.add(newUnit);
}

Fixed version (ground truth):
public void spawnUnit(float x,float y){
  for (int i=0; i < 10; ++i) {
    float angle=MathUtils.randInRange(0,2 * MathUtils.PI);
    float xVel=MathUtils.randInRange(25.f,50.f) * FloatMath.cos(angle);
    float yVel=MathUtils.randInRange(25.f,50.f) * FloatMath.sin(angle);
    BBTHSimulation.PARTICLES.createParticle().circle().velocity(xVel,yVel).shrink(0.1f,0.15f).radius(3.0f).position(x,y).color(team.getRandomShade());
  }
  Unit newUnit=null;
  if (_combo != 0 && _combo % BBTHSimulation.UBER_UNIT_THRESHOLD == 0) {
    newUnit=UnitType.UBER.createUnit(unitManager,team,paint,BBTHSimulation.PARTICLES);
  }
 else {
    newUnit=selector.getUnitType().createUnit(unitManager,team,paint,BBTHSimulation.PARTICLES);
  }
  newUnit.setPosition(x,y);
  if (team == Team.SERVER) {
    newUnit.setVelocity(BBTHSimulation.randInRange(30,70),MathUtils.PI / 2.f);
  }
 else {
    newUnit.setVelocity(BBTHSimulation.randInRange(30,70),-MathUtils.PI / 2.f);
  }
  aiController.addEntity(newUnit);
  units.add(newUnit);
}
Program: 153022
Project: 153022
Buggy source:
public UnitSelector(Team team,UnitManager mom){
  currentUnitType=UnitType.ATTACKING;
  rectPaint=new Paint(Paint.ANTI_ALIAS_FLAG);
  rectPaint.setARGB(127,0,0,0);
  unitPaint=new Paint(Paint.ANTI_ALIAS_FLAG);
  unitPaint.setStrokeWidth(2.0f);
  unitPaint.setStrokeJoin(Join.ROUND);
  unitPaint.setStyle(Style.STROKE);
  unitPaint.setAntiAlias(true);
  unitPaint.setStrokeCap(Cap.ROUND);
  attacker=UnitType.ATTACKING.createUnit(mom,team,unitPaint);
  attacker.setPosition(DIMENSIONS.centerX(),UNIT_HEIGHT / 2);
  defender=UnitType.DEFENDING.createUnit(mom,team,unitPaint);
  defender.setPosition(DIMENSIONS.centerX(),UNIT_HEIGHT + UNIT_HEIGHT / 2);
}

Fixed version (ground truth):
public UnitSelector(Team team,UnitManager mom,ParticleSystem particles){
  currentUnitType=UnitType.ATTACKING;
  rectPaint=new Paint(Paint.ANTI_ALIAS_FLAG);
  rectPaint.setARGB(127,0,0,0);
  unitPaint=new Paint(Paint.ANTI_ALIAS_FLAG);
  unitPaint.setStrokeWidth(2.0f);
  unitPaint.setStrokeJoin(Join.ROUND);
  unitPaint.setStyle(Style.STROKE);
  unitPaint.setAntiAlias(true);
  unitPaint.setStrokeCap(Cap.ROUND);
  attacker=UnitType.ATTACKING.createUnit(mom,team,unitPaint,particles);
  attacker.setPosition(DIMENSIONS.centerX(),UNIT_HEIGHT / 2);
  defender=UnitType.DEFENDING.createUnit(mom,team,unitPaint,particles);
  defender.setPosition(DIMENSIONS.centerX(),UNIT_HEIGHT + UNIT_HEIGHT / 2);
}
Program: 153023
Project: 153023
Buggy source:
public void draw(Canvas canvas){
  canvas.drawRect(DIMENSIONS,rectPaint);
  if (this.currentUnitType == UnitType.ATTACKING) {
    unitPaint.setColor(Color.WHITE);
    attacker.draw(canvas);
    unitPaint.setColor(Color.GRAY);
    defender.draw(canvas);
  }
 else   if (this.currentUnitType == UnitType.DEFENDING) {
    unitPaint.setColor(Color.WHITE);
    defender.draw(canvas);
    unitPaint.setColor(Color.GRAY);
    attacker.draw(canvas);
  }
}

Fixed version (ground truth):
public void draw(Canvas canvas){
  canvas.drawRect(DIMENSIONS,rectPaint);
  if (this.currentUnitType == UnitType.ATTACKING) {
    unitPaint.setColor(Color.WHITE);
    attacker.drawChassis(canvas);
    unitPaint.setColor(Color.GRAY);
    defender.drawChassis(canvas);
  }
 else   if (this.currentUnitType == UnitType.DEFENDING) {
    unitPaint.setColor(Color.WHITE);
    defender.drawChassis(canvas);
    unitPaint.setColor(Color.GRAY);
    attacker.drawChassis(canvas);
  }
}
Program: 153024
Project: 153024
Buggy source:
public void draw(Canvas canvas){
  drawGrid(canvas);
  paint.setColor(Color.YELLOW);
  for (int i=0; i < graphGen.walls.size(); i++) {
    Wall w=graphGen.walls.get(i);
    canvas.drawLine(w.a.x,w.a.y,w.b.x,w.b.y,paint);
  }
  localPlayer.draw(canvas);
  remotePlayer.draw(canvas);
}

Fixed version (ground truth):
public void draw(Canvas canvas){
  drawGrid(canvas);
  localPlayer.draw(canvas);
  remotePlayer.draw(canvas);
}
Program: 153025
Project: 153025
Buggy source:
public BBTHSimulation(Team localTeam,LockStepProtocol protocol,boolean isServer){
  super(6,0.1f,2,protocol,isServer);
  aiController=new AIController();
  accel=new GridAcceleration(GAME_WIDTH,GAME_HEIGHT,GAME_WIDTH / 10);
  team=localTeam;
  serverPlayer=new Player(Team.SERVER,aiController);
  clientPlayer=new Player(Team.CLIENT,aiController);
  localPlayer=(team == Team.SERVER) ? serverPlayer : clientPlayer;
  remotePlayer=(team == Team.SERVER) ? clientPlayer : serverPlayer;
  playerMap=new HashMap<Boolean,Player>();
  playerMap.put(true,serverPlayer);
  playerMap.put(false,clientPlayer);
  graphGen=new FastGraphGenerator(15.0f,GAME_WIDTH - 10,GAME_HEIGHT - 10);
  accel.insertWalls(graphGen.walls);
  pathFinder=new Pathfinder(graphGen.graph);
  tester=new FastLineOfSightTester(15.f,accel);
  aiController.setPathfinder(pathFinder,graphGen.graph,tester,accel);
  aiController.setUpdateFraction(.3f);
  cachedUnits=new HashSet<Unit>();
}

Fixed version (ground truth):
public BBTHSimulation(Team localTeam,LockStepProtocol protocol,boolean isServer){
  super(6,0.1f,2,protocol,isServer);
  aiController=new AIController();
  accel=new GridAcceleration(GAME_WIDTH,GAME_HEIGHT,GAME_WIDTH / 10);
  team=localTeam;
  serverPlayer=new Player(Team.SERVER,aiController);
  clientPlayer=new Player(Team.CLIENT,aiController);
  localPlayer=(team == Team.SERVER) ? serverPlayer : clientPlayer;
  remotePlayer=(team == Team.SERVER) ? clientPlayer : serverPlayer;
  playerMap=new HashMap<Boolean,Player>();
  playerMap.put(true,serverPlayer);
  playerMap.put(false,clientPlayer);
  graphGen=new FastGraphGenerator(15.0f,GAME_WIDTH,GAME_HEIGHT);
  accel.insertWalls(graphGen.walls);
  pathFinder=new Pathfinder(graphGen.graph);
  tester=new FastLineOfSightTester(15.f,accel);
  aiController.setPathfinder(pathFinder,graphGen.graph,tester,accel);
  aiController.setUpdateFraction(.3f);
  cachedUnits=new HashSet<Unit>();
}
Program: 153026
Project: 153026
Buggy source:
public void spawnUnit(float x,float y){
  for (int i=0; i < 40; ++i) {
    float angle=MathUtils.randInRange(0,2 * MathUtils.PI);
    float xVel=MathUtils.randInRange(25.f,50.f) * FloatMath.cos(angle);
    float yVel=MathUtils.randInRange(25.f,50.f) * FloatMath.sin(angle);
    particles.createParticle().circle().velocity(xVel,yVel).shrink(0.1f,0.15f).radius(3.0f).position(x,y).color(team.getRandomShade());
  }
  Unit newUnit=selector.getUnitType().createUnit(team,paint);
  newUnit.setPosition(x,y);
  if (team == Team.SERVER) {
    newUnit.setVelocity(MathUtils.randInRange(30,70),MathUtils.PI / 2.f);
  }
 else {
    newUnit.setVelocity(MathUtils.randInRange(30,70),-MathUtils.PI / 2.f);
  }
  aiController.addEntity(newUnit);
  units.add(newUnit);
}

Fixed version (ground truth):
public void spawnUnit(float x,float y){
  for (int i=0; i < 10; ++i) {
    float angle=MathUtils.randInRange(0,2 * MathUtils.PI);
    float xVel=MathUtils.randInRange(25.f,50.f) * FloatMath.cos(angle);
    float yVel=MathUtils.randInRange(25.f,50.f) * FloatMath.sin(angle);
    particles.createParticle().circle().velocity(xVel,yVel).shrink(0.1f,0.15f).radius(3.0f).position(x,y).color(team.getRandomShade());
  }
  Unit newUnit=selector.getUnitType().createUnit(team,paint);
  newUnit.setPosition(x,y);
  if (team == Team.SERVER) {
    newUnit.setVelocity(MathUtils.randInRange(30,70),MathUtils.PI / 2.f);
  }
 else {
    newUnit.setVelocity(MathUtils.randInRange(30,70),-MathUtils.PI / 2.f);
  }
  aiController.addEntity(newUnit);
  units.add(newUnit);
}
Program: 153028
Project: 153028
Buggy source:
public void removeEntity(Unit u){
  m_entities.get(u.getTeam()).add(u);
  m_flocks.get(u.getTeam()).addObject(u);
}

Fixed version (ground truth):
public void removeEntity(Unit u){
  m_entities.get(u.getTeam()).remove(u);
  m_flocks.get(u.getTeam()).removeObject(u);
}
Program: 153032
Project: 153032
Buggy source:
@Override protected void update(float seconds){
  timestep++;
  aiController.update();
  localPlayer.update(seconds);
  remotePlayer.update(seconds);
}

Fixed version (ground truth):
@Override protected void update(float seconds){
  timestep++;
  aiController.update();
  if (team == Team.TEAM_1) {
    localPlayer.update(seconds);
    remotePlayer.update(seconds);
  }
 else {
    remotePlayer.update(seconds);
    localPlayer.update(seconds);
  }
}
Program: 153033
Project: 153033
Buggy source:
public void draw(Canvas canvas){
  localPlayer.draw(canvas);
  remotePlayer.draw(canvas);
}

Fixed version (ground truth):
public void draw(Canvas canvas){
  if (team == Team.TEAM_0) {
    remotePlayer.draw(canvas);
    localPlayer.draw(canvas);
  }
 else {
    localPlayer.draw(canvas);
    remotePlayer.draw(canvas);
  }
}
Program: 153034
Project: 153034
Buggy source:
public InGameScreen(Team playerTeam,Bluetooth bluetooth,LockStepProtocol protocol){
  super(null);
  this.team=playerTeam;
  this.setSize(BBTHGame.WIDTH,BBTHGame.HEIGHT);
  this.setPosition(0,0);
  this.setScrolls(false);
  label=new UILabel("String_Node_Str",null);
  label.setTextSize(10);
  label.setPosition(10,10);
  label.setSize(BBTHGame.WIDTH - 20,10);
  label.setTextAlign(Align.CENTER);
  addSubview(label);
  this.bluetooth=bluetooth;
  sim=new BBTHSimulation(playerTeam,protocol);
  sim.setupSubviews(this);
}

Fixed version (ground truth):
public InGameScreen(Team playerTeam,Bluetooth bluetooth,LockStepProtocol protocol){
  super(null);
  MathUtils.resetRandom(0);
  this.team=playerTeam;
  this.setSize(BBTHGame.WIDTH,BBTHGame.HEIGHT);
  this.setPosition(0,0);
  this.setScrolls(false);
  label=new UILabel("String_Node_Str",null);
  label.setTextSize(10);
  label.setPosition(10,10);
  label.setSize(BBTHGame.WIDTH - 20,10);
  label.setTextAlign(Align.CENTER);
  addSubview(label);
  this.bluetooth=bluetooth;
  sim=new BBTHSimulation(playerTeam,protocol);
  sim.setupSubviews(this);
}
Program: 153035
Project: 153035
Buggy source:
public void spawnUnit(float x,float y){
  Unit u=new Unit(team);
switch (this.team) {
case TEAM_0:
    u.setVelocity(MathUtils.randInRange(5,10),(float)Math.PI * 3f / 2f);
  break;
case TEAM_1:
u.setVelocity(MathUtils.randInRange(-10,-5),(float)Math.PI * 3f / 2f);
break;
}
u.setPosition(x,y);
aiController.addEntity(u);
units.add(u);
}

Fixed version (ground truth):
public void spawnUnit(float x,float y){
  Unit u=new Unit(team);
  u.setPosition(x,y);
  aiController.addEntity(u);
  units.add(u);
}
Program: 153036
Project: 153036
Buggy source:
public void update(float seconds){
  this.update(seconds);
  view.setPosition(this.getX(),this.getY());
}

Fixed version (ground truth):
public void update(float seconds){
  super.update(seconds);
  view.setPosition(this.getX(),this.getY());
}
Program: 153038
Project: 153038
Buggy source:
@Override public TestResult invoke(TestMethodExecutor testMethodExecutor){
  if (testMethodExecutor == null)   throw new IllegalArgumentException("String_Node_Str");
  String testClass=testMethodExecutor.getInstance().getClass().getName();
  String testMethod=testMethodExecutor.getMethod().getName();
  TestResult result=null;
  try {
    MBeanServer mbeanServer=getMBeanServer();
    ObjectName objectName=new ObjectName(JMXTestRunnerMBean.OBJECT_NAME);
    JMXTestRunnerMBean testRunner=getMBeanProxy(mbeanServer,objectName,JMXTestRunnerMBean.class);
    InputStream resultStream=testRunner.runTestMethodRemote(testClass,testMethod);
    ObjectInputStream ois=new ObjectInputStream(resultStream);
    result=(TestResult)ois.readObject();
  }
 catch (  final Throwable e) {
    result=new TestResult(Status.FAILED);
    result.setThrowable(e);
  }
 finally {
    result.setEnd(System.currentTimeMillis());
  }
  return result;
}

Fixed version (ground truth):
@Override public TestResult invoke(TestMethodExecutor testMethodExecutor){
  if (testMethodExecutor == null)   throw new IllegalArgumentException("String_Node_Str");
  String testClass=testMethodExecutor.getInstance().getClass().getName();
  String testMethod=testMethodExecutor.getMethod().getName();
  TestResult result=null;
  try {
    MBeanServer mbeanServer=findOrCreateMBeanServer();
    ObjectName objectName=new ObjectName(JMXTestRunnerMBean.OBJECT_NAME);
    JMXTestRunnerMBean testRunner=getMBeanProxy(mbeanServer,objectName,JMXTestRunnerMBean.class);
    InputStream resultStream=testRunner.runTestMethodRemote(testClass,testMethod);
    ObjectInputStream ois=new ObjectInputStream(resultStream);
    result=(TestResult)ois.readObject();
  }
 catch (  final Throwable e) {
    result=new TestResult(Status.FAILED);
    result.setThrowable(e);
  }
 finally {
    result.setEnd(System.currentTimeMillis());
  }
  return result;
}
Program: 153039
Project: 153039
Buggy source:
public void onStart(){
  History.newItem(url.build(P.USERS_LIST),false);
}

Fixed version (ground truth):
public void onStart(){
  if (History.getToken().isEmpty()) {
    History.newItem(url.build(P.USERS_LIST),false);
  }
}
Program: 153040
Project: 153040
Buggy source:
@Override protected void convertFromUrl(PortalUrl url,Portal view,UserEventBus eventBus){
switch (P.by(view)) {
case USERS_LIST:
    eventBus.users(url.param(0));
  break;
case USER_SHOW:
eventBus.show(Integer.parseInt(url.param(0)));
}
}

Fixed version (ground truth):
@Override protected void convertFromUrl(PortalUrl url,Portal view,UserEventBus eventBus){
switch (P.by(view)) {
case USERS_LIST:
    eventBus.users(url.param(0));
  break;
case USER_SHOW:
eventBus.show(Integer.parseInt(url.param(0)));
break;
}
}
Program: 153041
Project: 153041
Buggy source:
@Override protected boolean layout(Portal view,Layout layout,State state,UserEventBus eventBus){
switch (P.by(view)) {
case USERS_LIST:
{
      eventBus.plugUsersList(O.A);
      eventBus.plugUserAvatar(O.B);
      eventBus.plugUserDetails(O.C);
    }
  return true;
case USER_SHOW:
{
  eventBus.plugUserInfo(O.A);
  eventBus.plugUserAvatar(O.B);
  eventBus.plugUserDetails(O.C);
}
}
return false;
}

Fixed version (ground truth):
@Override protected boolean layout(Portal view,Layout layout,State state,UserEventBus eventBus){
switch (P.by(view)) {
case USERS_LIST:
{
      eventBus.plugUsersList(O.A);
      eventBus.plugUserAvatar(O.B);
      eventBus.plugUserDetails(O.C);
    }
  return true;
case USER_SHOW:
{
  eventBus.plugUserInfo(O.A);
  eventBus.plugUserAvatar(O.B);
  eventBus.plugUserDetails(O.C);
}
return true;
}
return false;
}
Program: 153042
Project: 153042
Buggy source:
@Override protected void ensureOutletsLoaded(){
  super.ensureOutletsLoaded();
  if (!has(statusPlace))   throw new IllegalStateException("String_Node_Str");
}

Fixed version (ground truth):
@Override protected void ensureOutletsLoaded(){
  super.ensureOutletsLoaded();
  if (!outlets.containsKey(statusPlace))   throw new IllegalStateException("String_Node_Str");
}
Program: 153043
Project: 153043
Buggy source:
protected Layout(LayoutId id,Place[] places){
  this.id=id;
  this.places=places;
}

Fixed version (ground truth):
protected Layout(LayoutId id,List<Place> places){
  this(id,places.toArray(new Place[places.size()]));
}
Program: 153044
Project: 153044
Buggy source:
@SuppressWarnings("String_Node_Str") public static <T>T[] concat(T[] first,T[] second){
  List<T> list=new ArrayList<T>();
  list.addAll(Arrays.asList(first));
  list.addAll(Arrays.asList(second));
  return (T[])list.toArray();
}

Fixed version (ground truth):
public static <T>List<T> concat(T[] first,T[] second){
  List<T> list=new ArrayList<T>();
  list.addAll(Arrays.asList(first));
  list.addAll(Arrays.asList(second));
  return list;
}
Program: 153045
Project: 153045
Buggy source:
public LayoutEdit(){
  super(L.EDIT,new Place[]{O.A,O.B,O.C,O.D,O.STATUS});
  initWidget(uiBinder.createAndBindUi(this));
}

Fixed version (ground truth):
public LayoutEdit(){
  super(L.EDIT,new Place[]{O.A,O.B,O.C,O.D},O.STATUS);
  initWidget(uiBinder.createAndBindUi(this));
}
Program: 153046
Project: 153046
Buggy source:
public LayoutItem(){
  super(L.ITEM,new Place[]{O.A,O.B,O.C,O.STATUS});
  initWidget(uiBinder.createAndBindUi(this));
}

Fixed version (ground truth):
public LayoutItem(){
  super(L.ITEM,new Place[]{O.A,O.B,O.C},O.STATUS);
  initWidget(uiBinder.createAndBindUi(this));
}
Program: 153047
Project: 153047
Buggy source:
@Event(name="String_Node_Str",navigationEvent=true) public void companies();

Fixed version (ground truth):
@Event() public void companies();
Program: 153048
Project: 153048
Buggy source:
@Event(name="String_Node_Str",navigationEvent=true) public void edit(int cid);

Fixed version (ground truth):
@Event() public void edit(int cid);
Program: 153049
Project: 153049
Buggy source:
@Event(name="String_Node_Str",navigationEvent=true) public void show(int cid);

Fixed version (ground truth):
@Event() public void show(int cid);
Program: 153050
Project: 153050
Buggy source:
@Event(name="String_Node_Str",navigationEvent=true) public void news();

Fixed version (ground truth):
@Event() public void news();
Program: 153051
Project: 153051
Buggy source:
@Event(name="String_Node_Str",navigationEvent=true) public void edit(int nid);

Fixed version (ground truth):
@Event() public void edit(int nid);
Program: 153052
Project: 153052
Buggy source:
@Event(name="String_Node_Str",navigationEvent=true) public void show(int nid);

Fixed version (ground truth):
@Event() public void show(int nid);
Program: 153053
Project: 153053
Buggy source:
@Event(name="String_Node_Str",navigationEvent=true) public void edit(int uid);

Fixed version (ground truth):
@Event() public void edit(int uid);
Program: 153054
Project: 153054
Buggy source:
@Event(name="String_Node_Str",navigationEvent=true) public void show(int uid);

Fixed version (ground truth):
@Event() public void show(int uid);
Program: 153055
Project: 153055
Buggy source:
@Override public void showUsers(Set<User> users){
}

Fixed version (ground truth):
@Override public void showUsers(Set<User> users){
  usersHolder.clear();
  for (  User user : users) {
    usersHolder.add(new Label(user.name + "String_Node_Str" + user.familyName));
  }
}
Program: 153056
Project: 153056
Buggy source:
protected void unregisterHandlers(){
  for (  HandlerRegistration handler : handlers) {
    handler.removeHandler();
  }
}

Fixed version (ground truth):
protected void unregisterHandlers(){
  for (  HandlerRegistration handler : handlers) {
    handler.removeHandler();
  }
  handlers.clear();
}
Program: 153057
Project: 153057
Buggy source:
public void keyPressed(KeyEvent e){
  System.out.println("String_Node_Str" + e.getKeyCode());
  System.out.println(e.getModifiersEx());
  System.out.println(e.isShiftDown());
}

Fixed version (ground truth):
public void keyPressed(KeyEvent e){
  int key=e.getKeyCode();
  if (key == KeyEvent.VK_0) {
    frame.add(new SamplePanel());
  }
}
Program: 153058
Project: 153058
Buggy source:
public void keyPressed(KeyEvent e){
  p.keyPressed(e);
}

Fixed version (ground truth):
public void keyPressed(KeyEvent e){
  p.keyPressed(e);
  System.out.println("String_Node_Str");
}
Program: 153059
Project: 153059
Buggy source:
public SamplePanel(){
  p=new Player("String_Node_Str");
  addKeyListener(new AL());
  setFocusable(true);
  ImageIcon i=new ImageIcon("String_Node_Str");
  img=i.getImage();
  time=new Timer(5,this);
  time.start();
}

Fixed version (ground truth):
public SamplePanel(){
  p=new Player("String_Node_Str");
  addKeyListener(new AL());
  setFocusable(true);
  setVisible(true);
  ImageIcon i=new ImageIcon("String_Node_Str");
  img=i.getImage();
  time=new Timer(5,this);
  time.start();
}
Program: 153060
Project: 153060
Buggy source:
public void move(){
  x+=dx;
}

Fixed version (ground truth):
public void move(){
  x+=dx;
  y+=dy;
}
Program: 153061
Project: 153061
Buggy source:
public void keyPressed(KeyEvent e){
  int key=e.getKeyCode();
  if (key == KeyEvent.VK_LEFT)   dx=-1;
 else   if (key == KeyEvent.VK_RIGHT)   dx=1;
}

Fixed version (ground truth):
public void keyPressed(KeyEvent e){
  int key=e.getKeyCode();
  if (key == KeyEvent.VK_LEFT)   dx=-1;
 else   if (key == KeyEvent.VK_RIGHT)   dx=1;
 else   if (key == KeyEvent.VK_UP)   dy=-1;
 else   if (key == KeyEvent.VK_DOWN)   dy=1;
}
Program: 153062
Project: 153062
Buggy source:
public void keyReleased(KeyEvent e){
  int key=e.getKeyCode();
  if (key == KeyEvent.VK_LEFT)   dx=0;
 else   if (key == KeyEvent.VK_RIGHT)   dx=0;
}

Fixed version (ground truth):
public void keyReleased(KeyEvent e){
  int key=e.getKeyCode();
  if (key == KeyEvent.VK_LEFT)   dx=0;
 else   if (key == KeyEvent.VK_RIGHT)   dx=0;
 else   if (key == KeyEvent.VK_UP)   dy=0;
 else   if (key == KeyEvent.VK_DOWN)   dy=0;
}
Program: 153063
Project: 153063
Buggy source:
public void keyPressed(KeyEvent e){
  int key=e.getKeyCode();
  if (key == KeyEvent.VK_0) {
    frame.add(new SamplePanel());
  }
}

Fixed version (ground truth):
public void keyPressed(KeyEvent e){
  int key=e.getKeyCode();
  if (key == KeyEvent.VK_0) {
    SamplePanel sp=new SamplePanel();
    frame.getContentPane().add(sp);
    sp.requestFocusInWindow();
    frame.setVisible(true);
  }
}
Program: 153064
Project: 153064
Buggy source:
public void actionPerformed(ActionEvent e){
  System.out.println("String_Node_Str" + e.getActionCommand());
  if ("String_Node_Str".equalsIgnoreCase(e.getActionCommand())) {
    if (game == null)     return;
    save(game);
  }
 else   if ("String_Node_Str".equalsIgnoreCase(e.getActionCommand())) {
    if (game != null) {
    }
    game=load();
  }
 else   if ("String_Node_Str".equalsIgnoreCase(e.getActionCommand())) {
    game=new Game();
    commandMenu.setEnabled(true);
    gameMenuItems[MENU_SAVE].setEnabled(true);
  }
 else   if ("String_Node_Str".equalsIgnoreCase(e.getActionCommand())) {
    Object[] options={"String_Node_Str","String_Node_Str","String_Node_Str"};
    int n=JOptionPane.showOptionDialog(frame,"String_Node_Str","String_Node_Str",JOptionPane.OK_OPTION,JOptionPane.WARNING_MESSAGE,null,options,options[0]);
    if (n == 0) {
      save(game);
      System.exit(0);
    }
 else     if (n == 1)     System.exit(0);
  }
}

Fixed version (ground truth):
public void actionPerformed(ActionEvent e){
  if ("String_Node_Str".equalsIgnoreCase(e.getActionCommand())) {
    if (game == null)     return;
    save(game);
  }
 else   if ("String_Node_Str".equalsIgnoreCase(e.getActionCommand())) {
    if (game != null) {
    }
    game=load();
  }
 else   if ("String_Node_Str".equalsIgnoreCase(e.getActionCommand())) {
    game=new Game();
    commandMenu.setEnabled(true);
    gameMenuItems[MENU_SAVE].setEnabled(true);
  }
 else   if ("String_Node_Str".equalsIgnoreCase(e.getActionCommand())) {
    Object[] options={"String_Node_Str","String_Node_Str","String_Node_Str"};
    int n=JOptionPane.showOptionDialog(frame,"String_Node_Str","String_Node_Str",JOptionPane.OK_OPTION,JOptionPane.WARNING_MESSAGE,null,options,options[0]);
    if (n == 0) {
      save(game);
      System.exit(0);
    }
 else     if (n == 1)     System.exit(0);
  }
}
Program: 153065
Project: 153065
Buggy source:
public void mouseClicked(MouseEvent e){
  System.out.println("String_Node_Str" + e.getComponent().getName());
}

Fixed version (ground truth):
public void mouseClicked(MouseEvent e){
}
Program: 153066
Project: 153066
Buggy source:
public void actionPerformed(ActionEvent e){
  System.out.println("String_Node_Str" + e.getActionCommand());
  if ("String_Node_Str".equalsIgnoreCase(e.getActionCommand())) {
    if (game == null)     return;
    save(game);
  }
 else   if ("String_Node_Str".equalsIgnoreCase(e.getActionCommand())) {
    if (game != null) {
      System.out.println("String_Node_Str");
    }
    game=load();
  }
 else   if ("String_Node_Str".equalsIgnoreCase(e.getActionCommand())) {
    game=new Game();
    commandMenu.setEnabled(true);
    gameMenuItems[MENU_SAVE].setEnabled(true);
    game.testInit("String_Node_Str",125);
  }
 else   if ("String_Node_Str".equalsIgnoreCase(e.getActionCommand())) {
    System.exit(0);
  }
}

Fixed version (ground truth):
public void actionPerformed(ActionEvent e){
  System.out.println("String_Node_Str" + e.getActionCommand());
  if ("String_Node_Str".equalsIgnoreCase(e.getActionCommand())) {
    if (game == null)     return;
    save(game);
  }
 else   if ("String_Node_Str".equalsIgnoreCase(e.getActionCommand())) {
    if (game != null) {
      System.out.println("String_Node_Str");
    }
    game=load();
  }
 else   if ("String_Node_Str".equalsIgnoreCase(e.getActionCommand())) {
    game=new Game();
    commandMenu.setEnabled(true);
    gameMenuItems[MENU_SAVE].setEnabled(true);
  }
 else   if ("String_Node_Str".equalsIgnoreCase(e.getActionCommand())) {
    System.exit(0);
  }
}
Program: 153067
Project: 153067
Buggy source:
/** 
 * Grabs users groups. <br /><br />
 * @param userName
 * @return Array
 */
@Override public String[] getGroups(String world,String userName){
  return this.permissionManager.getUser(userName).getGroupsNames();
}

Fixed version (ground truth):
/** 
 * Grabs users groups. <br /><br />
 * @param userName
 * @return Array
 */
@Override public String[] getGroups(String world,String userName){
  return this.permissionManager.getUser(userName).getGroupsNames(world);
}
Program: 153068
Project: 153068
Buggy source:
/** 
 * Grabs users groups. <br /><br />
 * @param userName
 * @return Array
 */
@Override public String[] getGroups(String world,String userName){
  return this.permissionManager.getUser(userName).getGroupsNames(world);
}

Fixed version (ground truth):
/** 
 * Grabs users groups. <br /><br />
 * @param userName
 * @return Array
 */
@Override public String[] getGroups(String world,String userName){
  PermissionUser user=this.permissionManager.getUser(userName);
  if (user == null) {
    return new String[]{this.permissionManager.getDefaultGroup(world).getName()};
  }
  return user.getGroupsNames(world);
}
Program: 153069
Project: 153069
Buggy source:
@Override public Map<String,Map<String,String>> getAllOptions(){
  Map<String,Map<String,String>> allOptions=new HashMap<String,Map<String,String>>();
  for (  String world : this.worldNodes.keySet()) {
    allOptions.put(world,this.getOptions(world,false));
  }
  return allOptions;
}

Fixed version (ground truth):
@Override public Map<String,Map<String,String>> getAllOptions(){
  Map<String,Map<String,String>> allOptions=new HashMap<String,Map<String,String>>();
  for (  String world : this.worldNodes.keySet()) {
    if (world.equals(this.backend.getDefaultWorld())) {
      world="String_Node_Str";
    }
    allOptions.put(world,this.getOptions(world,false));
  }
  return allOptions;
}
Program: 153070
Project: 153070
Buggy source:
@Override public Map<String,String[]> getAllPermissions(){
  Map<String,String[]> permissions=new HashMap<String,String[]>();
  for (  String world : this.worldNodes.keySet()) {
    permissions.put(world,this.getPermissions(world,false));
  }
  return permissions;
}

Fixed version (ground truth):
@Override public Map<String,String[]> getAllPermissions(){
  Map<String,String[]> permissions=new HashMap<String,String[]>();
  for (  String world : this.worldNodes.keySet()) {
    if (world.equals(this.backend.getDefaultWorld())) {
      world="String_Node_Str";
    }
    permissions.put(world,this.getPermissions(world,false));
  }
  return permissions;
}
Program: 153071
Project: 153071
Buggy source:
@Override public void onEnable(){
  try {
    Security=new ru.tehkode.permissions.PermissionHandler(PermissionsEx.getPermissionManager());
  }
 catch (  RuntimeException e) {
    Logger.getLogger("String_Node_Str").warning("String_Node_Str");
  }
}

Fixed version (ground truth):
@Override public void onEnable(){
  Logger.getLogger("String_Node_Str").info("String_Node_Str");
}
Program: 153072
Project: 153072
Buggy source:
public void onClickDeleteBtn(View v){
  if (adapter.items.size() != fthreads.size()) {
    Toast.makeText(this,"String_Node_Str",Toast.LENGTH_LONG).show();
    return;
  }
  final CharSequence[] items={"String_Node_Str","String_Node_Str","String_Node_Str"};
  AlertDialog.Builder dlg;
  dlg=new AlertDialog.Builder(Catalog.this);
  dlg.setTitle("String_Node_Str");
  dlg.setCancelable(true);
  dlg.setSingleChoiceItems(items,0,new DialogInterface.OnClickListener(){
    public void onClick(    DialogInterface dialog,    int item){
      Catalog.this.delete_option=item;
    }
  }
);
  dlg.setPositiveButton("String_Node_Str",new DialogInterface.OnClickListener(){
    public void onClick(    DialogInterface dialog,    int id){
      Catalog.this.deleteThreads();
    }
  }
);
  dlg.setNegativeButton("String_Node_Str",new DialogInterface.OnClickListener(){
    public void onClick(    DialogInterface dialog,    int id){
    }
  }
);
  dlg.show();
}

Fixed version (ground truth):
public void onClickDeleteBtn(View v){
  if (adapter.items.size() != fthreads.size()) {
    Toast.makeText(this,"String_Node_Str",Toast.LENGTH_LONG).show();
    return;
  }
  delete_option=0;
  final CharSequence[] items={"String_Node_Str","String_Node_Str","String_Node_Str"};
  AlertDialog.Builder dlg;
  dlg=new AlertDialog.Builder(Catalog.this);
  dlg.setTitle("String_Node_Str");
  dlg.setCancelable(true);
  dlg.setSingleChoiceItems(items,0,new DialogInterface.OnClickListener(){
    public void onClick(    DialogInterface dialog,    int item){
      Catalog.this.delete_option=item;
    }
  }
);
  dlg.setPositiveButton("String_Node_Str",new DialogInterface.OnClickListener(){
    public void onClick(    DialogInterface dialog,    int id){
      Catalog.this.deleteThreads();
    }
  }
);
  dlg.setNegativeButton("String_Node_Str",new DialogInterface.OnClickListener(){
    public void onClick(    DialogInterface dialog,    int id){
    }
  }
);
  dlg.show();
}
Program: 153073
Project: 153073
Buggy source:
protected void onActivityResult(int requestCode,int resultCode,Intent intent){
  try {
    FLog.d("String_Node_Str" + requestCode);
    if (requestCode == TO_IMAGECATALOG) {
      String imgURL=(String)intent.getSerializableExtra("String_Node_Str");
      for (int i=0; i < statuses.size(); ++i) {
        if (imgURL.equals(statuses.get(i).bigImgURL)) {
          listView.setSelection(Math.min(i,listView.getCount()));
          break;
        }
      }
    }
 else     if (requestCode == TO_POST) {
      String posted="String_Node_Str";
      try {
        posted=(String)intent.getSerializableExtra("String_Node_Str");
      }
 catch (      Exception e) {
      }
      this.onClickReloadBtn(null);
    }
 else {
      FLog.d("String_Node_Str");
    }
  }
 catch (  Exception e) {
    FLog.d("String_Node_Str",e);
  }
}

Fixed version (ground truth):
protected void onActivityResult(int requestCode,int resultCode,Intent intent){
  try {
    FLog.d("String_Node_Str" + requestCode);
    if (requestCode == TO_IMAGECATALOG) {
      String imgURL=(String)intent.getSerializableExtra("String_Node_Str");
      for (int i=0; i < statuses.size(); ++i) {
        if (imgURL.equals(statuses.get(i).bigImgURL)) {
          listView.setSelection(Math.min(i,listView.getCount()));
          break;
        }
      }
    }
 else     if (requestCode == TO_POST) {
      String posted="String_Node_Str";
      try {
        posted=(String)intent.getSerializableExtra("String_Node_Str");
      }
 catch (      Exception e) {
      }
      if (!posted.equals("String_Node_Str")) {
        this.onClickReloadBtn(null);
      }
    }
 else {
      FLog.d("String_Node_Str");
    }
  }
 catch (  Exception e) {
    FLog.d("String_Node_Str",e);
  }
}
Program: 153074
Project: 153074
Buggy source:
public void run(){
  if (saved_file_f != null) {
    FutabaThread fthread=(FutabaThread)adapter.getContext();
    if (fthread.toast != null) {
      fthread.toast.cancel();
    }
    fthread.toast=Toast.makeText(fthread,saved_file_f.getAbsolutePath() + "String_Node_Str",Toast.LENGTH_SHORT);
    fthread.toast.show();
    String mimeType=StringUtil.getMIMEType(saved_file_f.getName());
    FLog.d("String_Node_Str" + saved_file_f.getName());
    FLog.d("String_Node_Str" + mimeType);
    ContentResolver contentResolver=getContentResolver();
    ContentValues values=new ContentValues(7);
    values.put(Images.Media.TITLE,saved_file_f.getName());
    values.put(Images.Media.DISPLAY_NAME,saved_file_f.getName());
    values.put(Images.Media.DATE_TAKEN,System.currentTimeMillis());
    values.put(Images.Media.MIME_TYPE,mimeType);
    values.put(Images.Media.ORIENTATION,0);
    values.put(Images.Media.DATA,saved_file_f.getPath());
    values.put(Images.Media.SIZE,saved_file_f.length());
    contentResolver.insert(Images.Media.EXTERNAL_CONTENT_URI,values);
  }
 else {
    Toast.makeText(adapter.getContext(),"String_Node_Str",Toast.LENGTH_SHORT).show();
  }
}

Fixed version (ground truth):
public void run(){
  FutabaThread fthread=(FutabaThread)adapter.getContext();
  if (saved_file_f != null) {
    if (fthread.toast != null) {
      fthread.toast.cancel();
    }
    fthread.toast=Toast.makeText(fthread,saved_file_f.getAbsolutePath() + "String_Node_Str",Toast.LENGTH_SHORT);
    fthread.toast.show();
    String mimeType=StringUtil.getMIMEType(saved_file_f.getName());
    FLog.d("String_Node_Str" + saved_file_f.getName());
    FLog.d("String_Node_Str" + mimeType);
    ContentResolver contentResolver=getContentResolver();
    ContentValues values=new ContentValues(7);
    values.put(Images.Media.TITLE,saved_file_f.getName());
    values.put(Images.Media.DISPLAY_NAME,saved_file_f.getName());
    values.put(Images.Media.DATE_TAKEN,System.currentTimeMillis());
    values.put(Images.Media.MIME_TYPE,mimeType);
    values.put(Images.Media.ORIENTATION,0);
    values.put(Images.Media.DATA,saved_file_f.getPath());
    values.put(Images.Media.SIZE,saved_file_f.length());
    contentResolver.insert(Images.Media.EXTERNAL_CONTENT_URI,values);
  }
 else {
    if (fthread.toast != null) {
      fthread.toast.cancel();
    }
    fthread.toast=Toast.makeText(fthread,"String_Node_Str",Toast.LENGTH_SHORT);
    fthread.toast.show();
  }
}
Program: 153075
Project: 153075
Buggy source:
private boolean isAnonymousThread(String url){
  return url.contains("String_Node_Str") || url.contains("String_Node_Str") || url.contains("String_Node_Str");
}

Fixed version (ground truth):
private boolean isAnonymousThread(String url){
  return url.contains("String_Node_Str") || url.contains("String_Node_Str") || url.contains("String_Node_Str")|| url.contains("String_Node_Str");
}
Program: 153076
Project: 153076
Buggy source:
public void onClickSearchButton(View v){
  FLog.d("String_Node_Str");
  if (true) {
    EditText searchEdit=(EditText)findViewById(id.searchinput);
    String searchText=searchEdit.getText().toString();
    String[] queries=StringUtil.querySplit(searchText);
    adapter.searchQueries=queries;
    boolean found=false;
    for (int i=listView.getFirstVisiblePosition() + 1; i < statuses.size(); ++i) {
      String text=statuses.get(i).text;
      if (StringUtil.isQueryMatch(text,queries)) {
        listView.setSelection(i);
        found=true;
        break;
      }
    }
    if (!found) {
      for (int i=0; i < Math.min(listView.getFirstVisiblePosition() + 1,statuses.size()); ++i) {
        String text=statuses.get(i).text;
        if (StringUtil.isQueryMatch(text,queries)) {
          listView.setSelection(i);
          found=true;
          if (true) {
            Toast.makeText(this,"String_Node_Str",Toast.LENGTH_SHORT).show();
          }
          break;
        }
      }
    }
    if (!found) {
      Toast.makeText(this,"String_Node_Str" + searchText + "String_Node_Str",Toast.LENGTH_SHORT).show();
    }
    InputMethodManager imm=(InputMethodManager)getSystemService(INPUT_METHOD_SERVICE);
    imm.hideSoftInputFromWindow(v.getWindowToken(),0);
  }
}

Fixed version (ground truth):
public void onClickSearchButton(View v){
  FLog.d("String_Node_Str");
  if (true) {
    EditText searchEdit=(EditText)findViewById(id.searchinput);
    String searchText=searchEdit.getText().toString();
    String[] queries=StringUtil.querySplit(searchText);
    adapter.searchQueries=queries;
    boolean found=false;
    for (int i=listView.getFirstVisiblePosition() + 1; i < statuses.size(); ++i) {
      String text=statuses.get(i).text;
      if (StringUtil.isQueryMatchOr(text,queries,false)) {
        listView.setSelection(i);
        found=true;
        break;
      }
    }
    if (!found) {
      for (int i=0; i < Math.min(listView.getFirstVisiblePosition() + 1,statuses.size()); ++i) {
        String text=statuses.get(i).text;
        if (StringUtil.isQueryMatchOr(text,queries,false)) {
          listView.setSelection(i);
          found=true;
          if (true) {
            Toast.makeText(this,"String_Node_Str",Toast.LENGTH_SHORT).show();
          }
          break;
        }
      }
    }
    if (!found) {
      Toast.makeText(this,"String_Node_Str" + searchText + "String_Node_Str",Toast.LENGTH_SHORT).show();
    }
    InputMethodManager imm=(InputMethodManager)getSystemService(INPUT_METHOD_SERVICE);
    imm.hideSoftInputFromWindow(v.getWindowToken(),0);
  }
}
Program: 153077
Project: 153077
Buggy source:
private boolean isAnonymousThread(String url){
  return url.contains("String_Node_Str") || url.contains("String_Node_Str");
}

Fixed version (ground truth):
private boolean isAnonymousThread(String url){
  return url.contains("String_Node_Str") || url.contains("String_Node_Str") || url.contains("String_Node_Str");
}
Program: 153080
Project: 153080
Buggy source:
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  setWait();
}

Fixed version (ground truth):
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  initialStart=false;
  setWait();
}