nus-yam/ex-repair huggingface dataset:
Program: 6960
Project: 6960
Buggy source:
/** 
 * Called when the activity is first created. 
 */
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  m_app=(XMMS2DroidApp)getApplication();
  m_netModule=m_app.netModule;
  setContentView(R.layout.connected);
  m_stopButton=(Button)findViewById(R.id.stopButton);
  m_stopButton.setOnClickListener(stopListener);
  m_playPauseButton=(Button)findViewById(R.id.playPauseButton);
  m_playPauseButton.setOnClickListener(playPauseListener);
  m_volumeBar=(SeekBar)findViewById(R.id.volumeBar);
  m_volumeBar.setOnSeekBarChangeListener(changeVolumeListener);
  m_nextButton=(Button)findViewById(R.id.next);
  m_nextButton.setOnClickListener(nextListener);
  m_prevButton=(Button)findViewById(R.id.prev);
  m_prevButton.setOnClickListener(prevListener);
  m_volumeView=(TextView)findViewById(R.id.volume);
  m_artistView=(TextView)findViewById(R.id.artist);
  m_titleView=(TextView)findViewById(R.id.track);
  m_playListView=(ListView)findViewById(R.id.playlist);
  m_playListView.setClickable(true);
  m_playListView.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
  m_playDrawable=getResources().getDrawable(R.drawable.play);
  m_pauseDrawable=getResources().getDrawable(R.drawable.pause);
  new Thread(readerTask).start();
  sayHello();
  updatePlaylist();
  updateVolume();
  updatePlaybackStatus();
  updatePlayingTrack();
  registerPlayBackUpdate();
  registerTrackUpdate();
  m_playListAdapter=new ArrayAdapter<String>(this,android.R.layout.simple_list_item_1,m_playList);
  m_playListView.setAdapter(m_playListAdapter);
}

Fixed version (ground truth):
/** 
 * Called when the activity is first created. 
 */
@Override public void onCreate(Bundle savedInstanceState){
  super.onCreate(savedInstanceState);
  Log.w(XMMS2DroidApp.TAG,"String_Node_Str");
  m_app=(XMMS2DroidApp)getApplication();
  m_netModule=m_app.netModule;
  setContentView(R.layout.connected);
  m_stopButton=(Button)findViewById(R.id.stopButton);
  m_stopButton.setOnClickListener(stopListener);
  m_playPauseButton=(Button)findViewById(R.id.playPauseButton);
  m_playPauseButton.setOnClickListener(playPauseListener);
  m_volumeBar=(SeekBar)findViewById(R.id.volumeBar);
  m_volumeBar.setOnSeekBarChangeListener(changeVolumeListener);
  m_nextButton=(Button)findViewById(R.id.next);
  m_nextButton.setOnClickListener(nextListener);
  m_prevButton=(Button)findViewById(R.id.prev);
  m_prevButton.setOnClickListener(prevListener);
  m_volumeView=(TextView)findViewById(R.id.volume);
  m_artistView=(TextView)findViewById(R.id.artist);
  m_titleView=(TextView)findViewById(R.id.track);
  m_playListView=(ListView)findViewById(R.id.playlist);
  m_playListView.setClickable(true);
  m_playListView.setChoiceMode(ListView.CHOICE_MODE_SINGLE);
  m_playDrawable=getResources().getDrawable(R.drawable.play);
  m_pauseDrawable=getResources().getDrawable(R.drawable.pause);
}
Program: 6961
Project: 6961
Buggy source:
@Override public void run(){
  m_readHandler=new ReadHandler(m_netModule);
  while (true) {
    if (m_readHandler.readMsg()) {
      ByteBuffer recHeader=m_readHandler.getHeader();
      ByteBuffer recMsg=m_readHandler.getMsg();
      ServerMsg parsed=XmmsMsgParser.parseMsg(recHeader,recMsg);
      handleMessage(parsed);
      m_readHandler.clear();
    }
  }
}

Fixed version (ground truth):
@Override public void run(){
  m_readHandler=new ReadHandler(m_netModule);
  while (running) {
    if (m_readHandler.readMsg()) {
      ByteBuffer recHeader=m_readHandler.getHeader();
      ByteBuffer recMsg=m_readHandler.getMsg();
      ServerMsg parsed=XmmsMsgParser.parseMsg(recHeader,recMsg);
      handleMessage(parsed);
      m_readHandler.clear();
    }
  }
}
Program: 6962
Project: 6962
Buggy source:
private void handleTrackInfoMsg(ServerTrackInfoMsg msg){
  HashMap<String,Object> artistMap=msg.getTrackInfo().get("String_Node_Str");
  String pluginKey="String_Node_Str";
  String artist="String_Node_Str";
  for (  Entry<String,Object> artistEntry : artistMap.entrySet()) {
    if (artistEntry.getKey().startsWith("String_Node_Str")) {
      artist=(String)artistEntry.getValue();
      pluginKey=artistEntry.getKey();
    }
  }
  final String song=(String)msg.getTrackInfo().get("String_Node_Str").get(pluginKey);
  if (!msg.getPlayListInfo()) {
    m_curArtist=artist;
    m_curSong=song;
    runOnUiThread(updateTrackDisplay);
  }
 else {
    int id=(Integer)msg.getTrackInfo().get("String_Node_Str").get("String_Node_Str");
    m_tracks.put(id,artist + "String_Node_Str" + song);
    runOnUiThread(updatePlayListDisplay);
  }
}

Fixed version (ground truth):
private void handleTrackInfoMsg(ServerTrackInfoMsg msg){
  HashMap<String,Object> infoMap=msg.getTrackInfo().get("String_Node_Str");
  String artist="String_Node_Str";
  String pluginKey="String_Node_Str";
  if (infoMap != null) {
    for (    Entry<String,Object> artistEntry : infoMap.entrySet()) {
      if (artistEntry.getKey().startsWith("String_Node_Str")) {
        artist=(String)artistEntry.getValue();
        pluginKey=artistEntry.getKey();
      }
    }
  }
  String song="String_Node_Str";
  infoMap=msg.getTrackInfo().get("String_Node_Str");
  if (infoMap != null) {
    song=(String)infoMap.get(pluginKey);
    if (song == null) {
      for (      Entry<String,Object> artistEntry : infoMap.entrySet()) {
        if (artistEntry.getKey().startsWith("String_Node_Str")) {
          artist=(String)artistEntry.getValue();
          pluginKey=artistEntry.getKey();
        }
      }
    }
  }
  if (!msg.getPlayListInfo()) {
    m_curArtist=artist;
    m_curSong=song;
    runOnUiThread(updateTrackDisplay);
  }
 else {
    int id=(Integer)msg.getTrackInfo().get("String_Node_Str").get("String_Node_Str");
    StringBuilder sb=new StringBuilder();
    if (artist != null)     sb.append(artist);
    if (song != null) {
      if (sb.length() > 0)       sb.append("String_Node_Str");
      sb.append(song);
    }
    m_tracks.put(id,sb.toString());
    runOnUiThread(updatePlayListDisplay);
  }
}
Program: 6963
Project: 6963
Buggy source:
private static ServerTrackInfoMsg parseTrackInfoMsg(ByteBuffer msg){
  msg.flip();
  msg.getInt();
  HashMap<String,HashMap<String,Object>> trackInfo=DictParser.parseTrackInfo(msg);
  return new ServerTrackInfoMsg(SrvMsgTypes.TRACKINFO_MSG,trackInfo);
}

