nus-yam/ex-repair huggingface dataset:
Program: 179562
Project: 179562
Buggy source:
private void processNetworkMessage(Object message){
  if (message instanceof NetworkMessage) {
    NetworkMessage msg=(NetworkMessage)message;
switch (msg.getMessageType()) {
case UPDATE_MESSAGE:
      fireEvent(new NetworkEvent(this,AWTEvent.RESERVED_ID_MAX + 1,message),UpdateReceivedListener.class);
    break;
case REQUEST_MESSAGE:
  fireEvent(new NetworkEvent(this,AWTEvent.RESERVED_ID_MAX + 1,message),RequestReceivedListener.class);
break;
case PARTIAL_GAMESTATE_UPDATE_MESSAGE:
break;
case GAMESTATE_UPDATE_MESSAGE:
break;
case GAMESTATE_REQUEST_MESSAGE:
fireEvent(new NetworkEvent(this,AWTEvent.RESERVED_ID_MAX + 1,message),GameStateRequestReceivedListener.class);
break;
case TERMINATION_REQUEST_MESSAGE:
fireEvent(new NetworkEvent(this,AWTEvent.RESERVED_ID_MAX + 1,message),TerminationRequestReceivedListener.class);
break;
default :
throw new UnsupportedOperationException("String_Node_Str");
}
}
 else if (message instanceof PlayerRegistrationMessage) {
PlayerRegistrationMessage regMessage=(PlayerRegistrationMessage)message;
registerPlayer(regMessage.playerName,regMessage.playerID,socket.getInetAddress());
sendInitialState();
sendInitialPeerList();
fireEvent(new NetworkEvent(this,AWTEvent.RESERVED_ID_MAX + 1,"String_Node_Str"),ConnectionEstablishedListener.class);
}
 else {
System.err.println("String_Node_Str" + message.getClass());
}
}

Fixed version (ground truth):
private void processNetworkMessage(Object message){
  if (message instanceof NetworkMessage) {
    NetworkMessage msg=(NetworkMessage)message;
switch (msg.getMessageType()) {
case UPDATE_MESSAGE:
      fireEvent(new NetworkEvent(this,AWTEvent.RESERVED_ID_MAX + 1,message),UpdateReceivedListener.class);
    break;
case REQUEST_MESSAGE:
  fireEvent(new NetworkEvent(this,AWTEvent.RESERVED_ID_MAX + 1,message),RequestReceivedListener.class);
break;
case PARTIAL_GAMESTATE_UPDATE_MESSAGE:
break;
case GAMESTATE_UPDATE_MESSAGE:
break;
case GAMESTATE_REQUEST_MESSAGE:
fireEvent(new NetworkEvent(this,AWTEvent.RESERVED_ID_MAX + 1,message),GameStateRequestReceivedListener.class);
break;
case TERMINATION_REQUEST_MESSAGE:
fireEvent(new NetworkEvent(this,AWTEvent.RESERVED_ID_MAX + 1,message),TerminationRequestReceivedListener.class);
break;
case PEER_LIST_REQUEST_MESSAGE:
sendPeerList();
break;
default :
fireEvent(new NetworkEvent(this,AWTEvent.RESERVED_ID_MAX + 1,message),UnknownMessageTypeReceivedListener.class);
}
}
 else if (message instanceof PlayerRegistrationMessage) {
PlayerRegistrationMessage regMessage=(PlayerRegistrationMessage)message;
registerPlayer(regMessage.playerName,regMessage.playerID,socket.getInetAddress());
sendInitialState();
sendPeerList();
fireEvent(new NetworkEvent(this,AWTEvent.RESERVED_ID_MAX + 1,"String_Node_Str"),ConnectionEstablishedListener.class);
}
 else {
System.err.println("String_Node_Str" + message.getClass());
}
}
Program: 179563
Project: 179563
Buggy source:
public abstract void registerPlayer(String playerName,int playerID,InetAddress clientAddress);

Fixed version (ground truth):
protected abstract void registerPlayer(String playerName,int playerID,InetAddress clientAddress);
Program: 179564
Project: 179564
Buggy source:
/** 
 * EVENTS 
 */
public <T extends NetworkEventListener>void addNetworkListener(Class<T> t,T listener){
  listeners.add(t,listener);
}

Fixed version (ground truth):
/** 
 * EVENTS HANDELING
 */
public <T extends NetworkEventListener>void addNetworkListener(Class<T> t,T listener){
  listeners.add(t,listener);
}
Program: 179565
Project: 179565
Buggy source:
public abstract void sendInitialState();

Fixed version (ground truth):
protected abstract void sendInitialState();
Program: 179566
Project: 179566
Buggy source:
public void setSocket(Socket acceptedSocket) throws IOException {
  socket=acceptedSocket;
  in=new ObjectInputStream(socket.getInputStream());
  out=new ServerDaemonWriteoutThread(acceptedSocket);
}

Fixed version (ground truth):
public void setSocket(Socket acceptedSocket) throws IOException {
  socket=acceptedSocket;
  in=new ObjectInputStream(socket.getInputStream());
  out=new ServerDaemonWriteoutThread(acceptedSocket);
  out.start();
}
Program: 179567
Project: 179567
Buggy source:
public abstract Vector<ClientPeer> getPeerList();

Fixed version (ground truth):
protected abstract Vector<ClientPeer> getPeerList();
Program: 179568
Project: 179568
Buggy source:
public void setSocket(Socket acceptedSocket) throws IOException {
  socket=acceptedSocket;
  in=new ObjectInputStream(socket.getInputStream());
  out=new ServerDaemonWriteoutThread(acceptedSocket);
  out.start();
}

Fixed version (ground truth):
public void setSocket(Socket acceptedSocket) throws IOException {
  socket=acceptedSocket;
  out=new ServerDaemonWriteoutThread(acceptedSocket);
  in=new ObjectInputStream(socket.getInputStream());
  out.start();
}
Program: 179569
Project: 179569
Buggy source:
private void handleConnection(Socket client){
  BufferedReader in=null;
  PrintWriter out=null;
  try {
    in=new BufferedReader(new InputStreamReader(client.getInputStream()));
    String data="String_Node_Str";
    String line="String_Node_Str";
    if (in.ready()) {
      System.out.println("String_Node_Str");
    }
    while (in.ready()) {
      line=in.readLine();
      if (line != null) {
        System.out.println(line);
        data+=line;
      }
 else {
        System.out.println("String_Node_Str");
        break;
      }
    }
    String response=processData(client,data);
    System.out.println(response);
    out=new PrintWriter(client.getOutputStream(),true);
    out.write(response);
    out.flush();
  }
 catch (  IOException ioe) {
  }
 finally {
    if (in != null) {
      try {
        in.close();
      }
 catch (      IOException ioe) {
      }
    }
    if (out != null) {
      out.close();
    }
  }
}