Fixed version (ground truth):
private static ServerMsg parseTrackInfoMsg(ByteBuffer msg){
  if (msg.capacity() == 21) {
    return new ServerMsg(SrvMsgTypes.UNKNOWN);
  }
  msg.flip();
  msg.getInt();
  HashMap<String,HashMap<String,Object>> trackInfo=DictParser.parseTrackInfo(msg);
  return new ServerTrackInfoMsg(SrvMsgTypes.TRACKINFO_MSG,trackInfo);
}
Program: 6966
Project: 6966
Buggy source:
public void onTypingFinished(){
  MenuMetaModPlayerManager.onPlayerResponse(player,this.getText());
}

Fixed version (ground truth):
public void onTypingFinished(){
  System.out.println("String_Node_Str" + this.getText());
  MenuMetaModPlayerManager.onPlayerResponse(player,this.getText());
}
Program: 6967
Project: 6967
Buggy source:
public void testAddTestsAndExitOnFailureWithLocalServer() throws Exception {
  List<String> tests=tests();
  ActionSequenceBuilder builder=new ActionSequenceBuilder(new ActionFactory(null,Collections.<TestsPreProcessor>emptySet(),SlaveBrowser.TIMEOUT,Collections.<AuthStrategy>emptySet(),false,null,null),null,null,new BrowserActionExecutorAction(null,null,null,null,null,0,null,null),new FailureCheckerAction(null,null),new UploadAction(null),new CapturedBrowsers(new BrowserIdStrategy(new MockTime(0))),null,newConfigureProxyActionFactory());
  List<Class<? extends Action>> expectedActions=new ArrayList<Class<? extends Action>>();
  expectedActions.add(ServerStartupAction.class);
  expectedActions.add(ConfigureProxyAction.class);
  expectedActions.add(UploadAction.class);
  expectedActions.add(BrowserActionExecutorAction.class);
  expectedActions.add(ServerShutdownAction.class);
  expectedActions.add(FailureCheckerAction.class);
  builder.withLocalServerPort(1001).usingFiles(files,false);
  List<Action> sequence=builder.addTests(tests).raiseOnFailure().build();
  assertSequence(expectedActions,sequence);
}

Fixed version (ground truth):
public void testAddTestsAndExitOnFailureWithLocalServer() throws Exception {
  List<String> tests=tests();
  ActionSequenceBuilder builder=new ActionSequenceBuilder(new ActionFactory(null,Collections.<TestsPreProcessor>emptySet(),SlaveBrowser.TIMEOUT,Collections.<AuthStrategy>emptySet(),false,null,null),null,null,new BrowserActionExecutorAction(null,null,null,null,null,0,null,null),new FailureCheckerAction(null,null),new UploadAction(null),new CapturedBrowsers(new BrowserIdStrategy(new MockTime(0))),null,newConfigureProxyActionFactory(),null);
  List<Class<? extends Action>> expectedActions=new ArrayList<Class<? extends Action>>();
  expectedActions.add(ServerStartupAction.class);
  expectedActions.add(ConfigureProxyAction.class);
  expectedActions.add(UploadAction.class);
  expectedActions.add(BrowserActionExecutorAction.class);
  expectedActions.add(ServerShutdownAction.class);
  expectedActions.add(FailureCheckerAction.class);
  builder.withLocalServerPort(1001).usingFiles(files,false);
  List<Action> sequence=builder.addTests(tests).raiseOnFailure().build();
  assertSequence(expectedActions,sequence);
}
Program: 6968
Project: 6968
Buggy source:
public void testNoBrowsers() throws Exception {
  List<String> tests=tests();
  ActionSequenceBuilder builder=new ActionSequenceBuilder(new ActionFactory(null,Collections.<TestsPreProcessor>emptySet(),SlaveBrowser.TIMEOUT,Collections.<AuthStrategy>emptySet(),false,null,new NullPathPrefix()),null,null,new BrowserActionExecutorAction(null,null,null,null,null,0,null,null),new FailureCheckerAction(null,null),new UploadAction(null),new CapturedBrowsers(new BrowserIdStrategy(new MockTime(0))),null,newConfigureProxyActionFactory());
  List<Action> actions=builder.addTests(tests).withLocalServerPort(999).usingFiles(files,false).build();
  List<Class<? extends Action>> expectedActions=new ArrayList<Class<? extends Action>>();
  expectedActions.add(ServerStartupAction.class);
  expectedActions.add(ConfigureProxyAction.class);
  expectedActions.add(UploadAction.class);
  expectedActions.add(BrowserActionExecutorAction.class);
  expectedActions.add(ServerShutdownAction.class);
  this.<Action>assertSequence(expectedActions,actions);
}

Fixed version (ground truth):
public void testNoBrowsers() throws Exception {
  List<String> tests=tests();
  ActionSequenceBuilder builder=new ActionSequenceBuilder(new ActionFactory(null,Collections.<TestsPreProcessor>emptySet(),SlaveBrowser.TIMEOUT,Collections.<AuthStrategy>emptySet(),false,null,new NullPathPrefix()),null,null,new BrowserActionExecutorAction(null,null,null,null,null,0,null,null),new FailureCheckerAction(null,null),new UploadAction(null),new CapturedBrowsers(new BrowserIdStrategy(new MockTime(0))),null,newConfigureProxyActionFactory(),null);
  List<Action> actions=builder.addTests(tests).withLocalServerPort(999).usingFiles(files,false).build();
  List<Class<? extends Action>> expectedActions=new ArrayList<Class<? extends Action>>();
  expectedActions.add(ServerStartupAction.class);
  expectedActions.add(ConfigureProxyAction.class);
  expectedActions.add(UploadAction.class);
  expectedActions.add(BrowserActionExecutorAction.class);
  expectedActions.add(ServerShutdownAction.class);
  this.<Action>assertSequence(expectedActions,actions);
}
Program: 6969
Project: 6969
Buggy source:
public void testAddTestsWithLocalServer() throws Exception {
  List<String> tests=tests();
  ActionSequenceBuilder builder=new ActionSequenceBuilder(new ActionFactory(null,Collections.<TestsPreProcessor>emptySet(),SlaveBrowser.TIMEOUT,Collections.<AuthStrategy>emptySet(),false,null,null),null,null,new BrowserActionExecutorAction(null,null,null,null,null,0,null,null),new FailureCheckerAction(null,null),new UploadAction(null),new CapturedBrowsers(new BrowserIdStrategy(new MockTime(0))),null,newConfigureProxyActionFactory());
  List<Class<? extends Action>> expectedActions=new ArrayList<Class<? extends Action>>();
  expectedActions.add(ServerStartupAction.class);
  expectedActions.add(ConfigureProxyAction.class);
  expectedActions.add(UploadAction.class);
  expectedActions.add(BrowserActionExecutorAction.class);
  expectedActions.add(ServerShutdownAction.class);
  builder.withLocalServerPort(1001).usingFiles(files,false);
  List<Action> sequence=builder.addTests(tests).build();
  assertSequence(expectedActions,sequence);
}