Fixed version (ground truth):
private void handleConnection(Socket client){
  BufferedReader in=null;
  PrintWriter out=null;
  try {
    in=new BufferedReader(new InputStreamReader(client.getInputStream()));
    String data="String_Node_Str";
    String line="String_Node_Str";
    System.out.println("String_Node_Str");
    while (in.ready()) {
      int c;
      while ((c=in.read()) != -1) {
        data+=Character.toString((char)c);
      }
    }
    System.out.println(data);
    System.out.println("String_Node_Str");
    String response=processData(client,data);
    System.out.println(response);
    out=new PrintWriter(client.getOutputStream(),true);
    out.write(response);
    out.flush();
  }
 catch (  IOException ioe) {
  }
 finally {
    if (in != null) {
      try {
        in.close();
      }
 catch (      IOException ioe) {
      }
    }
    if (out != null) {
      out.close();
    }
  }
}
Program: 179572
Project: 179572
Buggy source:
@Override public void render(float delta){
  Gdx.graphics.getGL10().glClear(GL10.GL_COLOR_BUFFER_BIT);
  camera.zoom(cameraData.getZoom() * 2f);
  camera.move(cameraData.getX(),cameraData.getY());
  camera.rotate(cameraData.getAngle());
  int deltaInMs=(int)(delta * 1000f);
  score+=100 * delta;
  HealthComponent healthComponent=mainCharacter.getComponent(HealthComponent.class);
  SpatialComponent spatialComponent=mainCharacter.getComponent(SpatialComponent.class);
  if (healthComponent.getHealth().isEmpty() || (spatialComponent.getPosition().y < -50)) {
    game.scoreScreen.setScore((int)score);
    game.setScreen(game.scoreScreen);
    gameOver=true;
  }
  worldWrapper.update(deltaInMs);
  Resource<BitmapFont> font=resourceManager.get("String_Node_Str");
  BitmapFont bitmapFont=font.get();
  spriteBatch.begin();
  String scoreLabel="String_Node_Str" + (int)score;
  spriteBatch.setColor(Color.WHITE);
  bitmapFont.setScale(0.7f);
  bitmapFont.draw(spriteBatch,scoreLabel,10,Gdx.graphics.getHeight() - 10);
  spriteBatch.end();
  Synchronizers.synchronize();
  inputDevicesMonitor.update();
  if (inputDevicesMonitor.getButton("String_Node_Str").isPressed()) {
    game.setScreen(game.scoreScreen);
    gameOver=true;
  }
  for (int i=0; i < controllers.size(); i++) {
    Controller controller=controllers.get(i);
    controller.update(deltaInMs);
  }
}

Fixed version (ground truth):
@Override public void render(float delta){
  Gdx.graphics.getGL10().glClear(GL10.GL_COLOR_BUFFER_BIT);
  camera.zoom(cameraData.getZoom() * 2f);
  camera.move(cameraData.getX(),cameraData.getY());
  camera.rotate(cameraData.getAngle());
  int deltaInMs=(int)(delta * 1000f);
  score+=100 * delta;
  HealthComponent healthComponent=mainCharacter.getComponent(HealthComponent.class);
  SpatialComponent spatialComponent=mainCharacter.getComponent(SpatialComponent.class);
  if (healthComponent.getHealth().isEmpty() || (spatialComponent.getPosition().y < -50)) {
    game.scoreScreen.setScore((int)score);
    game.setScreen(game.scoreScreen);
    gameOver=true;
  }
  worldWrapper.update(deltaInMs);
  Resource<BitmapFont> font=resourceManager.get("String_Node_Str");
  BitmapFont bitmapFont=font.get();
  spriteBatch.begin();
  String scoreLabel="String_Node_Str" + (int)score;
  spriteBatch.setColor(Color.WHITE);
  bitmapFont.setScale(0.7f);
  bitmapFont.draw(spriteBatch,scoreLabel,10,Gdx.graphics.getHeight() - 10);
  spriteBatch.end();
  Synchronizers.synchronize();
  inputDevicesMonitor.update();
  if (inputDevicesMonitor.getButton("String_Node_Str").isPressed()) {
    game.setScreen(game.scoreScreen);
    gameOver=true;
  }
  if (inputDevicesMonitor.getButton("String_Node_Str").isHolded()) {
    box2dCustomDebugRenderer.render();
  }
  for (int i=0; i < controllers.size(); i++) {
    Controller controller=controllers.get(i);
    controller.update(deltaInMs);
  }
}
Program: 179573
Project: 179573
Buggy source:
public void build(DroolsMonitoringAgent monitoringAgent){
  this.clear();
  this.connected=true;
  List<KnowledgeBaseInfo> kbases=monitoringAgent.getDiscoveredKnowledgeBases();
  for (  KnowledgeBaseInfo kbaseInfo : kbases) {
    KnowledgeBase kbase=new KnowledgeBase();
    kbase.setParent(this);
    kbase.setId(String.valueOf(kbaseInfo.getKnowledgeBaseId()));
    this.knowledgeBases.put(kbase.getId(),kbase);
  }
  List<KnowledgeSessionInfo> ksessions=monitoringAgent.getDiscoveredKnowledgeSessions();
  for (  KnowledgeSessionInfo ksessionInfo : ksessions) {
    KnowledgeBase knowledgeBase=knowledgeBases.get(ksessionInfo.getKnowledgeBaseId());
    if (knowledgeBase != null) {
      KnowledgeSession ksession=new KnowledgeSession();
      ksession.setId(String.valueOf(ksessionInfo.getKnowledgeSessionId()));
      ksession.setParent(knowledgeBase);
      knowledgeBase.addKnowledgeSession(ksession);
      String consoleId=ActivityConsoleFactory.getViewId(ksession);
      String id=ksession.getParent().getId() + "String_Node_Str" + ksession.getId();
      ActivityConsoleListener listener=new ActivityConsoleListener(id,consoleId);
      monitoringAgent.registerListener(listener);
    }
  }
}