Fixed version (ground truth):
public void testAddTestsWithLocalServer() throws Exception {
  List<String> tests=tests();
  ActionSequenceBuilder builder=new ActionSequenceBuilder(new ActionFactory(null,Collections.<TestsPreProcessor>emptySet(),SlaveBrowser.TIMEOUT,Collections.<AuthStrategy>emptySet(),false,null,null),null,null,new BrowserActionExecutorAction(null,null,null,null,null,0,null,null),new FailureCheckerAction(null,null),new UploadAction(null),new CapturedBrowsers(new BrowserIdStrategy(new MockTime(0))),null,newConfigureProxyActionFactory(),null);
  List<Class<? extends Action>> expectedActions=new ArrayList<Class<? extends Action>>();
  expectedActions.add(ServerStartupAction.class);
  expectedActions.add(ConfigureProxyAction.class);
  expectedActions.add(UploadAction.class);
  expectedActions.add(BrowserActionExecutorAction.class);
  expectedActions.add(ServerShutdownAction.class);
  builder.withLocalServerPort(1001).usingFiles(files,false);
  List<Action> sequence=builder.addTests(tests).build();
  assertSequence(expectedActions,sequence);
}
Program: 6970
Project: 6970
Buggy source:
public void testAddTestsWithRemoteServerAddress() throws Exception {
  List<String> tests=tests();
  ActionSequenceBuilder builder=new ActionSequenceBuilder(actionFactory,null,null,new BrowserActionExecutorAction(null,null,null,null,null,0,null,null),new FailureCheckerAction(null,null),new UploadAction(null),new CapturedBrowsers(new BrowserIdStrategy(new MockTime(0))),null,newConfigureProxyActionFactory());
  List<Class<? extends Action>> expectedActions=new ArrayList<Class<? extends Action>>();
  expectedActions.add(ConfigureProxyAction.class);
  expectedActions.add(UploadAction.class);
  expectedActions.add(BrowserActionExecutorAction.class);
  builder.usingFiles(files,false);
  List<Action> sequence=builder.addTests(tests).build();
  assertSequence(expectedActions,sequence);
}

Fixed version (ground truth):
public void testAddTestsWithRemoteServerAddress() throws Exception {
  List<String> tests=tests();
  ActionSequenceBuilder builder=new ActionSequenceBuilder(actionFactory,null,null,new BrowserActionExecutorAction(null,null,null,null,null,0,null,null),new FailureCheckerAction(null,null),new UploadAction(null),new CapturedBrowsers(new BrowserIdStrategy(new MockTime(0))),null,newConfigureProxyActionFactory(),null);
  List<Class<? extends Action>> expectedActions=new ArrayList<Class<? extends Action>>();
  expectedActions.add(ConfigureProxyAction.class);
  expectedActions.add(UploadAction.class);
  expectedActions.add(BrowserActionExecutorAction.class);
  builder.usingFiles(files,false);
  List<Action> sequence=builder.addTests(tests).build();
  assertSequence(expectedActions,sequence);
}
Program: 6971
Project: 6971
Buggy source:
public long getHeartbeatTimeout(){
  return SlaveBrowser.TIMEOUT;
}

Fixed version (ground truth):
public long getHeartbeatTimeout(){
  return 10;
}
Program: 6972
Project: 6972
Buggy source:
public void stopBrowser(){
  started=false;
}

Fixed version (ground truth):
public void stopBrowser(){
}
Program: 6973
Project: 6973
Buggy source:
public int getTimeout(){
  return timeout;
}

Fixed version (ground truth):
public int getTimeout(){
  return 10;
}
Program: 6974
Project: 6974
Buggy source:
public int getUploadSize(){
  return FileUploader.CHUNK_SIZE;
}

Fixed version (ground truth):
public int getUploadSize(){
  return 0;
}
Program: 6975
Project: 6975
Buggy source:
public void startBrowser(String serverAddress){
  this.serverAddress=serverAddress;
  started=true;
}

Fixed version (ground truth):
public void startBrowser(String serverAddress){
  this.serverAddress=serverAddress;
}
Program: 6976
Project: 6976
Buggy source:
public void testParseFlagsAndCreateActionQueue() throws Exception {
  DefaultActionListProvider parser=createProvider(9876,false,Collections.<String>emptyList(),Collections.<ActionListProcessor>emptySet(),"String_Node_Str",null);
  List<Action> actions=parser.get();
  ArrayList<Class<? extends Action>> expectedActions=new ArrayList<Class<? extends Action>>();
  expectedActions.add(ServerStartupAction.class);
  expectedActions.add(ConfigureProxyAction.class);
  expectedActions.add(UploadAction.class);
  assertSequence(expectedActions,actions);
}

Fixed version (ground truth):
public void testParseFlagsAndCreateActionQueue() throws Exception {
  DefaultActionListProvider provider=createProvider(9876,false,Collections.<String>emptyList(),Collections.<ActionListProcessor>emptySet(),"String_Node_Str",null);
  List<Action> actions=provider.get();
  ArrayList<Class<? extends Action>> expectedActions=new ArrayList<Class<? extends Action>>();
  expectedActions.add(ServerStartupAction.class);
  expectedActions.add(ConfigureProxyAction.class);
  expectedActions.add(UploadAction.class);
  expectedActions.add(BrowserStartupAction.class);
  assertSequence(expectedActions,actions);
}
Program: 6977
Project: 6977
Buggy source:
private DefaultActionListProvider createProvider(int port,boolean reset,List<String> tests,Set<ActionListProcessor> processors,String testOutput,XmlPrinter xmlPrinter){
  ActionFactory actionFactory=new ActionFactory(null,Collections.<TestsPreProcessor>emptySet(),SlaveBrowser.TIMEOUT,Collections.<AuthStrategy>emptySet(),false,null,null);
  return new DefaultActionListProvider(tests,Collections.<String>emptyList(),reset,Collections.<String>emptyList(),false,port,Collections.<FileInfo>emptySet(),testOutput,processors,xmlPrinter,new ActionSequenceBuilder(actionFactory,null,null,new BrowserActionExecutorAction(null,null,null,null,null,-1,null,null),new FailureCheckerAction(null,null),new UploadAction(null),new CapturedBrowsers(new BrowserIdStrategy(new MockTime(0))),null,newConfigureProxyActionFactory()),true);
}

Fixed version (ground truth):
private DefaultActionListProvider createProvider(int port,boolean reset,List<String> tests,Set<ActionListProcessor> processors,String testOutput,XmlPrinter xmlPrinter){
  ActionFactory actionFactory=new ActionFactory(null,Collections.<TestsPreProcessor>emptySet(),SlaveBrowser.TIMEOUT,Collections.<AuthStrategy>emptySet(),false,null,null);
  return new DefaultActionListProvider(tests,Collections.<String>emptyList(),reset,Collections.<String>emptyList(),false,port,Collections.<FileInfo>emptySet(),testOutput,processors,xmlPrinter,new ActionSequenceBuilder(actionFactory,null,null,new BrowserActionExecutorAction(null,null,null,null,null,-1,null,null),new FailureCheckerAction(null,null),new UploadAction(null),new CapturedBrowsers(new BrowserIdStrategy(new MockTime(0))),null,newConfigureProxyActionFactory(),new BrowserStartupAction(null,null,null,null,null)),true);
}
Program: 6978
Project: 6978
Buggy source:
public void testCall() throws Exception {
  String browserId="String_Node_Str";
  String serverAddress="String_Node_Str";
  final BrowserInfo browserInfo=new BrowserInfo();
  browserInfo.setId(Long.parseLong(browserId));
  browserInfo.setServerReceivedHeartbeat(true);
  final FakeJsTestDriverClient client=new FakeJsTestDriverClient(Lists.newArrayList(browserInfo));
  final FakeBrowserRunner runner=new FakeBrowserRunner();
  final FakeBrowserActionRunner browserActionRunner=new FakeBrowserActionRunner();
  final BrowserManagedRunner browserRunner=new BrowserManagedRunner(runner,browserId,serverAddress,client,browserActionRunner,new NullStopWatch());
  browserRunner.call();
}

Fixed version (ground truth):
public void testCall() throws Exception {
  String browserId="String_Node_Str";
  String serverAddress="String_Node_Str";
  final BrowserInfo browserInfo=new BrowserInfo();
  browserInfo.setId(Long.parseLong(browserId));
  browserInfo.setServerReceivedHeartbeat(true);
  final FakeJsTestDriverClient client=new FakeJsTestDriverClient(Lists.newArrayList(browserInfo));
  final FakeBrowserRunner runner=new FakeBrowserRunner();
  final FakeBrowserActionRunner browserActionRunner=new FakeBrowserActionRunner();
  final BrowserCallable<Collection<ResponseStream>> browserRunner=new BrowserCallable<Collection<ResponseStream>>(browserActionRunner,browserId,new BrowserControl(runner,serverAddress,new NullStopWatch(),client));
  browserRunner.call();
}
Program: 6979
Project: 6979
Buggy source:
private Factory newConfigureProxyActionFactory(){
  return new Factory(){
    public ConfigureProxyAction create(    JsonArray proxyConfig){
      return new ConfigureProxyAction(null,null,null,proxyConfig);
    }
  }
;
}

Fixed version (ground truth):
private Factory newConfigureProxyActionFactory(){
  return new Factory(){
    public ConfigureProxyAction create(    JsonArray proxyConfig){
      return new ConfigureProxyAction(null,null,null,null,proxyConfig);
    }
  }
;
}
Program: 6980
Project: 6980
Buggy source:
public ConfigureProxyAction create(JsonArray proxyConfig){
  return new ConfigureProxyAction(null,null,null,proxyConfig);
}

Fixed version (ground truth):
public ConfigureProxyAction create(JsonArray proxyConfig){
  return new ConfigureProxyAction(null,null,null,null,proxyConfig);
}
Program: 6981
Project: 6981
Buggy source:
private Factory newConfigureProxyActionFactory(){
  return new Factory(){
    public ConfigureProxyAction create(    JsonArray proxyConfig){
      return new ConfigureProxyAction(null,null,null,proxyConfig);
    }
  }
;
}

Fixed version (ground truth):
private Factory newConfigureProxyActionFactory(){
  return new Factory(){
    public ConfigureProxyAction create(    JsonArray proxyConfig){
      return new ConfigureProxyAction(null,null,null,null,proxyConfig);
    }
  }
;
}
Program: 6982
Project: 6982
Buggy source:
public ConfigureProxyAction create(JsonArray proxyConfig){
  return new ConfigureProxyAction(null,null,null,proxyConfig);
}

Fixed version (ground truth):
public ConfigureProxyAction create(JsonArray proxyConfig){
  return new ConfigureProxyAction(null,null,null,null,proxyConfig);
}
Program: 6983
Project: 6983
Buggy source:
public void testEscapeSlashes() throws Exception {
  StringWriter writer=new StringWriter();
  EscapingWriter escaper=new EscapingWriter(writer);
  escaper.write('\\');
  assertEquals("String_Node_Str",writer.toString());
}

Fixed version (ground truth):
public void testEscapeSlashes() throws Exception {
  StringWriter writer=new StringWriter();
  EscapingWriter escaper=new EscapingWriter(writer);
  escaper.write('\\');
  assertEquals("String_Node_Str",writer.toString());
  assertEquals(1,escaper.getEscapedCount('\\'));
}
Program: 6984
Project: 6984
Buggy source:
public void testEscapeLineBreak() throws Exception {
  StringWriter writer=new StringWriter();
  EscapingWriter escaper=new EscapingWriter(writer);
  escaper.write('\n');
  assertEquals("String_Node_Str",writer.toString());
}

Fixed version (ground truth):
public void testEscapeLineBreak() throws Exception {
  StringWriter writer=new StringWriter();
  EscapingWriter escaper=new EscapingWriter(writer);
  escaper.write('\n');
  assertEquals("String_Node_Str",writer.toString());
  assertEquals(1,escaper.getEscapedCount('\n'));
}
Program: 6985
Project: 6985
Buggy source:
public void testEscapeQuotes() throws Exception {
  StringWriter writer=new StringWriter();
  EscapingWriter escaper=new EscapingWriter(writer);
  for (  char chr : "String_Node_Str".toCharArray()) {
    escaper.write(chr);
  }
  assertEquals("String_Node_Str",writer.toString());
}