Fixed version (ground truth):
public void build(DroolsMonitoringAgent monitoringAgent){
  this.connected=true;
  List<KnowledgeBaseInfo> kbases=monitoringAgent.getDiscoveredKnowledgeBases();
  for (  KnowledgeBaseInfo kbaseInfo : kbases) {
    if (!knowledgeBases.containsKey(kbaseInfo.getKnowledgeBaseId())) {
      KnowledgeBase kbase=new KnowledgeBase();
      kbase.setParent(this);
      kbase.setId(String.valueOf(kbaseInfo.getKnowledgeBaseId()));
      this.knowledgeBases.put(kbase.getId(),kbase);
    }
  }
  List<KnowledgeSessionInfo> ksessions=monitoringAgent.getDiscoveredKnowledgeSessions();
  for (  KnowledgeSessionInfo ksessionInfo : ksessions) {
    KnowledgeBase knowledgeBase=knowledgeBases.get(ksessionInfo.getKnowledgeBaseId());
    if (knowledgeBase != null) {
      KnowledgeSession ksession=new KnowledgeSession();
      ksession.setId(String.valueOf(ksessionInfo.getKnowledgeSessionId()));
      ksession.setParent(knowledgeBase);
      knowledgeBase.addKnowledgeSession(ksession);
      String consoleId=ActivityConsoleFactory.getViewId(ksession);
      String id=ksession.getParent().getId() + "String_Node_Str" + ksession.getId();
      ActivityConsoleListener listener=new ActivityConsoleListener(id,consoleId);
      monitoringAgent.registerListener(listener);
    }
  }
}
Program: 179575
Project: 179575
Buggy source:
public List<KnowledgeBaseInfo> getKnowledgeBaseInfos(){
  return knowledgeBaseInfos;
}

Fixed version (ground truth):
public List<KnowledgeBaseInfo> getKnowledgeBaseInfos(){
synchronized (knowledgeBaseInfos) {
    List<KnowledgeBaseInfo> copy=new ArrayList<KnowledgeBaseInfo>(knowledgeBaseInfos.size());
    for (    KnowledgeBaseInfo knowledgeBaseInfo : knowledgeBaseInfos) {
      copy.add(knowledgeBaseInfo);
    }
    return copy;
  }
}
Program: 179576
Project: 179576
Buggy source:
public List<KnowledgeSessionInfo> getKnowledgeSessionInfos(){
  return knowledgeSessionInfos;
}

Fixed version (ground truth):
public List<KnowledgeSessionInfo> getKnowledgeSessionInfos(){
synchronized (knowledgeSessionInfos) {
    List<KnowledgeSessionInfo> copy=new ArrayList<KnowledgeSessionInfo>(knowledgeSessionInfos.size());
    for (    KnowledgeSessionInfo knowledgeSessionInfo : knowledgeSessionInfos) {
      copy.add(knowledgeSessionInfo);
    }
    return copy;
  }
}
Program: 179577
Project: 179577
Buggy source:
/** 
 * Sets how many items of a type a   {@link Player} has.<p> You can't touch this You can't touch this You can't touch this You can't touch this
 * @param player The {@link Player} to check.
 * @param type   The item id to check.
 * @return True if success (always).
 */