Fixed version (ground truth):
public void testEscapeQuotes() throws Exception {
  StringWriter writer=new StringWriter();
  EscapingWriter escaper=new EscapingWriter(writer);
  for (  char chr : "String_Node_Str".toCharArray()) {
    escaper.write(chr);
  }
  assertEquals("String_Node_Str",writer.toString());
  assertEquals(1,escaper.getEscapedCount('"'));
}
Program: 6986
Project: 6986
Buggy source:
public void testAppend() throws Exception {
  String id="String_Node_Str";
  String html="String_Node_Str";
  Node node=new HtmlDocNestedNode(ConcreteToken.from(id),Lists.newArrayList(ConcreteToken.from(html)));
  StringWriter writer=new StringWriter();
  node.write(writer);
  assertEquals(String.format("String_Node_Str",html.replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str")),writer.toString());
}

Fixed version (ground truth):
public void testAppend() throws Exception {
  String id="String_Node_Str";
  String html="String_Node_Str";
  Node node=new HtmlDocNestedNode(ConcreteToken.from(id),Lists.newArrayList(ConcreteToken.from(html)));
  StringWriter writer=new StringWriter();
  node.write(writer);
  assertEquals(String.format("String_Node_Str",html.replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str")) + "String_Node_Str",writer.toString());
}
Program: 6987
Project: 6987
Buggy source:
public void testVariableAssignment() throws Exception {
  String id="String_Node_Str";
  String html="String_Node_Str";
  Node node=new HtmlDocNestedNode(ConcreteToken.from(id),Lists.newArrayList(ConcreteToken.from(html)));
  StringWriter writer=new StringWriter();
  node.write(writer);
  assertEquals(String.format("String_Node_Str",id,html.replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str")),writer.toString());
}

Fixed version (ground truth):
public void testVariableAssignment() throws Exception {
  String id="String_Node_Str";
  String html="String_Node_Str";
  Node node=new HtmlDocNestedNode(ConcreteToken.from(id),Lists.newArrayList(ConcreteToken.from(html)));
  StringWriter writer=new StringWriter();
  node.write(writer);
  assertEquals(String.format("String_Node_Str",id,html.replace("String_Node_Str","String_Node_Str").replace("String_Node_Str","String_Node_Str")) + "String_Node_Str",writer.toString());
}
Program: 6988
Project: 6988
Buggy source:
@Override public void write(Writer writer){
  EscapingWriter escaping=new EscapingWriter(writer);
  try {
    if (id.contains('+')) {
      writer.write(JS_APPEND_HTML);
    }
 else {
      writer.write(JS_THIS);
      id.write(escaping);
      writer.write(JS_TO_HTML);
    }
    for (    Token fragment : html) {
      fragment.write(escaping);
    }
    writer.write(JS_ARG_SEP);
    writer.write(JS_END_STATEMENT);
  }
 catch (  IOException e) {
    throw new RuntimeException(e);
  }
}

Fixed version (ground truth):
@Override public void write(Writer writer){
  EscapingWriter escaping=new EscapingWriter(writer);
  try {
    if (id.contains('+')) {
      writer.write(JS_APPEND_HTML);
    }
 else {
      writer.write(JS_THIS);
      id.write(escaping);
      writer.write(JS_TO_HTML);
    }
    for (    Token fragment : html) {
      fragment.write(escaping);
    }
    writer.write(JS_ARG_SEP);
    writer.write(JS_END_STATEMENT);
    for (int i=0; i < escaping.getEscapedCount('\n'); i++) {
      writer.append('\n');
    }
  }
 catch (  IOException e) {
    throw new RuntimeException(e);
  }
}
Program: 6989
Project: 6989
Buggy source:
public EscapingWriter(Writer out){
  super(out);
}

Fixed version (ground truth):
public EscapingWriter(Writer out){
  super(out);
  for (  Character key : REPLACE.keySet()) {
    escapedCounts.put(key,0);
  }
}
Program: 6990
Project: 6990
Buggy source:
public void testCaptureAndGenerateUrlStrict() throws Exception {
  BrowserHunter browserHunter=new BrowserHunter(new CapturedBrowsers(),SlaveBrowser.TIMEOUT,new NullPathPrefix());
  SlaveBrowser slaveBrowser=browserHunter.captureBrowser("String_Node_Str","String_Node_Str","String_Node_Str");
  BrowserInfo browserInfo=slaveBrowser.getBrowserInfo();
  assertEquals("String_Node_Str",browserInfo.getName());
  assertEquals("String_Node_Str",browserInfo.getVersion());
  assertEquals("String_Node_Str",browserInfo.getOs());
  assertEquals("String_Node_Str",browserHunter.getCaptureUrl(slaveBrowser.getId(),CaptureHandler.STRICT,CLIENT,-1));
}

Fixed version (ground truth):
public void testCaptureAndGenerateUrlStrict() throws Exception {
  BrowserHunter browserHunter=new BrowserHunter(new CapturedBrowsers(),SlaveBrowser.TIMEOUT,new NullPathPrefix(),new TimeImpl());
  SlaveBrowser slaveBrowser=browserHunter.captureBrowser("String_Node_Str","String_Node_Str","String_Node_Str");
  BrowserInfo browserInfo=slaveBrowser.getBrowserInfo();
  assertEquals("String_Node_Str",browserInfo.getName());
  assertEquals("String_Node_Str",browserInfo.getVersion());
  assertEquals("String_Node_Str",browserInfo.getOs());
  assertEquals("String_Node_Str",browserHunter.getCaptureUrl(slaveBrowser.getId(),CaptureHandler.STRICT,CLIENT,-1l));
}
Program: 6991
Project: 6991
Buggy source:
public void testCaptureAndGenerateUrlQuirks() throws Exception {
  BrowserHunter browserHunter=new BrowserHunter(new CapturedBrowsers(),SlaveBrowser.TIMEOUT,new NullPathPrefix());
  SlaveBrowser slaveBrowser=browserHunter.captureBrowser("String_Node_Str","String_Node_Str","String_Node_Str");
  BrowserInfo browserInfo=slaveBrowser.getBrowserInfo();
  assertEquals("String_Node_Str",browserInfo.getName());
  assertEquals("String_Node_Str",browserInfo.getVersion());
  assertEquals("String_Node_Str",browserInfo.getOs());
  assertEquals("String_Node_Str",browserHunter.getCaptureUrl(slaveBrowser.getId(),CaptureHandler.QUIRKS,CLIENT,-1));
}

Fixed version (ground truth):
public void testCaptureAndGenerateUrlQuirks() throws Exception {
  BrowserHunter browserHunter=new BrowserHunter(new CapturedBrowsers(),SlaveBrowser.TIMEOUT,new NullPathPrefix(),new TimeImpl());
  SlaveBrowser slaveBrowser=browserHunter.captureBrowser("String_Node_Str","String_Node_Str","String_Node_Str");
  BrowserInfo browserInfo=slaveBrowser.getBrowserInfo();
  assertEquals("String_Node_Str",browserInfo.getName());
  assertEquals("String_Node_Str",browserInfo.getVersion());
  assertEquals("String_Node_Str",browserInfo.getOs());
  assertEquals("String_Node_Str",browserHunter.getCaptureUrl(slaveBrowser.getId(),CaptureHandler.QUIRKS,CLIENT,-1l));
}
Program: 6992
Project: 6992
Buggy source:
public void testSlaveBrowserHeartBeat() throws Exception {
  MockTime mockTime=new MockTime(0);
  SlaveBrowser browser=new SlaveBrowser(mockTime,"String_Node_Str",new BrowserInfo(),SlaveBrowser.TIMEOUT);
  assertEquals(null,browser.getLastHeartbeat());
  mockTime.add(5);
  browser.heartBeat();
  assertEquals(5L,browser.getLastHeartbeat().getMillis());
}

Fixed version (ground truth):
public void testSlaveBrowserHeartBeat() throws Exception {
  MockTime mockTime=new MockTime(0);
  SlaveBrowser browser=new SlaveBrowser(mockTime,"String_Node_Str",new BrowserInfo(),SlaveBrowser.TIMEOUT);
  assertEquals(new Instant(0),browser.getLastHeartbeat());
  mockTime.add(5);
  browser.heartBeat();
  assertEquals(5L,browser.getLastHeartbeat().getMillis());
}
Program: 6993
Project: 6993
Buggy source:
public void testDecorate() throws Exception {
  CoverageReporterAction reporter=new CoverageReporterAction(null,null);
  List<Action> actions=Lists.<Action>newArrayList(new ServerStartupAction(0,null,null,SlaveBrowser.TIMEOUT,null,Collections.<AuthStrategy>emptySet(),false,null,new NullPathPrefix()));
  List<Action> actual=new CoverageActionDecorator(reporter).process(actions);
  assertEquals(2,actual.size());
  assertTrue(actual.get(0) instanceof ServerStartupAction);
  assertTrue(actual.get(1) instanceof CoverageReporterAction);
}

Fixed version (ground truth):
public void testDecorate() throws Exception {
  CoverageReporterAction reporter=new CoverageReporterAction(null,null,null);
  List<Action> actions=Lists.<Action>newArrayList(new ServerStartupAction(0,null,null,SlaveBrowser.TIMEOUT,null,Collections.<AuthStrategy>emptySet(),false,null,new NullPathPrefix()));
  List<Action> actual=new CoverageActionDecorator(reporter).process(actions);
  assertEquals(2,actual.size());
  assertTrue(actual.get(0) instanceof ServerStartupAction);
  assertTrue(actual.get(1) instanceof CoverageReporterAction);
}
Program: 6994
Project: 6994
Buggy source:
public void testSkipInstrument() throws Exception {
  FileInfo lcov=new FileInfo("String_Node_Str",0,-1,true,false,"String_Node_Str");
  FileInfo serveOnly=new FileInfo("String_Node_Str",0,-1,true,true,"String_Node_Str");
  FileInfo excluded=new FileInfo("String_Node_Str",0,-1,true,false,"String_Node_Str");
  FileInfo remote=new FileInfo("String_Node_Str",0,-1,true,false,null);
  CoverageInstrumentingProcessor processor=new CoverageInstrumentingProcessor(null,Sets.<String>newHashSet(excluded.getFilePath()),null);
  assertSame(lcov,processor.process(lcov));
  assertSame(serveOnly,processor.process(serveOnly));
  assertSame(remote,processor.process(remote));
  assertSame(excluded,processor.process(excluded));
}

Fixed version (ground truth):
public void testSkipInstrument() throws Exception {
  FileInfo lcov=new FileInfo("String_Node_Str",0,-1,true,false,"String_Node_Str");
  FileInfo serveOnly=new FileInfo("String_Node_Str",0,-1,true,true,"String_Node_Str");
  FileInfo excluded=new FileInfo("String_Node_Str",0,-1,true,false,"String_Node_Str");
  FileInfo remote=new FileInfo("String_Node_Str",0,-1,true,false,null);
  CoverageInstrumentingProcessor processor=new CoverageInstrumentingProcessor(null,Sets.<String>newHashSet(excluded.getFilePath()),null,new MockTime(0));
  assertSame(lcov,processor.process(lcov));
  assertSame(serveOnly,processor.process(serveOnly));
  assertSame(remote,processor.process(remote));
  assertSame(excluded,processor.process(excluded));
}
Program: 6995
Project: 6995
Buggy source:
public void testInstrument() throws Exception {
  FileInfo fileInfo=new FileInfo("String_Node_Str",0,-1,true,false,"String_Node_Str");
  String expected="String_Node_Str";
  Code code=new Code(fileInfo.getFilePath(),fileInfo.getData());
  CoverageAccumulator accumulator=new CoverageAccumulator();
  FileInfo decorated=new CoverageInstrumentingProcessor(new DecoratorStub(expected,code),Collections.<String>emptySet(),accumulator).process(fileInfo);
  assertEquals(expected,decorated.getData());
  assertEquals(fileInfo.getFilePath(),decorated.getFilePath());
  assertEquals(fileInfo.getTimestamp(),decorated.getTimestamp());
  assertEquals(fileInfo.isServeOnly(),decorated.isServeOnly());
}

Fixed version (ground truth):
public void testInstrument() throws Exception {
  FileInfo fileInfo=new FileInfo("String_Node_Str",0,-1,true,false,"String_Node_Str");
  String expected="String_Node_Str";
  Code code=new Code(fileInfo.getFilePath(),fileInfo.getData());
  CoverageAccumulator accumulator=new CoverageAccumulator();
  FileInfo decorated=new CoverageInstrumentingProcessor(new DecoratorStub(expected,code),Collections.<String>emptySet(),accumulator,new MockTime(0)).process(fileInfo);
  assertEquals(expected,decorated.getData());
  assertEquals(fileInfo.getFilePath(),decorated.getFilePath());
  assertEquals(fileInfo.getTimestamp(),decorated.getTimestamp());
  assertEquals(fileInfo.isServeOnly(),decorated.isServeOnly());
}
Program: 6996
Project: 6996
Buggy source:
public void testAddJs() throws Exception {
  LinkedList<FileInfo> files=new LinkedList<FileInfo>();
  String lcovSource="String_Node_Str";
  List<FileInfo> processed=new CoverageJsAdder(new FileLoaderStub(lcovSource)).processPlugins(files);
  FileInfo lcov=processed.get(0);
  assertEquals(new LoadedFileInfo(CoverageJsAdder.LCOV_JS,-1,false,false,lcovSource),lcov);
  assertEquals(lcovSource,lcov.getData());
  assertFalse(lcov.canLoad());
}

Fixed version (ground truth):
public void testAddJs() throws Exception {
  LinkedList<FileInfo> files=new LinkedList<FileInfo>();
  String lcovSource="String_Node_Str";
  List<FileInfo> processed=new CoverageJsAdder(new FileLoaderStub(lcovSource),new CoverageNameMapper()).processPlugins(files);
  FileInfo lcov=processed.get(0);
  assertEquals(new LoadedFileInfo(CoverageJsAdder.LCOV_JS,-1,false,false,lcovSource),lcov);
  assertEquals(lcovSource,lcov.getData());
  assertFalse(lcov.canLoad());
}
Program: 6997
Project: 6997
Buggy source:
public void testAddJsWithExistingFiles() throws Exception {
  LinkedList<FileInfo> files=new LinkedList<FileInfo>();
  FileInfo expected=new FileInfo("String_Node_Str",1,-1,false,false,null);
  files.add(expected);
  String lcovSource="String_Node_Str";
  List<FileInfo> processed=new CoverageJsAdder(new FileLoaderStub(lcovSource)).processPlugins(files);
  FileInfo lcov=processed.get(0);
  assertEquals(new LoadedFileInfo(CoverageJsAdder.LCOV_JS,-1,false,false,lcovSource),lcov);
  assertEquals(lcovSource,lcov.getData());
  assertFalse(lcov.canLoad());
  assertSame(expected,processed.get(1));
}

Fixed version (ground truth):
public void testAddJsWithExistingFiles() throws Exception {
  LinkedList<FileInfo> files=new LinkedList<FileInfo>();
  FileInfo expected=new FileInfo("String_Node_Str",1,-1,false,false,null);
  files.add(expected);
  String lcovSource="String_Node_Str";
  List<FileInfo> processed=new CoverageJsAdder(new FileLoaderStub(lcovSource),new CoverageNameMapper()).processPlugins(files);
  FileInfo lcov=processed.get(0);
  assertEquals(new LoadedFileInfo(CoverageJsAdder.LCOV_JS,-1,false,false,lcovSource),lcov);
  assertEquals(lcovSource,lcov.getData());
  assertFalse(lcov.canLoad());
  assertSame(expected,processed.get(1));
}
Program: 6998
Project: 6998
Buggy source:
public RunData run(RunData testCase){
  logger.debug("String_Node_Str",writer);
  accumulator.write(writer);
  writer.flush();
  return testCase;
}

Fixed version (ground truth):
public RunData run(RunData runData){
  if (!runData.getTestCases().isEmpty()) {
    logger.debug("String_Node_Str",writer);
    accumulator.write(writer);
    writer.flush();
  }
  return runData;
}
Program: 6999
Project: 6999
Buggy source:
public List<JstdTestCase> createCases(List<FileInfo> plugins,List<FileInfo> deps,List<FileInfo> tests){
  final List<JstdTestCase> testCases=Lists.newArrayList();
  if (tests.isEmpty()) {
    testCases.add(new JstdTestCase(deps,Collections.<FileInfo>emptyList(),plugins));
  }
 else {
    testCases.add(new JstdTestCase(deps,tests,plugins));
  }
  return processTestCases(resolveDependencies(testCases));
}

Fixed version (ground truth):
public List<JstdTestCase> createCases(List<FileInfo> plugins,List<FileInfo> deps,List<FileInfo> tests){
  final List<JstdTestCase> testCases=Lists.newArrayList();
  if (!(deps.isEmpty() && tests.isEmpty())) {
    testCases.add(new JstdTestCase(deps,tests,plugins));
  }
  return processTestCases(resolveDependencies(testCases));
}
Program: 7000
Project: 7000
Buggy source:
public void testUploadFiles() throws Exception {
  MockServer server=new MockServer();
  FileInfo fileInfo=new FileInfo("String_Node_Str",1232,false,false,null);
  server.expect(baseUrl + "String_Node_Str","String_Node_Str");
  server.expect(baseUrl + "String_Node_Str" + gson.toJson(Arrays.asList(fileInfo))+ "String_Node_Str","String_Node_Str");
  server.expect(baseUrl + "String_Node_Str" + gson.toJson(Arrays.asList(fileInfo))+ "String_Node_Str",gson.toJson(new BrowserFileSet()));
  server.expect(baseUrl + "String_Node_Str","String_Node_Str");
  server.expect(baseUrl + "String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str");
  Map<String,String> params=new LinkedHashMap<String,String>();
  params.put("String_Node_Str","String_Node_Str");
  params.put("String_Node_Str","String_Node_Str");
  FakeResponseStream stream=new FakeResponseStream();
  MockFileLoader fileReader=new MockFileLoader();
  fileReader.addExpectation(fileInfo,"String_Node_Str");
  CommandTask task=createCommandTask(server,params,stream,fileReader,true);
  task.run(new JstdTestCase(Collections.<FileInfo>emptyList(),Lists.newArrayList(fileInfo),java.util.Collections.<FileInfo>emptyList()));
  Response response=stream.getResponse();
  assertEquals("String_Node_Str",response.getResponse());
  assertEquals("String_Node_Str",response.getBrowser().getName());
  assertEquals("String_Node_Str",response.getError());
  assertEquals(123L,response.getExecutionTime());
}

Fixed version (ground truth):
public void testUploadFiles() throws Exception {
  MockServer server=new MockServer();
  FileInfo fileInfo=new FileInfo("String_Node_Str",1232,-1,false,false,null);
  server.expect(baseUrl + "String_Node_Str","String_Node_Str");
  server.expect(baseUrl + "String_Node_Str" + gson.toJson(Arrays.asList(fileInfo))+ "String_Node_Str","String_Node_Str");
  server.expect(baseUrl + "String_Node_Str" + gson.toJson(Arrays.asList(fileInfo))+ "String_Node_Str",gson.toJson(new BrowserFileSet()));
  server.expect(baseUrl + "String_Node_Str","String_Node_Str");
  server.expect(baseUrl + "String_Node_Str","String_Node_Str" + "String_Node_Str" + "String_Node_Str");
  Map<String,String> params=new LinkedHashMap<String,String>();
  params.put("String_Node_Str","String_Node_Str");
  params.put("String_Node_Str","String_Node_Str");
  FakeResponseStream stream=new FakeResponseStream();
  MockFileLoader fileReader=new MockFileLoader();
  fileReader.addExpectation(fileInfo,"String_Node_Str");
  CommandTask task=createCommandTask(server,params,stream,fileReader,true);
  task.run(new JstdTestCase(Collections.<FileInfo>emptyList(),Lists.newArrayList(fileInfo),java.util.Collections.<FileInfo>emptyList()));
  Response response=stream.getResponse();
  assertEquals("String_Node_Str",response.getResponse());
  assertEquals("String_Node_Str",response.getBrowser().getName());
  assertEquals("String_Node_Str",response.getError());
  assertEquals(123L,response.getExecutionTime());
}
Program: 7002
Project: 7002
Buggy source:
public void testDirSubstringOfOtherDir() throws Exception {
  List<FileInfo> files=Lists.newLinkedList();
  files.add(new FileInfo(String.format("String_Node_Str",PATH_SEPARATOR),-1,false,false,null));
  files.add(new FileInfo(String.format("String_Node_Str",PATH_SEPARATOR),-1,false,false,null));
  CommonPathResolver commonPathResolver=new CommonPathResolver(files);
  assertEquals(String.format("String_Node_Str",PATH_SEPARATOR),commonPathResolver.resolve());
}

Fixed version (ground truth):
public void testDirSubstringOfOtherDir() throws Exception {
  List<FileInfo> files=Lists.newLinkedList();
  files.add(new FileInfo(String.format("String_Node_Str",PATH_SEPARATOR),-1,-1,false,false,null));
  files.add(new FileInfo(String.format("String_Node_Str",PATH_SEPARATOR),-1,-1,false,false,null));
  CommonPathResolver commonPathResolver=new CommonPathResolver(files);
  assertEquals(String.format("String_Node_Str",PATH_SEPARATOR),commonPathResolver.resolve());
}
Program: 7003
Project: 7003
Buggy source:
public void testFindLongestCommonPathForOneFile() throws Exception {
  List<FileInfo> files=Lists.newLinkedList();
  files.add(new FileInfo(String.format("String_Node_Str",PATH_SEPARATOR),-1,false,false,null));
  CommonPathResolver commonPathResolver=new CommonPathResolver(files);
  assertEquals(String.format("String_Node_Str",PATH_SEPARATOR),commonPathResolver.resolve());
}

Fixed version (ground truth):
public void testFindLongestCommonPathForOneFile() throws Exception {
  List<FileInfo> files=Lists.newLinkedList();
  files.add(new FileInfo(String.format("String_Node_Str",PATH_SEPARATOR),-1,-1,false,false,null));
  CommonPathResolver commonPathResolver=new CommonPathResolver(files);
  assertEquals(String.format("String_Node_Str",PATH_SEPARATOR),commonPathResolver.resolve());
}
Program: 7004
Project: 7004
Buggy source:
public void testFindLongestCommonPath() throws Exception {
  List<FileInfo> files=Lists.newLinkedList();
  files.add(new FileInfo(String.format("String_Node_Str",PATH_SEPARATOR),-1,false,false,null));
  files.add(new FileInfo(String.format("String_Node_Str",PATH_SEPARATOR),-1,false,false,null));
  files.add(new FileInfo(String.format("String_Node_Str",PATH_SEPARATOR),-1,false,false,null));
  CommonPathResolver commonPathResolver=new CommonPathResolver(files);
  assertEquals(String.format("String_Node_Str",PATH_SEPARATOR),commonPathResolver.resolve());
}

Fixed version (ground truth):
public void testFindLongestCommonPath() throws Exception {
  List<FileInfo> files=Lists.newLinkedList();
  files.add(new FileInfo(String.format("String_Node_Str",PATH_SEPARATOR),-1,-1,false,false,null));
  files.add(new FileInfo(String.format("String_Node_Str",PATH_SEPARATOR),-1,-1,false,false,null));
  files.add(new FileInfo(String.format("String_Node_Str",PATH_SEPARATOR),-1,-1,false,false,null));
  CommonPathResolver commonPathResolver=new CommonPathResolver(files);
  assertEquals(String.format("String_Node_Str",PATH_SEPARATOR),commonPathResolver.resolve());
}
Program: 7005
Project: 7005
Buggy source:
public void testIsWebAddress(){
  FileInfo httpFile=new FileInfo("String_Node_Str",0,false,false,null);
  FileInfo httpsFile=new FileInfo("String_Node_Str",0,false,false,null);
  FileInfo nonWebFile=new FileInfo("String_Node_Str",0,false,false,null);
  assertTrue(httpFile.isWebAddress());
  assertTrue(httpsFile.isWebAddress());
  assertFalse(nonWebFile.isWebAddress());
}

Fixed version (ground truth):
public void testIsWebAddress(){
  FileInfo httpFile=new FileInfo("String_Node_Str",0,-1,false,false,null);
  FileInfo httpsFile=new FileInfo("String_Node_Str",0,-1,false,false,null);
  FileInfo nonWebFile=new FileInfo("String_Node_Str",0,-1,false,false,null);
  assertTrue(httpFile.isWebAddress());
  assertTrue(httpsFile.isWebAddress());
  assertFalse(nonWebFile.isWebAddress());
}
Program: 7006
Project: 7006
Buggy source:
public void testFileInfoExpired() throws Exception {
  Set<FileInfo> oldSet=Sets.newHashSet(new FileInfo("String_Node_Str",10,false,false,null));
  Set<FileInfo> newSet=Sets.newHashSet(new FileInfo("String_Node_Str",11,false,false,null));
  assertEquals(newSet,new FileSetCacheStrategy().createExpiredFileSet(newSet,oldSet));
}

Fixed version (ground truth):
public void testFileInfoExpired() throws Exception {
  Set<FileInfo> oldSet=Sets.newHashSet(new FileInfo("String_Node_Str",10,-1,false,false,null));
  Set<FileInfo> newSet=Sets.newHashSet(new FileInfo("String_Node_Str",11,-1,false,false,null));
  assertEquals(newSet,new FileSetCacheStrategy().createExpiredFileSet(newSet,oldSet));
}
Program: 7007
Project: 7007
Buggy source:
public void testFileInfoUnChanged() throws Exception {
  Set<FileInfo> oldSet=Sets.newHashSet(new FileInfo("String_Node_Str",10,false,false,null));
  Set<FileInfo> newSet=Sets.newHashSet(new FileInfo("String_Node_Str",10,false,false,null));
  assertEquals(Sets.newHashSet(),new FileSetCacheStrategy().createExpiredFileSet(newSet,oldSet));
}

Fixed version (ground truth):
public void testFileInfoUnChanged() throws Exception {
  Set<FileInfo> oldSet=Sets.newHashSet(new FileInfo("String_Node_Str",10,-1,false,false,null));
  Set<FileInfo> newSet=Sets.newHashSet(new FileInfo("String_Node_Str",10,-1,false,false,null));
  assertEquals(Sets.newHashSet(),new FileSetCacheStrategy().createExpiredFileSet(newSet,oldSet));
}
Program: 7008
Project: 7008
Buggy source:
public void testNoFileInfo() throws Exception {
  Set<FileInfo> oldSet=Sets.newHashSet();
  Set<FileInfo> newSet=Sets.newHashSet(new FileInfo("String_Node_Str",11,false,false,null));
  assertEquals(newSet,new FileSetCacheStrategy().createExpiredFileSet(newSet,oldSet));
}

Fixed version (ground truth):
public void testNoFileInfo() throws Exception {
  Set<FileInfo> oldSet=Sets.newHashSet();
  Set<FileInfo> newSet=Sets.newHashSet(new FileInfo("String_Node_Str",11,-1,false,false,null));
  assertEquals(newSet,new FileSetCacheStrategy().createExpiredFileSet(newSet,oldSet));
}
Program: 7009
Project: 7009
Buggy source:
FileInfo createFile(FileInfo info,long timestamp){
  return new FileInfo(info.getFilePath(),timestamp,false,false,null);
}

Fixed version (ground truth):
FileInfo createFile(FileInfo info,long timestamp){
  return new FileInfo(info.getFilePath(),timestamp,-1,false,false,null);
}