protected final boolean setItemAmount(Player player,int type,double amount){
  int numberOfItems=this.getItemAmount(player,type);
  if (numberOfItems > amount) {
    this.takeItem(player,numberOfItems - amount,type);
  }
 else   if (numberOfItems < amount) {
    this.giveItem(player,amount - numberOfItems,type);
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Sets how many items of a type a   {@link Player} has.<p> You can't touch this You can't touch this You can't touch this You can't touch this
 * @param player The {@link Player} to check.
 * @param type   The item id to check.
 * @param amount what to set the balance to.
 * @return True if success (always).
 */
protected final boolean setItemAmount(Player player,int type,double amount){
  int numberOfItems=this.getItemAmount(player,type);
  if (numberOfItems > amount) {
    this.takeItem(player,numberOfItems - amount,type);
  }
 else   if (numberOfItems < amount) {
    this.giveItem(player,amount - numberOfItems,type);
  }
  return true;
}
Program: 179578
Project: 179578
Buggy source:
/** 
 * Sets the balance in items or currency of a user.
 * @param player the player to check.
 * @param itemId the item (or -1 for money).
 * @return True if success; false if fail.
 */
public boolean setBalance(Player player,int itemId,double amount){
  if (itemId == -1) {
    return setMoneyBalance(player,amount);
  }
  return setItemAmount(player,itemId,amount);
}

Fixed version (ground truth):
/** 
 * Sets the balance in items or currency of a user.
 * @param player the player to check.
 * @param itemId the item (or -1 for money).
 * @param amount what to set the balance to.
 * @return True if success; false if fail.
 */
public boolean setBalance(Player player,int itemId,double amount){
  if (itemId == -1) {
    return setMoneyBalance(player,amount);
  }
  return setItemAmount(player,itemId,amount);
}
Program: 179579
Project: 179579
Buggy source:
/** 
 * @deprecated This was a typo, use getItemAmount.
 */
@Deprecated protected final int getItemAnount(Player player,int type){
  return this.getItemAmount(player,type);
}

Fixed version (ground truth):
/** 
 * @deprecated This was a typo, use getItemAmount.
 * @param player deprecated
 * @param type deprecated
 * @return deprecated stuff.
 */
@Deprecated protected final int getItemAnount(Player player,int type){
  return this.getItemAmount(player,type);
}
Program: 179580
Project: 179580
Buggy source:
/** 
 * Sets how much money a player has.
 * @param player The player to check.
 * @return True if the set was successful.
 */
protected abstract boolean setMoneyBalance(Player player,double amount);

Fixed version (ground truth):
/** 
 * Sets how much money a player has.
 * @param player The player to check.
 * @param amount what to set the balance to.
 * @return True if the set was successful.
 */
protected abstract boolean setMoneyBalance(Player player,double amount);
Program: 179581
Project: 179581
Buggy source:
/** 
 * Sets how much money a player has.
 * @param player The player to check.
 * @return True if the set was successful.
 */
@Override protected boolean setMoneyBalance(Player player,double amount){
  CurrencyList.setValue(((String)CurrencyList.maxCurrency(player.getName())[0]),player.getName(),amount);
  return true;
}

Fixed version (ground truth):
@Override protected boolean setMoneyBalance(Player player,double amount){
  CurrencyList.setValue(((String)CurrencyList.maxCurrency(player.getName())[0]),player.getName(),amount);
  return true;
}
Program: 179582
Project: 179582
Buggy source:
public TestMigrationTaskRollback1(){
  setName("String_Node_Str");
  setLevel(13);
}

Fixed version (ground truth):
public TestMigrationTaskRollback1(){
  setName("String_Node_Str");
  setLevel(new Integer(13));
}
Program: 179583
Project: 179583
Buggy source:
/** 
 * {@inheritDoc} 
 */
public void migrationSuccessful(MigrationTask task,MigrationContext ctx) throws MigrationException {
  log.debug("String_Node_Str" + task.getName() + "String_Node_Str"+ ctx+ "String_Node_Str"+ this);
  int patchLevel=task.getLevel().intValue();
  for (Iterator patchTableIter=contexts.entrySet().iterator(); patchTableIter.hasNext(); ) {
    PatchInfoStore store=(PatchInfoStore)((Map.Entry)patchTableIter.next()).getValue();
    store.updatePatchLevel(patchLevel);
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public void migrationSuccessful(MigrationTask task,MigrationContext ctx) throws MigrationException {
  log.debug("String_Node_Str" + task.getName() + "String_Node_Str"+ ctx+ "String_Node_Str"+ this);
  int patchLevel=task.getLevel().intValue();
  for (Iterator patchTableIter=contexts.entrySet().iterator(); patchTableIter.hasNext(); ) {
    PatchInfoStore store=(PatchInfoStore)((Map.Entry)patchTableIter.next()).getValue();
    int storePatchLevel=store.getPatchLevel();
    if (patchLevel > storePatchLevel) {
      store.updatePatchLevel(patchLevel);
    }
  }
}
Program: 179587
Project: 179587
Buggy source:
public void execute() throws MojoExecutionException, MojoFailureException {
  try {
    addClasspathElementsClassLoader();
    JdbcMigrationLauncherFactory launcherFactory=JdbcMigrationLauncherFactoryLoader.createFactory();
    JdbcMigrationLauncher launcher=launcherFactory.createMigrationLauncher(systemName);
    launcher.doMigrations();
  }
 catch (  Exception e) {
    getLog().error(e);
  }
}

Fixed version (ground truth):
public void execute() throws MojoExecutionException, MojoFailureException {
  try {
    addClasspathElementsClassLoader();
    JdbcMigrationLauncherFactory launcherFactory=JdbcMigrationLauncherFactoryLoader.createFactory();
    JdbcMigrationLauncher launcher=launcherFactory.createMigrationLauncher(systemName);
    launcher.doMigrations();
  }
 catch (  Exception e) {
    getLog().error(e);
    throw new MojoFailureException(e.getMessage());
  }
}
Program: 179588
Project: 179588
Buggy source:
/** 
 * {@inheritDoc} 
 */
public void migrate(MigrationContext ctx) throws MigrationException {
  JdbcMigrationContext context=(JdbcMigrationContext)ctx;
  Connection conn=null;
  Statement stmt=null;
  String sqlStatement="String_Node_Str";
  try {
    conn=context.getConnection();
    List sqlStatements=getSqlStatements(context);
    for (Iterator i=sqlStatements.iterator(); i.hasNext(); ) {
      sqlStatement=(String)i.next();
      if (log.isDebugEnabled()) {
        log.debug(getName() + "String_Node_Str" + sqlStatement);
      }
      stmt=conn.createStatement();
      stmt.execute(sqlStatement);
      SqlUtil.close(null,stmt,null);
    }
    context.commit();
  }
 catch (  Exception e) {
    String message=getName() + "String_Node_Str" + sqlStatement+ "String_Node_Str";
    log.error(message,e);
    if (e instanceof SQLException) {
      if (((SQLException)e).getNextException() != null) {
        log.error("String_Node_Str",((SQLException)e).getNextException());
      }
    }
    context.rollback();
    throw new MigrationException(message,e);
  }
 finally {
    SqlUtil.close(null,stmt,null);
  }
}

Fixed version (ground truth):
/** 
 * {@inheritDoc} 
 */
public void migrate(MigrationContext ctx) throws MigrationException {
  JdbcMigrationContext context=(JdbcMigrationContext)ctx;
  Connection conn=null;
  Statement stmt=null;
  String sqlStatement="String_Node_Str";
  try {
    conn=context.getConnection();
    context.commit();
    List sqlStatements=getSqlStatements(context);
    for (Iterator i=sqlStatements.iterator(); i.hasNext(); ) {
      sqlStatement=(String)i.next();
      if (log.isDebugEnabled()) {
        log.debug(getName() + "String_Node_Str" + sqlStatement);
      }
      stmt=conn.createStatement();
      stmt.execute(sqlStatement);
      SqlUtil.close(null,stmt,null);
    }
    context.commit();
  }
 catch (  Exception e) {
    String message=getName() + "String_Node_Str" + sqlStatement+ "String_Node_Str";
    log.error(message,e);
    if (e instanceof SQLException) {
      if (((SQLException)e).getNextException() != null) {
        log.error("String_Node_Str",((SQLException)e).getNextException());
      }
    }
    context.rollback();
    throw new MigrationException(message,e);
  }
 finally {
    SqlUtil.close(null,stmt,null);
  }
}
Program: 179591
Project: 179591
Buggy source:
/** 
 * Tests that the new mechanism for configuring a launcher from a  servlet context works.
 * @throws NamingException a problem with the test
 */
public void testConfiguredContext() throws NamingException {
  JdbcMigrationLauncherFactory launcherFactory=new JdbcMigrationLauncherFactory();
  MockServletContext sc=new MockServletContext();
  String dbType="String_Node_Str";
  String sysName="String_Node_Str";
  sc.setInitParameter("String_Node_Str",sysName);
  sc.setInitParameter("String_Node_Str","String_Node_Str");
  sc.setInitParameter("String_Node_Str",dbType);
  sc.setInitParameter("String_Node_Str","String_Node_Str");
  sc.setInitParameter("String_Node_Str","String_Node_Str");
  MockDataSource ds=new MockDataSource();
  MockContextFactory.setAsInitial();
  InitialContext context=new InitialContext();
  context.createSubcontext("String_Node_Str");
  context.bind("String_Node_Str",ds);
  ServletContextEvent sce=new ServletContextEvent(sc);
  JdbcMigrationLauncher launcher=null;
  try {
    launcher=launcherFactory.createMigrationLauncher(sce);
  }
 catch (  MigrationException e) {
    e.printStackTrace();
    fail("String_Node_Str");
  }
  JdbcMigrationContext jdbcContext=(JdbcMigrationContext)launcher.getContexts().keySet().iterator().next();
  assertEquals(dbType,jdbcContext.getDatabaseType().getDatabaseType());
  assertEquals(sysName,jdbcContext.getSystemName());
  assertEquals(true,launcher.isReadOnly());
}

Fixed version (ground truth):
/** 
 * Tests that the new mechanism for configuring a launcher from a  servlet context works.
 * @throws NamingException a problem with the test
 */
public void testConfiguredContext() throws NamingException {
  JdbcMigrationLauncherFactory launcherFactory=new JdbcMigrationLauncherFactory();
  MockServletContext sc=new MockServletContext();
  String dbType="String_Node_Str";
  String sysName="String_Node_Str";
  sc.setInitParameter("String_Node_Str",sysName);
  sc.setInitParameter("String_Node_Str","String_Node_Str");
  sc.setInitParameter("String_Node_Str",dbType);
  sc.setInitParameter("String_Node_Str","String_Node_Str");
  sc.setInitParameter("String_Node_Str","String_Node_Str");
  MockDataSource ds=new MockDataSource();
  InitialContext context=new InitialContext();
  context.bind("String_Node_Str",ds);
  ServletContextEvent sce=new ServletContextEvent(sc);
  JdbcMigrationLauncher launcher=null;
  try {
    launcher=launcherFactory.createMigrationLauncher(sce);
  }
 catch (  MigrationException e) {
    e.printStackTrace();
    fail("String_Node_Str");
  }
  JdbcMigrationContext jdbcContext=(JdbcMigrationContext)launcher.getContexts().keySet().iterator().next();
  assertEquals(dbType,jdbcContext.getDatabaseType().getDatabaseType());
  assertEquals(sysName,jdbcContext.getSystemName());
  assertEquals(true,launcher.isReadOnly());
}
Program: 179592
Project: 179592
Buggy source:
/** 
 * Test that all the tables were created successfully in all of the databases
 * @exception Exception if anything goes wrong
 */
public void testMultiNodePatch() throws Exception {
  log.debug("String_Node_Str");
  try {
    launcher.doMigrations();
  }
 catch (  Exception e) {
    log.error("String_Node_Str",e);
    fail("String_Node_Str");
  }
}

Fixed version (ground truth):
/** 
 * Test that all the tables were created successfully in all of the databases
 * @exception Exception if anything goes wrong
 */
public void testMultiNodePatch() throws Exception {
  log.debug("String_Node_Str");
  try {
    launcher.doMigrations();
  }
 catch (  Exception e) {
    log.error("String_Node_Str",e);
    fail("String_Node_Str");
  }
  Connection core=DriverManager.getConnection("String_Node_Str","String_Node_Str","String_Node_Str");
  Connection orders=DriverManager.getConnection("String_Node_Str","String_Node_Str","String_Node_Str");
  Connection catalog1=DriverManager.getConnection("String_Node_Str","String_Node_Str","String_Node_Str");
  Connection catalog2=DriverManager.getConnection("String_Node_Str","String_Node_Str","String_Node_Str");
  assertEquals(4,getPatchLevel(core));
  assertEquals(4,getPatchLevel(orders));
  assertEquals(4,getPatchLevel(catalog1));
  assertEquals(4,getPatchLevel(catalog2));
  verifyTestTable(core,"String_Node_Str");
  verifyTestTable(orders,"String_Node_Str");
  verifyTestTable(orders,"String_Node_Str");
  verifyTestTable(catalog1,"String_Node_Str");
  verifyTestTable(catalog2,"String_Node_Str");
  SqlUtil.close(core,null,null);
  SqlUtil.close(orders,null,null);
  SqlUtil.close(catalog1,null,null);
  SqlUtil.close(catalog2,null,null);
}
Program: 179593
Project: 179593
Buggy source:
/** 
 * @see junit.framework.TestCase#setUp()
 */
protected void setUp() throws Exception {
  super.setUp();
  System.getProperties().setProperty("String_Node_Str","String_Node_Str");
  DistributedJdbcMigrationLauncherFactory factory=new TestDistributedJdbcMigrationLauncherFactory();
  launcher=(DistributedJdbcMigrationLauncher)factory.createMigrationLauncher("String_Node_Str");
  launcher.getMigrationProcess().addListener(this);
}

Fixed version (ground truth):
/** 
 * @see junit.framework.TestCase#setUp()
 */
protected void setUp() throws Exception {
  super.setUp();
  log.debug("String_Node_Str" + this.getClass().getName());
  System.getProperties().setProperty("String_Node_Str","String_Node_Str");
  DistributedJdbcMigrationLauncherFactory factory=new TestDistributedJdbcMigrationLauncherFactory();
  launcher=(DistributedJdbcMigrationLauncher)factory.createMigrationLauncher("String_Node_Str");
  launcher.getMigrationProcess().addListener(this);
}
Program: 179594
Project: 179594
Buggy source:
/** 
 * Make sure that the task loading works correctly
 * @exception MigrationException if anything goes wrong
 */
public void testDistributedMigrationTaskLoading() throws MigrationException {
  MigrationProcess process=launcher.getMigrationProcess();
  assertEquals(7,process.getMigrationTasks().size());
}

Fixed version (ground truth):
/** 
 * Make sure that the task loading works correctly
 * @exception MigrationException if anything goes wrong
 */
public void testDistributedMigrationTaskLoading() throws MigrationException {
  DistributedMigrationProcess process=(DistributedMigrationProcess)launcher.getMigrationProcess();
  assertEquals(7,process.getMigrationTasksWithLaunchers().size());
  assertEquals(7,process.getMigrationTasks().size());
}
Program: 179595
Project: 179595
Buggy source:
/** 
 * Starts the application migration process.
 * @param conn the connection to use
 * @return the number of patches applied
 * @throws SQLException if an unrecoverable database error occurs whileworking with the patches table.
 * @throws MigrationException if an unrecoverable error occurs duringthe migration
 */
private int doMigrations(Connection conn) throws SQLException, MigrationException {
  patchTable=new PatchTable(context,conn);
  patchTable.getPatchLevel();
  conn.commit();
  boolean b=true;
  try {
    b=conn.getAutoCommit();
    conn.setAutoCommit(false);
    waitForFreeLock();
    try {
      patchTable.lockPatchTable();
      int patchLevel=patchTable.getPatchLevel();
      migrationProcess.addListener(this);
      return migrationProcess.doMigrations(patchLevel,context);
    }
  finally {
      try {
        patchTable.unlockPatchTable();
        conn.commit();
      }
 catch (      SQLException e) {
        log.error("String_Node_Str",e);
      }
    }
  }
  finally {
    conn.setAutoCommit(b);
  }
}

Fixed version (ground truth):
/** 
 * Starts the application migration process.
 * @param conn the connection to use
 * @return the number of patches applied
 * @throws SQLException if an unrecoverable database error occurs whileworking with the patches table.
 * @throws MigrationException if an unrecoverable error occurs duringthe migration
 */
private int doMigrations(Connection conn) throws SQLException, MigrationException {
  patchTable=new PatchTable(context,conn);
  patchTable.getPatchLevel();
  if (!conn.getAutoCommit()) {
    conn.commit();
  }
  boolean b=true;
  try {
    b=conn.getAutoCommit();
    conn.setAutoCommit(false);
    waitForFreeLock();
    try {
      patchTable.lockPatchTable();
      int patchLevel=patchTable.getPatchLevel();
      migrationProcess.addListener(this);
      return migrationProcess.doMigrations(patchLevel,context);
    }
  finally {
      try {
        patchTable.unlockPatchTable();
        conn.commit();
      }
 catch (      SQLException e) {
        log.error("String_Node_Str",e);
      }
    }
  }
  finally {
    conn.setAutoCommit(b);
  }
}
Program: 179596
Project: 179596
Buggy source:
/** 
 * Returns a list of all migration tasks, regardless of patch level.
 * @return a list of all migration tasks
 * @throws MigrationException if one or more migration tasks could not becreated
 */
public List getMigrationTasks() throws MigrationException {
  List tasks=new ArrayList();
  for (Iterator i=resourcePackages.iterator(); i.hasNext(); ) {
    String packageName=(String)i.next();
    log.debug("String_Node_Str" + packageName);
    for (Iterator j=migrationTaskSources.iterator(); j.hasNext(); ) {
      MigrationTaskSource source=(MigrationTaskSource)j.next();
      tasks.addAll(source.getMigrationTasks(packageName));
    }
  }
  if (tasks.size() == 0) {
    log.info("String_Node_Str" + "String_Node_Str");
  }
  return tasks;
}

Fixed version (ground truth):
/** 
 * Returns a list of all migration tasks, regardless of patch level.
 * @return a list of all migration tasks
 * @throws MigrationException if one or more migration tasks could not becreated
 */
public List getMigrationTasks() throws MigrationException {
  List tasks=new ArrayList();
  for (Iterator i=resourcePackages.iterator(); i.hasNext(); ) {
    String packageName=(String)i.next();
    log.debug("String_Node_Str" + packageName);
    for (Iterator j=migrationTaskSources.iterator(); j.hasNext(); ) {
      MigrationTaskSource source=(MigrationTaskSource)j.next();
      List sourceTasks=source.getMigrationTasks(packageName);
      if (log.isDebugEnabled()) {
        if (sourceTasks.size() > 0) {
          log.debug("String_Node_Str" + source + "String_Node_Str"+ sourceTasks);
        }
 else {
          log.debug("String_Node_Str" + source + "String_Node_Str");
        }
      }
      tasks.addAll(sourceTasks);
    }
  }
  if (tasks.size() == 0) {
    log.info("String_Node_Str" + "String_Node_Str");
  }
  return tasks;
}
Program: 179597
Project: 179597
Buggy source:
/** 
 * @see MigrationTaskSource#getMigrationTasks(String)
 */
public List getMigrationTasks(String packageName) throws MigrationException {
  String path=packageName.replace('.',File.separatorChar);
  String[] scripts=ClassDiscoveryUtil.getResources(path,SQL_PATCH_REGEX);
  log.debug("String_Node_Str" + scripts.length + "String_Node_Str"+ path);
  return createMigrationScripts(scripts);
}

Fixed version (ground truth):
/** 
 * @see MigrationTaskSource#getMigrationTasks(String)
 */
public List getMigrationTasks(String packageName) throws MigrationException {
  String path=packageName.replace('.',File.separatorChar);
  String[] scripts=ClassDiscoveryUtil.getResources(path,SQL_PATCH_REGEX);
  if (log.isDebugEnabled()) {
    log.debug("String_Node_Str" + scripts.length + "String_Node_Str"+ path);
    for (int i=0; i < scripts.length; i++) {
      log.debug("String_Node_Str" + scripts[i] + "String_Node_Str");
    }
  }
  return createMigrationScripts(scripts);
}
Program: 179598
Project: 179598
Buggy source:
/** 
 * Creates a list of <code>SqlScriptMigrationTask</code>s based on the array of SQL scripts.
 * @param scripts the classpath-relative array of SQL migration scripts
 * @return a list of <code>SqlScriptMigrationTask</code>s based on the arrayof SQL scripts
 * @throws MigrationException if a SqlScriptMigrationTask could no be created
 */
private List createMigrationScripts(String[] scripts) throws MigrationException {
  Pattern p=Pattern.compile(SQL_PATCH_REGEX);
  List tasks=new ArrayList();
  for (int i=0; i < scripts.length; i++) {
    String script=scripts[i];
    InputStream is=getClass().getResourceAsStream("String_Node_Str" + script);
    if (is != null) {
      File scriptFile=new File(script);
      String scriptFileName=scriptFile.getName();
      try {
        Matcher matcher=p.matcher(scriptFileName);
        if (!matcher.matches() || matcher.groupCount() != 2) {
          throw new MigrationException("String_Node_Str" + script);
        }
        int order=Integer.parseInt(matcher.group(1));
        SqlScriptMigrationTask task=new SqlScriptMigrationTask(scriptFileName,order,is);
        is.close();
        task.setName(scriptFileName);
        tasks.add(task);
      }
 catch (      IOException e) {
        throw new MigrationException("String_Node_Str" + script,e);
      }
    }
  }
  return tasks;
}

Fixed version (ground truth):
/** 
 * Creates a list of <code>SqlScriptMigrationTask</code>s based on the array of SQL scripts.
 * @param scripts the classpath-relative array of SQL migration scripts
 * @return a list of <code>SqlScriptMigrationTask</code>s based on the arrayof SQL scripts
 * @throws MigrationException if a SqlScriptMigrationTask could no be created
 */
private List createMigrationScripts(String[] scripts) throws MigrationException {
  Pattern p=Pattern.compile(SQL_PATCH_REGEX);
  List tasks=new ArrayList();
  for (int i=0; i < scripts.length; i++) {
    String script=scripts[i];
    script=script.replace('\\','/');
    log.debug("String_Node_Str" + script + "String_Node_Str");
    InputStream is=getClass().getResourceAsStream("String_Node_Str" + script);
    if (is == null) {
      log.warn("String_Node_Str" + script + "String_Node_Str");
    }
 else {
      File scriptFile=new File(script);
      String scriptFileName=scriptFile.getName();
      try {
        Matcher matcher=p.matcher(scriptFileName);
        if (!matcher.matches() || matcher.groupCount() != 2) {
          throw new MigrationException("String_Node_Str" + script);
        }
        int order=Integer.parseInt(matcher.group(1));
        SqlScriptMigrationTask task=new SqlScriptMigrationTask(scriptFileName,order,is);
        is.close();
        task.setName(scriptFileName);
        tasks.add(task);
      }
 catch (      IOException e) {
        throw new MigrationException("String_Node_Str" + script,e);
      }
    }
  }
  return tasks;
}
Program: 179599
Project: 179599
Buggy source:
/** 
 * Tests several combinations of input names to insure things are  working well.
 */
public void testNameParsing(){
  String longName=DelimitedFileLoader.PATH_SEPARATOR + "String_Node_Str" + DelimitedFileLoader.PATH_SEPARATOR+ "String_Node_Str"+ DelimitedFileLoader.PATH_SEPARATOR+ "String_Node_Str";
  String medName=DelimitedFileLoader.PATH_SEPARATOR + "String_Node_Str";
  String names[]={"String_Node_Str",longName,medName};
  for (int i=0; i < names.length; i++) {
    loader.setName(names[i]);
    String tb=loader.getTableFromName();
    assertTrue("String_Node_Str".equals(tb));
  }
}

Fixed version (ground truth):
/** 
 * Tests several combinations of input names to insure things are  working well.
 */
public void testNameParsing(){
  String longName=DelimitedFileLoader.PATH_SEPARATOR + "String_Node_Str" + DelimitedFileLoader.PATH_SEPARATOR+ "String_Node_Str"+ DelimitedFileLoader.PATH_SEPARATOR+ "String_Node_Str";
  String medName=DelimitedFileLoader.PATH_SEPARATOR + "String_Node_Str";
  String[] names={"String_Node_Str",longName,medName};
  for (int i=0; i < names.length; i++) {
    loader.setName(names[i]);
    String tb=loader.getTableFromName();
    assertTrue("String_Node_Str".equals(tb));
  }
}
Program: 179600
Project: 179600
Buggy source:
/** 
 * Run the migrations for the given system name
 * @param arguments the command line arguments, if any (none are used)
 * @exception Exception if anything goes wrong
 */
public static void main(String[] arguments) throws Exception {
  String systemName=getRequiredParam("String_Node_Str",System.getProperties());
  try {
    MigrationLauncher launcher=new MigrationLauncher(systemName);
    log.info("String_Node_Str" + launcher.getDatabasePatchLevel());
    log.info("String_Node_Str" + ((launcher.getNextPatchLevel() - launcher.getDatabasePatchLevel()) - 1));
    log.info("String_Node_Str" + launcher.getNextPatchLevel());
  }
 catch (  Exception e) {
    log.error(e);
    throw e;
  }
}

Fixed version (ground truth):
/** 
 * Run the migrations for the given system name
 * @param arguments the command line arguments, if any (none are used)
 * @exception Exception if anything goes wrong
 */
public static void main(String[] arguments) throws Exception {
  String systemName=getRequiredParam("String_Node_Str",System.getProperties());
  try {
    MigrationLauncher launcher=new MigrationLauncher(systemName);
    log.info("String_Node_Str" + launcher.getDatabasePatchLevel());
    int unappliedPatches=launcher.getNextPatchLevel() - launcher.getDatabasePatchLevel() - 1;
    log.info("String_Node_Str" + unappliedPatches);
    log.info("String_Node_Str" + launcher.getNextPatchLevel());
  }
 catch (  Exception e) {
    log.error(e);
    throw e;
  }
}
Program: 179601
Project: 179601
Buggy source:
/** 
 * Returns the table name from the full path name  by parsing it out of a file in the format:  name_db.(some extension)
 * @return the name of the table to add data to
 */
protected String getTableFromName(){
  String name=getName();
  int startTable=name.lastIndexOf(pathSeparator);
  int endTable=name.indexOf("String_Node_Str",startTable);
  return name.substring((startTable + 1),endTable);
}

Fixed version (ground truth):
/** 
 * Returns the table name from the full path name  by parsing it out of a file in the format:  name_db.(some extension)
 * @return the name of the table to add data to
 */
protected String getTableFromName(){
  String name=getName();
  int startTable=name.lastIndexOf(PATH_SEPARATOR);
  int endTable=name.indexOf("String_Node_Str",startTable);
  return name.substring((startTable + 1),endTable);
}
Program: 179602
Project: 179602
Buggy source:
/** 
 * Parses a line of data, and sets the prepared statement with the  values.  If a token contains "<null>" then a null value is passed  in. 
 * @param data the tokenized string that is mapped to a row
 * @param stmt the statement to populate with data to be inserted
 * @return false if the header is returned, true otherwise
 */
protected boolean insert(String data,PreparedStatement stmt) throws Exception {
  if (!parsedHeader) {
    parsedHeader=true;
    log.info("String_Node_Str" + data);
    return false;
  }
  StringTokenizer st=new StringTokenizer(data,getDelimiter());
  int counter=1;
  log.info("String_Node_Str" + data);
  while (st.hasMoreTokens()) {
    String colVal=st.nextToken();
    if (colVal.equalsIgnoreCase("String_Node_Str")) {
      stmt.setString(counter,null);
    }
 else {
      stmt.setString(counter,colVal);
    }
    counter++;
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Parses a line of data, and sets the prepared statement with the  values.  If a token contains "<null>" then a null value is passed  in. 
 * @param data the tokenized string that is mapped to a row
 * @param stmt the statement to populate with data to be inserted
 * @return false if the header is returned, true otherwise
 * @throws SQLException if an error occurs while inserting data into the database
 */
protected boolean insert(String data,PreparedStatement stmt) throws SQLException {
  if (!parsedHeader) {
    parsedHeader=true;
    log.info("String_Node_Str" + data);
    return false;
  }
  StringTokenizer st=new StringTokenizer(data,getDelimiter());
  int counter=1;
  log.info("String_Node_Str" + data);
  while (st.hasMoreTokens()) {
    String colVal=st.nextToken();
    if (colVal.equalsIgnoreCase("String_Node_Str")) {
      stmt.setString(counter,null);
    }
 else {
      stmt.setString(counter,colVal);
    }
    counter++;
  }
  return true;
}
Program: 179603
Project: 179603
Buggy source:
public void setName(String name){
  this.name=name;
}

Fixed version (ground truth):
/** 
 * @see com.tacitknowledge.util.migration.MigrationTaskSupport#setName(java.lang.String)
 */
public void setName(String name){
  this.name=name;
}
Program: 179604
Project: 179604
Buggy source:
public String getName(){
  return name;
}

Fixed version (ground truth):
/** 
 * @see com.tacitknowledge.util.migration.MigrationTask#getName()
 */
public String getName(){
  return name;
}
Program: 179605
Project: 179605
Buggy source:
/** 
 * Tests several combinations of input names to insure things are  working well.
 */
public void testNameParsing(){
  String longName=loader.pathSeparator + "String_Node_Str" + loader.pathSeparator+ "String_Node_Str"+ loader.pathSeparator+ "String_Node_Str";
  String medName=loader.pathSeparator + "String_Node_Str";
  String names[]={"String_Node_Str",longName,medName};
  for (int i=0; i < names.length; i++) {
    loader.setName(names[i]);
    String tb=loader.getTableFromName();
    assertTrue("String_Node_Str".equals(tb));
  }
}

Fixed version (ground truth):
/** 
 * Tests several combinations of input names to insure things are  working well.
 */
public void testNameParsing(){
  String longName=DelimitedFileLoader.PATH_SEPARATOR + "String_Node_Str" + DelimitedFileLoader.PATH_SEPARATOR+ "String_Node_Str"+ DelimitedFileLoader.PATH_SEPARATOR+ "String_Node_Str";
  String medName=DelimitedFileLoader.PATH_SEPARATOR + "String_Node_Str";
  String names[]={"String_Node_Str",longName,medName};
  for (int i=0; i < names.length; i++) {
    loader.setName(names[i]);
    String tb=loader.getTableFromName();
    assertTrue("String_Node_Str".equals(tb));
  }
}
Program: 179606
Project: 179606
Buggy source:
public String getDelimiter(){
  return "String_Node_Str";
}

Fixed version (ground truth):
/** 
 * @see com.tacitknowledge.util.migration.jdbc.loader.DelimitedFileLoader#getDelimiter()
 */
public String getDelimiter(){
  return "String_Node_Str";
}
Program: 179607
Project: 179607
Buggy source:
public void setName(String name){
  this.name=name;
}

Fixed version (ground truth):
/** 
 * @see com.tacitknowledge.util.migration.MigrationTaskSupport#setName(java.lang.String)
 */
public void setName(String name){
  this.name=name;
}
Program: 179608
Project: 179608
Buggy source:
public String getName(){
  return name;
}

Fixed version (ground truth):
/** 
 * @see com.tacitknowledge.util.migration.MigrationTask#getName()
 */
public String getName(){
  return name;
}
Program: 179609
Project: 179609
Buggy source:
/** 
 * Tests query generation
 */
public void testQuery(){
  loader.setName("String_Node_Str");
  String sql=loader.getStatmentSql();
  String answer="String_Node_Str";
  assertTrue(answer.equals(sql));
}

Fixed version (ground truth):
/** 
 * Tests query generation
 */
public void testQuery(){
  loader.setName("String_Node_Str");
  String sql=loader.getStatmentSql();
  String answer="String_Node_Str" + "String_Node_Str";
  assertTrue(answer.equals(sql));
}
Program: 179610
Project: 179610
Buggy source:
protected InputStream getResourceAsStream(){
  return null;
}

Fixed version (ground truth):
/** 
 * @see com.tacitknowledge.util.migration.jdbc.SqlLoadMigrationTask#getResourceAsStream()
 */
protected InputStream getResourceAsStream(){
  return null;
}
Program: 179611
Project: 179611
Buggy source:
public String getDelimiter(){
  return "String_Node_Str";
}

Fixed version (ground truth):
/** 
 * @see com.tacitknowledge.util.migration.jdbc.loader.DelimitedFileLoader#getDelimiter()
 */
public String getDelimiter(){
  return "String_Node_Str";
}
Program: 179612
Project: 179612
Buggy source:
/** 
 * @see com.tacitknowledge.util.migration.MigrationTaskSource#getMigrationTasks(java.lang.String)
 */
public List getMigrationTasks(String packageName) throws MigrationException {
  Class[] taskClasses=ClassDiscoveryUtil.getClasses(packageName,MigrationTask.class);
  return instantiateTasks(taskClasses);
}

Fixed version (ground truth):
/** 
 * @see MigrationTaskSource#getMigrationTasks(String)
 */
public List getMigrationTasks(String packageName) throws MigrationException {
  Class[] taskClasses=ClassDiscoveryUtil.getClasses(packageName,MigrationTask.class);
  return instantiateTasks(taskClasses);
}
Program: 179613
Project: 179613
Buggy source:
@Override public View getView(int position,View convertView,ViewGroup parent){
  Release release=mReleases.get(position);
  View view=convertView;
  if (view == null) {
    view=mInflater.inflate(mLayoutId,null);
  }
  TextView environmentName=(TextView)view.findViewById(R.id.environment_name);
  TextView comment=(TextView)view.findViewById(R.id.comment);
  TextView state=(TextView)view.findViewById(R.id.state);
  TextView author=(TextView)view.findViewById(R.id.author);
  TextView deployedAt=(TextView)view.findViewById(R.id.deployed_at);
  environmentName.setText(release.getEnvironmentName());
  comment.setText(release.getComment());
  state.setText(release.getStateLabel());
  author.setText(release.getAuthor());
  deployedAt.setText(mDf.format(release.getDeployedAt()));
  return view;
}

Fixed version (ground truth):
@Override public View getView(int position,View convertView,ViewGroup parent){
  Release release=mReleases.get(position);
  View view=convertView;
  if (view == null) {
    view=mInflater.inflate(mLayoutId,null);
  }
  TextView environmentName=(TextView)view.findViewById(R.id.environment_name);
  TextView comment=(TextView)view.findViewById(R.id.comment);
  TextView state=(TextView)view.findViewById(R.id.state);
  TextView author=(TextView)view.findViewById(R.id.author);
  TextView deployedAt=(TextView)view.findViewById(R.id.deployed_at);
  environmentName.setText(release.getEnvironmentName());
  comment.setText(release.getComment());
  state.setText(release.getStateLabel());
  author.setText(release.getAuthor());
  deployedAt.setText(mDf.format(release.getDateToDisplay()));
  return view;
}