nus-yam/ex-repair huggingface dataset:
Program: 96589
Project: 96589
Buggy source:
@Override public void onEnable(){
  getDataFolder().mkdirs();
  loadConfiguration();
  playerListener=new WPPlayerListener(this);
  blockListener=new WPBlockListener(this);
  log.info(logPrefix + "String_Node_Str" + this.getDescription().getVersion()+ "String_Node_Str");
  if (setEconPlugin()) {
    log.info(logPrefix + WPBankAdapter.getEconUsed());
  }
  checkPermissions();
  PluginManager pm=getServer().getPluginManager();
  pm.registerEvent(Event.Type.SIGN_CHANGE,blockListener,Priority.Normal,this);
  pm.registerEvent(Event.Type.PLAYER_INTERACT,playerListener,Priority.Normal,this);
  pm.registerEvent(Event.Type.BLOCK_BREAK,blockListener,Priority.Normal,this);
  pm.registerEvent(Event.Type.BLOCK_PLACE,blockListener,Priority.Normal,this);
}

Fixed version (ground truth):
@Override public void onEnable(){
  getDataFolder().mkdirs();
  loadConfiguration();
  playerListener=new WPPlayerListener(this);
  blockListener=new WPBlockListener(this);
  log.info(logPrefix + "String_Node_Str" + this.getDescription().getVersion()+ "String_Node_Str");
  if (setEconPlugin()) {
    log.info(logPrefix + bank.getEconUsed());
  }
  checkPermissions();
  PluginManager pm=getServer().getPluginManager();
  pm.registerEvent(Event.Type.SIGN_CHANGE,blockListener,Priority.Normal,this);
  pm.registerEvent(Event.Type.PLAYER_INTERACT,playerListener,Priority.Normal,this);
  pm.registerEvent(Event.Type.BLOCK_BREAK,blockListener,Priority.Normal,this);
  pm.registerEvent(Event.Type.BLOCK_PLACE,blockListener,Priority.Normal,this);
}
Program: 96590
Project: 96590
Buggy source:
public boolean hasPermission(Player p,String permission){
  if (!usePermissions) {
    return true;
  }
  if (!WolfPound.Permissions.has(p,permission)) {
    p.sendMessage("String_Node_Str" + permission + "String_Node_Str");
    return false;
  }
  return true;
}

Fixed version (ground truth):
public boolean hasPermission(Player p,String permission){
  if (!usePermissions || p.isOp()) {
    return true;
  }
  if (!WolfPound.Permissions.has(p,permission)) {
    p.sendMessage("String_Node_Str" + permission + "String_Node_Str");
    return false;
  }
  return true;
}
Program: 96592
Project: 96592
Buggy source:
public Crontab parseLine(RawCrontabLine line){
  Crontab crontab=new Crontab();
  String lineString=line.toString();
  if (lineString.equals("String_Node_Str") || lineString.startsWith("String_Node_Str")) {
    return null;
  }
  crontab.rawLine=new RawCrontabLine(lineString);
  try {
    String[] elements=lineString.split("String_Node_Str");
    if (elements[0].matches("String_Node_Str")) {
      return getIntervalInvocationCrontab(crontab,elements);
    }
 else {
      return getBasicCrontab(crontab,elements);
    }
  }
 catch (  ArrayIndexOutOfBoundsException e) {
    taskunLog.error("String_Node_Str");
    throw new IllegalArgumentException("String_Node_Str");
  }
}

Fixed version (ground truth):
public Crontab parseLine(RawCrontabLine line){
  Crontab crontab=new Crontab();
  String lineString=line.toString();
  if (lineString.equals("String_Node_Str") || lineString.startsWith("String_Node_Str")) {
    return crontab;
  }
  crontab.rawLine=new RawCrontabLine(lineString);
  try {
    String[] elements=lineString.split("String_Node_Str");
    if (elements[0].matches("String_Node_Str")) {
      return getIntervalInvocationCrontab(crontab,elements);
    }
 else {
      return getBasicCrontab(crontab,elements);
    }
  }
 catch (  ArrayIndexOutOfBoundsException e) {
    taskunLog.error("String_Node_Str");
    throw new IllegalArgumentException("String_Node_Str");
  }
}
Program: 96593
Project: 96593
Buggy source:
public void add(Crontab crontab){
  RawCrontabLine line=crontab.rawLine;
  if (!line.toString().startsWith("String_Node_Str") && !line.toString().equals("String_Node_Str") && !isAlreadyRegistered(crontab)) {
    crontabLines.add(crontab);
  }
}

Fixed version (ground truth):
public void add(Crontab crontab){
  if (crontab != null) {
    RawCrontabLine line=crontab.rawLine;
    if (line != null && !line.toString().startsWith("String_Node_Str") && !line.toString().equals("String_Node_Str") && !isAlreadyRegistered(crontab)) {
      crontabLines.add(crontab);
    }
  }
}
Program: 96594
Project: 96594
Buggy source:
@Override public void init() throws ServletException {
  super.init();
  prepareToInit();
  if (injector == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  schedulerConfig=injector.getSchedulerConfig();
  StringBuilder sb=new StringBuilder();
  if (schedulerConfig.enableInvokingScheduler) {
    scheduler=injector.getScheduler();
    scheduler.initialize(injector);
    scheduler.start();
    sb.append("String_Node_Str");
    if (schedulerConfig.namedServers != null) {
      sb.append("String_Node_Str");
      for (      String key : schedulerConfig.namedServers.keySet()) {
        sb.append(key);
        sb.append("String_Node_Str");
        sb.append(schedulerConfig.namedServers.get(key));
        sb.append("String_Node_Str");
      }
      sb.append("String_Node_Str");
    }
  }
 else {
    sb.append("String_Node_Str");
  }
  log.logp(Level.INFO,this.getClass().getCanonicalName(),"String_Node_Str",sb.toString());
}

Fixed version (ground truth):
@Override public void init() throws ServletException {
  super.init();
  prepareToInit();
  if (injector == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  schedulerConfig=injector.getSchedulerConfig();
  StringBuilder sb=new StringBuilder();
  if (schedulerConfig.enableInvokingScheduler) {
    scheduler=injector.getScheduler();
    scheduler.initialize(injector);
    scheduler.start();
    sb.append("String_Node_Str");
    if (schedulerConfig.namedServers != null) {
      sb.append("String_Node_Str");
      for (      String key : schedulerConfig.namedServers.keySet()) {
        sb.append(key);
        sb.append("String_Node_Str");
        sb.append(schedulerConfig.namedServers.get(key));
        sb.append("String_Node_Str");
      }
      sb.append("String_Node_Str");
    }
  }
 else {
    sb.append("String_Node_Str");
  }
  log.info(sb.toString());
}
Program: 96595
Project: 96595
Buggy source:
@Override protected void prepareToInit(){
  ServletInjector injector=new ServletInjector(){
    @Override public SchedulerConfig getSchedulerConfig(){
      Properties props=new Properties();
      try {
        props.load(DefaultSchedulerServlet.class.getClassLoader().getResourceAsStream("String_Node_Str"));
      }
 catch (      IOException e) {
        throw new IllegalStateException("String_Node_Str");
      }
      SchedulerConfig config=new SchedulerConfig();
      config.enableInvokingScheduler=Boolean.valueOf((String)props.get("String_Node_Str"));
      config.enableLoggingForEachCrondInvocation=Boolean.valueOf((String)props.get("String_Node_Str"));
      for (int i=0; i < 10; i++) {
        String namedServerN=(String)props.get("String_Node_Str" + i);
        if (!StringUtil.isEmpty(namedServerN))         config.namedServers.put("String_Node_Str" + i,namedServerN);
      }
      return config;
    }
    @Override public Scheduler getScheduler(){
      return new TaskunScheduler();
    }
    @Override @SuppressWarnings("String_Node_Str") public <T>T inject(    Class<?> clazz){
      try {
        return (T)clazz.newInstance();
      }
 catch (      Exception e) {
        throw new RuntimeException(e);
      }
    }
  }
;
  super.setInjector(injector);
}

Fixed version (ground truth):
@Override protected void prepareToInit(){
  ServletInjector injector=new ServletInjector(){
    @Override public SchedulerConfig getSchedulerConfig(){
      Properties props=new Properties();
      try {
        ClassLoader classLoader=DefaultSchedulerServlet.class.getClassLoader();
        props.load(classLoader.getResourceAsStream("String_Node_Str"));
      }
 catch (      IOException e) {
        throw new IllegalStateException("String_Node_Str");
      }
      SchedulerConfig config=new SchedulerConfig();
      config.enableInvokingScheduler=Boolean.valueOf((String)props.get("String_Node_Str"));
      config.enableLoggingForEachCrondInvocation=Boolean.valueOf((String)props.get("String_Node_Str"));
      for (int i=0; i < 10; i++) {
        String namedServerN=(String)props.get("String_Node_Str" + i);
        if (!StringUtil.isEmpty(namedServerN))         config.namedServers.put("String_Node_Str" + i,namedServerN);
      }
      return config;
    }
    @Override public Scheduler getScheduler(){
      return new TaskunScheduler();
    }
    @Override @SuppressWarnings("String_Node_Str") public <T>T inject(    Class<?> clazz){
      try {
        return (T)clazz.newInstance();
      }
 catch (      Exception e) {
        throw new RuntimeException(e);
      }
    }
  }
;
  super.setInjector(injector);
}
Program: 96596
Project: 96596
Buggy source:
@Override public SchedulerConfig getSchedulerConfig(){
  Properties props=new Properties();
  try {
    props.load(DefaultSchedulerServlet.class.getClassLoader().getResourceAsStream("String_Node_Str"));
  }
 catch (  IOException e) {
    throw new IllegalStateException("String_Node_Str");
  }
  SchedulerConfig config=new SchedulerConfig();
  config.enableInvokingScheduler=Boolean.valueOf((String)props.get("String_Node_Str"));
  config.enableLoggingForEachCrondInvocation=Boolean.valueOf((String)props.get("String_Node_Str"));
  for (int i=0; i < 10; i++) {
    String namedServerN=(String)props.get("String_Node_Str" + i);
    if (!StringUtil.isEmpty(namedServerN))     config.namedServers.put("String_Node_Str" + i,namedServerN);
  }
  return config;
}

Fixed version (ground truth):
@Override public SchedulerConfig getSchedulerConfig(){
  Properties props=new Properties();
  try {
    ClassLoader classLoader=DefaultSchedulerServlet.class.getClassLoader();
    props.load(classLoader.getResourceAsStream("String_Node_Str"));
  }
 catch (  IOException e) {
    throw new IllegalStateException("String_Node_Str");
  }
  SchedulerConfig config=new SchedulerConfig();
  config.enableInvokingScheduler=Boolean.valueOf((String)props.get("String_Node_Str"));
  config.enableLoggingForEachCrondInvocation=Boolean.valueOf((String)props.get("String_Node_Str"));
  for (int i=0; i < 10; i++) {
    String namedServerN=(String)props.get("String_Node_Str" + i);
    if (!StringUtil.isEmpty(namedServerN))     config.namedServers.put("String_Node_Str" + i,namedServerN);
  }
  return config;
}
Program: 96597
Project: 96597
Buggy source:
Log getLog(String name){
  try {
    return logImplClass.getConstructor(StringUtil.class).newInstance();
  }
 catch (  Throwable t) {
    return new UtilLoggerImpl(name);
  }
}

Fixed version (ground truth):
Log getLog(String name){
  try {
    return logImplClass.getConstructor(String.class).newInstance(name);
  }
 catch (  Throwable t) {
    return new UtilLoggerImpl(name);
  }
}
Program: 96598
Project: 96598
Buggy source:
Log getLog(String name){
  try {
    return logImplClass.getConstructor(StringUtil.class).newInstance();
  }
 catch (  Throwable t) {
    return new UtilLoggerImpl(name);
  }
}

Fixed version (ground truth):
Log getLog(String name){
  try {
    return logImplClass.getConstructor(String.class).newInstance(name);
  }
 catch (  Throwable t) {
    return new UtilLoggerImpl(name);
  }
}
Program: 96599
Project: 96599
Buggy source:
public HudsonFixture(String url,String version,Type type,String info){
  super(HudsonCorePlugin.CONNECTOR_KIND,url);
  this.version=version;
  this.type=type;
  setInfo(type.toString(),version,info);
  setUseShortUsernames("String_Node_Str".compareTo(version) < 0);
  setUseCertificateAuthentication(info.contains("String_Node_Str"));
}

Fixed version (ground truth):
public HudsonFixture(String url,String version,Type type,String info){
  super(HudsonCorePlugin.CONNECTOR_KIND,url);
  this.version=version;
  this.type=type;
  setInfo(type.toString(),version,info);
  setUseCertificateAuthentication(info.contains("String_Node_Str"));
}
Program: 96600
Project: 96600
Buggy source:
public boolean canAuthenticate(){
  return this != HUDSON_2_1_SECURE && this != HUDSON_3_0;
}

Fixed version (ground truth):
public boolean canAuthenticate(){
  return this != HUDSON_3_0;
}
Program: 96601
Project: 96601
Buggy source:
public static Test suite(boolean defaultOnly){
  ManagedTestSuite suite=new ManagedTestSuite(AllBuildsTests.class.getName());
  suite.addTestSuite(BuildModelManagerTest.class);
  suite.addTestSuite(JUnitResultGeneratorTest.class);
  suite.addTestSuite(RefreshOperationTest.class);
  suite.addTestSuite(BuildsUrlHandlerTest.class);
  return suite;
}

Fixed version (ground truth):
public static Test suite(boolean defaultOnly){
  TestSuite suite=new TestSuite(AllBuildsTests.class.getName());
  suite.addTestSuite(BuildModelManagerTest.class);
  suite.addTestSuite(JUnitResultGeneratorTest.class);
  suite.addTestSuite(RefreshOperationTest.class);
  suite.addTestSuite(BuildsUrlHandlerTest.class);
  return suite;
}
Program: 96602
Project: 96602
Buggy source:
@Override protected void authenticate(IOperationMonitor monitor) throws IOException {
  UserCredentials credentials=getClient().getLocation().getCredentials(AuthenticationType.REPOSITORY);
  if (credentials == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  HttpPost request=createPostRequest(getClient().getLocation().getUrl() + "String_Node_Str");
  HudsonLoginForm form=new HudsonLoginForm();
  form.j_username=credentials.getUserName();
  form.j_password=credentials.getPassword();
  form.from="String_Node_Str";
  request.setEntity(form.createEntity());
  HttpResponse response=getClient().execute(request,monitor);
  try {
    validate(response,monitor);
    int statusCode=response.getStatusLine().getStatusCode();
    if (statusCode != HttpStatus.SC_MOVED_TEMPORARILY) {
      getClient().setAuthenticated(false);
      throw new IOException(NLS.bind("String_Node_Str",HttpUtil.getStatusText(statusCode)));
    }
    Header header=response.getFirstHeader("String_Node_Str");
    if (header != null && header.getValue().endsWith("String_Node_Str")) {
      getClient().setAuthenticated(false);
      throw new AuthenticationException("String_Node_Str",new AuthenticationRequest<AuthenticationType<UserCredentials>>(getClient().getLocation(),AuthenticationType.REPOSITORY));
    }
    getClient().setAuthenticated(hasValidatAuthenticationState());
  }
  finally {
    HttpUtil.release(request,response,monitor);
  }
  updateCrumb(monitor);
}

Fixed version (ground truth):
@Override protected void authenticate(IOperationMonitor monitor) throws IOException {
  UserCredentials credentials=getClient().getLocation().getCredentials(AuthenticationType.REPOSITORY);
  if (credentials == null) {
    throw new IllegalStateException("String_Node_Str");
  }
  HttpPost request=createPostRequest(getClient().getLocation().getUrl() + "String_Node_Str");
  HttpResponse response=executeAuthenticationRequest(monitor,credentials,request);
  try {
    if (response.getStatusLine().getStatusCode() == HttpStatus.SC_NOT_FOUND) {
      HttpUtil.release(request,response,monitor);
      request=createPostRequest(getClient().getLocation().getUrl() + "String_Node_Str");
      response=executeAuthenticationRequest(monitor,credentials,request);
    }
    validate(response,monitor);
    int statusCode=response.getStatusLine().getStatusCode();
    if (statusCode != HttpStatus.SC_MOVED_TEMPORARILY) {
      getClient().setAuthenticated(false);
      throw new IOException(NLS.bind("String_Node_Str",HttpUtil.getStatusText(statusCode)));
    }
    Header header=response.getFirstHeader("String_Node_Str");
    if (header != null && header.getValue().endsWith("String_Node_Str")) {
      getClient().setAuthenticated(false);
      throw new AuthenticationException("String_Node_Str",new AuthenticationRequest<AuthenticationType<UserCredentials>>(getClient().getLocation(),AuthenticationType.REPOSITORY));
    }
    getClient().setAuthenticated(hasValidatAuthenticationState());
  }
  finally {
    HttpUtil.release(request,response,monitor);
  }
  updateCrumb(monitor);
}
Program: 96603
Project: 96603
Buggy source:
public boolean canAuthenticate(){
  return this != HUDSON_3_0;
}

Fixed version (ground truth):
public boolean canAuthenticate(){
  return true;
}
Program: 96605
Project: 96605
Buggy source:
@Override public void expansionStateChanged(ExpansionEvent e){
  parent.layout(true);
}

Fixed version (ground truth):
@Override public void expansionStateChanged(ExpansionEvent e){
  if (section.getLayoutData() instanceof GridData) {
    ((GridData)section.getLayoutData()).grabExcessVerticalSpace=e.getState();
  }
  parent.layout(true);
}
Program: 96606
Project: 96606
Buggy source:
private static void addTests(boolean defaultOnly,TestSuite suite){
  suite.addTestSuite(HudsonConnectorTest.class);
  suite.addTestSuite(HudsonServerBehaviourTest.class);
  suite.addTestSuite(HudsonValidationTest.class);
  for (  HudsonFixture fixture : HudsonFixture.ALL) {
    fixture.createSuite(suite);
    fixture.add(HudsonClientTest.class);
    fixture.add(HudsonIntegrationTest.class);
    fixture.done();
  }
  for (  HudsonFixture fixture : HudsonFixture.MISC) {
    fixture.createSuite(suite);
    fixture.add(HudsonClientTest.class);
    fixture.done();
  }
}

Fixed version (ground truth):
private static void addTests(boolean defaultOnly,TestSuite suite){
  suite.addTestSuite(HudsonConnectorTest.class);
  suite.addTestSuite(HudsonServerBehaviourTest.class);
  suite.addTestSuite(HudsonValidationTest.class);
  for (  HudsonFixture fixture : HudsonFixture.ALL) {
    fixture.createSuite(suite);
    fixture.add(HudsonClientTest.class);
    fixture.add(HudsonIntegrationTest.class);
    fixture.done();
  }
  for (  HudsonFixture fixture : HudsonFixture.MISC) {
    if (fixture == HudsonFixture.HUDSON_2_1_SECURE && CommonTestUtil.isCertificateAuthBroken()) {
      return;
    }
    fixture.createSuite(suite);
    fixture.add(HudsonClientTest.class);
    fixture.done();
  }
}
Program: 96607
Project: 96607
Buggy source:
public void testGetJobs() throws Exception {
  RestfulHudsonClient client=harness.connect();
  List<HudsonModelJob> jobs=client.getJobs(null,null);
  HudsonTestUtil.assertContains(jobs,harness.getPlanFailing());
  HudsonTestUtil.assertContains(jobs,harness.getPlanSucceeding());
  HudsonTestUtil.assertHealthReport(jobs);
}

Fixed version (ground truth):
public void testGetJobs() throws Exception {
  RestfulHudsonClient client=harness.connect(PrivilegeLevel.ANONYMOUS);
  List<HudsonModelJob> jobs=client.getJobs(null,null);
  HudsonTestUtil.assertContains(jobs,harness.getPlanFailing());
  HudsonTestUtil.assertContains(jobs,harness.getPlanSucceeding());
  HudsonTestUtil.assertHealthReport(jobs);
}
Program: 96608
Project: 96608
Buggy source:
public void testValidateValidUrl() throws Exception {
  RestfulHudsonClient client=harness.getFixture().connect();
  HudsonServerInfo info=client.validate(null);
  assertEquals(harness.getFixture().getType(),info.getType());
  assertEquals(harness.getFixture().getVersion(),info.getVersion());
}

Fixed version (ground truth):
public void testValidateValidUrl() throws Exception {
  RestfulHudsonClient client=harness.connect(PrivilegeLevel.ANONYMOUS);
  HudsonServerInfo info=client.validate(null);
  assertEquals(harness.getFixture().getType(),info.getType());
  assertEquals(harness.getFixture().getVersion(),info.getVersion());
}
Program: 96609
Project: 96609
Buggy source:
public void testGetJobsWithWhitespaces() throws Exception {
  RestfulHudsonClient client=harness.connect();
  List<HudsonModelJob> jobs=client.getJobs(Collections.singletonList(harness.getPlanWhitespace()),null);
  assertEquals(1,jobs.size());
  HudsonModelJob job=jobs.get(0);
  assertEquals(HudsonModelBallColor.BLUE,job.getColor());
  HudsonModelBuild build=client.getBuild(job,job.getLastBuild(),null);
  assertNotNull(build);
}

Fixed version (ground truth):
public void testGetJobsWithWhitespaces() throws Exception {
  RestfulHudsonClient client=harness.connect(PrivilegeLevel.ANONYMOUS);
  List<HudsonModelJob> jobs=client.getJobs(Collections.singletonList(harness.getPlanWhitespace()),null);
  assertEquals(1,jobs.size());
  HudsonModelJob job=jobs.get(0);
  assertEquals(HudsonModelBallColor.BLUE,job.getColor());
  HudsonModelBuild build=client.getBuild(job,job.getLastBuild(),null);
  assertNotNull(build);
}
Program: 96610
Project: 96610
Buggy source:
public void testGetJobDisabled() throws Exception {
  RestfulHudsonClient client=harness.connect();
  List<HudsonModelJob> jobs=client.getJobs(Collections.singletonList(harness.getPlanDisabled()),null);
  assertEquals(1,jobs.size());
  HudsonModelJob job=jobs.get(0);
  assertEquals(HudsonModelBallColor.DISABLED,job.getColor());
  try {
    HudsonModelBuild build=client.getBuild(job,BuildId.LAST.getBuild(),null);
    fail("String_Node_Str" + harness.getPlanDisabled() + "String_Node_Str"+ build);
  }
 catch (  HudsonResourceNotFoundException e) {
  }
}

Fixed version (ground truth):
public void testGetJobDisabled() throws Exception {
  RestfulHudsonClient client=harness.connect(PrivilegeLevel.ANONYMOUS);
  List<HudsonModelJob> jobs=client.getJobs(Collections.singletonList(harness.getPlanDisabled()),null);
  assertEquals(1,jobs.size());
  HudsonModelJob job=jobs.get(0);
  assertEquals(HudsonModelBallColor.DISABLED,job.getColor());
  try {
    HudsonModelBuild build=client.getBuild(job,BuildId.LAST.getBuild(),null);
    fail("String_Node_Str" + harness.getPlanDisabled() + "String_Node_Str"+ build);
  }
 catch (  HudsonResourceNotFoundException e) {
  }
}
Program: 96611
Project: 96611
Buggy source:
public HudsonFixture(String url,String version,Type type,String info){
  super(HudsonCorePlugin.CONNECTOR_KIND,url);
  this.version=version;
  this.type=type;
  setInfo(type.toString(),version,info);
  setUseShortUsernames("String_Node_Str".compareTo(version) < 0);
}

Fixed version (ground truth):
public HudsonFixture(String url,String version,Type type,String info){
  super(HudsonCorePlugin.CONNECTOR_KIND,url);
  this.version=version;
  this.type=type;
  setInfo(type.toString(),version,info);
  setUseShortUsernames("String_Node_Str".compareTo(version) < 0);
  setUseCertificateAuthentication(info.contains("String_Node_Str"));
}
Program: 96612
Project: 96612
Buggy source:
public boolean canAuthenticate(){
  return this != HUDSON_2_1_SECURE;
}

Fixed version (ground truth):
public boolean canAuthenticate(){
  return this != HUDSON_2_1_SECURE && this != HUDSON_3_0;
}
Program: 96613
Project: 96613
Buggy source:
@Override protected HudsonFixture getDefault(){
  return HUDSON_2_1;
}

Fixed version (ground truth):
@Override protected HudsonFixture getDefault(){
  return DEFAULT;
}
Program: 96615
Project: 96615
Buggy source:
/** 
 * Determines whether or not the detected server is a new server or not.
 * @param uri the server URI
 * @param id the server identifier
 * @return <code>true</code> if the detected server is new.
 */
private boolean isNew(URI uri,String id){
  List<IBuildServer> servers=BuildsUi.getModel().getServers();
  for (  IBuildServer server : servers) {
    try {
      if (server.getUrl().equalsIgnoreCase(uri.toURL().toExternalForm())) {
        return false;
      }
      if (server.getLocation().getId().equals(id)) {
        return false;
      }
    }
 catch (    MalformedURLException e) {
      StatusHandler.log(new Status(IStatus.ERROR,HudsonConnectorUi.ID_PLUGIN,Messages.HudsonDiscovery_CannotConvertURI,e));
    }
  }
  return true;
}

Fixed version (ground truth):
/** 
 * Determines whether or not the detected server is a new server or not.
 * @param uri the server URI
 * @param id the server identifier
 * @return <code>true</code> if the detected server is new.
 */
private boolean isNew(URI uri,String id){
  List<IBuildServer> servers=BuildsUi.getModel().getServers();
  for (  IBuildServer server : servers) {
    try {
      if (server.getUrl().equalsIgnoreCase(uri.toURL().toExternalForm())) {
        return false;
      }
      if (server.getLocation().getId().equals(id)) {
        return false;
      }
    }
 catch (    MalformedURLException e) {
      StatusHandler.log(new Status(IStatus.ERROR,HudsonConnectorUi.ID_PLUGIN,Messages.Discovery_CannotConvertURI,e));
    }
  }
  return true;
}
Program: 96616
Project: 96616
Buggy source:
public void serviceDiscovered(IServiceEvent anEvent){
  IServiceInfo serviceInfo=anEvent.getServiceInfo();
  IServiceID serviceId=serviceInfo.getServiceID();
  IServiceTypeID serviceTypeId=serviceId.getServiceTypeID();
  if (serviceTypeId.getName().equals(HUDSON_MDNS_ID)) {
    IServiceProperties properties=serviceInfo.getServiceProperties();
    try {
      if (properties.getProperty(HUDSON_URL_PROPERTY_ID) == null) {
        notifyMessage(Messages.HudsonDiscovery_MessageTitle,NLS.bind(Messages.HudsonDiscovery_MissingURL,new Object[]{serviceInfo.getLocation().getHost()}));
      }
 else {
        String id=(String)properties.getProperty(JENKINS_SERVER_PROPERTY_ID);
        if (id == null) {
          id=UUID.randomUUID().toString();
        }
        URI uri=new URI(properties.getProperty(HUDSON_URL_PROPERTY_ID).toString());
        if (isNew(uri,id)) {
          notifyMessage(Messages.HudsonDiscovery_MessageTitle,NLS.bind(Messages.HudsonDiscovery_MessageText,new Object[]{uri,Messages.HudsonDiscovery_ServerName,uri.toString(),id}));
        }
      }
    }
 catch (    URISyntaxException e) {
      StatusHandler.log(new Status(IStatus.ERROR,HudsonConnectorUi.ID_PLUGIN,NLS.bind(Messages.HudsonDiscovery_IncorrectURI,new Object[]{properties.getProperty(HUDSON_URL_PROPERTY_ID).toString()}),e));
    }
  }
}

Fixed version (ground truth):
public void serviceDiscovered(IServiceEvent anEvent){
  IServiceInfo serviceInfo=anEvent.getServiceInfo();
  IServiceID serviceId=serviceInfo.getServiceID();
  IServiceTypeID serviceTypeId=serviceId.getServiceTypeID();
  if (serviceTypeId.getName().equals(JENKINS_MDNS_ID)) {
    IServiceProperties properties=serviceInfo.getServiceProperties();
    try {
      if (properties.getProperty(URL_PROPERTY) == null) {
        notifyMessage(Messages.JenkinsDiscovery_MessageTitle,NLS.bind(Messages.JenkinsDiscovery_MissingURL,new Object[]{serviceInfo.getLocation().getHost()}));
      }
 else {
        issueJenkinsNotification(properties);
      }
    }
 catch (    URISyntaxException e) {
      StatusHandler.log(new Status(IStatus.ERROR,HudsonConnectorUi.ID_PLUGIN,NLS.bind(Messages.Discovery_IncorrectURI,new Object[]{properties.getProperty(URL_PROPERTY).toString()}),e));
    }
  }
  if (serviceTypeId.getName().equals(HUDSON_MDNS_ID)) {
    IServiceProperties properties=serviceInfo.getServiceProperties();
    try {
      if (properties.getProperty(URL_PROPERTY) == null) {
        notifyMessage(Messages.HudsonDiscovery_MessageTitle,NLS.bind(Messages.HudsonDiscovery_MissingURL,new Object[]{serviceInfo.getLocation().getHost()}));
      }
 else {
        issueHudsonNotification(properties);
      }
    }
 catch (    URISyntaxException e) {
      StatusHandler.log(new Status(IStatus.ERROR,HudsonConnectorUi.ID_PLUGIN,NLS.bind(Messages.Discovery_IncorrectURI,new Object[]{properties.getProperty(URL_PROPERTY).toString()}),e));
    }
  }
}
Program: 96617
Project: 96617
Buggy source:
@Override protected void initPage(BuildServerWizardPage page){
  page.setTitle(Messages.NewHudsonServerWizard_Title);
  page.setMessage(Messages.NewHudsonServerWizard_Message);
}

Fixed version (ground truth):
@Override protected void initPage(BuildServerWizardPage page){
  page.setTitle(Messages.NewServerWizard_Title);
  page.setMessage(Messages.NewServerWizard_Message);
}
Program: 96618
Project: 96618
Buggy source:
public HudsonServerInfo(String version){
  this.version=version;
}

Fixed version (ground truth):
public HudsonServerInfo(Type type,String version){
  this.type=type;
  this.version=version;
}
Program: 96619
Project: 96619
Buggy source:
@Override public HudsonServerInfo execute() throws IOException, HudsonException {
  CommonHttpMethod method=createHeadMethod(client.getLocation().getUrl());
  try {
    execute(method,monitor);
    checkResponse(method);
    Header header=method.getResponseHeader("String_Node_Str");
    if (header == null) {
      throw new HudsonException(NLS.bind("String_Node_Str",client.getLocation().getUrl()));
    }
    HudsonServerInfo info=new HudsonServerInfo(header.getValue());
    return info;
  }
  finally {
    method.releaseConnection(monitor);
  }
}

Fixed version (ground truth):
@Override public HudsonServerInfo execute() throws IOException, HudsonException {
  CommonHttpMethod method=createHeadMethod(client.getLocation().getUrl());
  try {
    execute(method,monitor);
    checkResponse(method);
    Header header=method.getResponseHeader("String_Node_Str");
    Type type;
    if (header == null) {
      type=Type.HUDSON;
      header=method.getResponseHeader("String_Node_Str");
      if (header == null) {
        throw new HudsonException(NLS.bind("String_Node_Str",client.getLocation().getUrl()));
      }
    }
 else {
      type=Type.JENKINS;
    }
    HudsonServerInfo info=new HudsonServerInfo(type,header.getValue());
    return info;
  }
  finally {
    method.releaseConnection(monitor);
  }
}
Program: 96620
Project: 96620
Buggy source:
public HudsonServerInfo validate(final IOperationMonitor monitor) throws HudsonException {
  return new HudsonOperation<HudsonServerInfo>(client){
    @Override public HudsonServerInfo execute() throws IOException, HudsonException {
      CommonHttpMethod method=createHeadMethod(client.getLocation().getUrl());
      try {
        execute(method,monitor);
        checkResponse(method);
        Header header=method.getResponseHeader("String_Node_Str");
        if (header == null) {
          throw new HudsonException(NLS.bind("String_Node_Str",client.getLocation().getUrl()));
        }
        HudsonServerInfo info=new HudsonServerInfo(header.getValue());
        return info;
      }
  finally {
        method.releaseConnection(monitor);
      }
    }
  }
.run();
}

Fixed version (ground truth):
public HudsonServerInfo validate(final IOperationMonitor monitor) throws HudsonException {
  return new HudsonOperation<HudsonServerInfo>(client){
    @Override public HudsonServerInfo execute() throws IOException, HudsonException {
      CommonHttpMethod method=createHeadMethod(client.getLocation().getUrl());
      try {
        execute(method,monitor);
        checkResponse(method);
        Header header=method.getResponseHeader("String_Node_Str");
        Type type;
        if (header == null) {
          type=Type.HUDSON;
          header=method.getResponseHeader("String_Node_Str");
          if (header == null) {
            throw new HudsonException(NLS.bind("String_Node_Str",client.getLocation().getUrl()));
          }
        }
 else {
          type=Type.JENKINS;
        }
        HudsonServerInfo info=new HudsonServerInfo(type,header.getValue());
        return info;
      }
  finally {
        method.releaseConnection(monitor);
      }
    }
  }
.run();
}
Program: 96621
Project: 96621
Buggy source:
public void testGetJobs() throws Exception {
  client=fixture.connect();
  List<HudsonModelJob> jobs=client.getJobs(null,null);
  assertContains(jobs,PLAN_FAILING);
  assertContains(jobs,PLAN_SUCCEEDING);
  assertHealthReport(jobs);
}

Fixed version (ground truth):
public void testGetJobs() throws Exception {
  RestfulHudsonClient client=harness.connect();
  List<HudsonModelJob> jobs=client.getJobs(null,null);
  HudsonTestUtil.assertContains(jobs,harness.getPlanFailing());
  HudsonTestUtil.assertContains(jobs,harness.getPlanSucceeding());
  HudsonTestUtil.assertHealthReport(jobs);
}
Program: 96622
Project: 96622
Buggy source:
public Object call() throws Exception {
  assertEquals(HudsonModelBallColor.BLUE_ANIME,getJob(PLAN_SUCCEEDING).getColor());
  return null;
}

Fixed version (ground truth):
public Object call() throws Exception {
  assertEquals(HudsonModelBallColor.BLUE_ANIME,harness.getJob(jobName).getColor());
  return null;
}
Program: 96623
Project: 96623
Buggy source:
@Override protected void setUp() throws Exception {
  fixture=HudsonFixture.current();
}

Fixed version (ground truth):
@Override protected void setUp() throws Exception {
  harness=HudsonFixture.current().createHarness();
}
Program: 96624
Project: 96624
Buggy source:
public HudsonFixture(String url,String version,String info){
  super(HudsonCorePlugin.CONNECTOR_KIND,url);
  this.version=version;
  setInfo("String_Node_Str",version,info);
}

Fixed version (ground truth):
public HudsonFixture(String url,String version,Type type,String info){
  super(HudsonCorePlugin.CONNECTOR_KIND,url);
  this.version=version;
  this.type=type;
  setInfo(type.toString(),version,info);
}
Program: 96625
Project: 96625
Buggy source:
@Override protected HudsonFixture getDefault(){
  return DEFAULT;
}

Fixed version (ground truth):
@Override protected HudsonFixture getDefault(){
  return HUDSON_2_1;
}
Program: 96626
Project: 96626
Buggy source:
/** 
 * Packs all columns so that they are able to display all content. If there is any space left, the second column (summary) will be resized so that the entire width of the control is used.
 * @param tree the tree to resize
 */
private void doResize(final Tree tree){
  Rectangle area=tree.getClientArea();
  ScrollBar vBar=tree.getVerticalBar();
  int ac=0;
  for (  TreeColumn tc : tree.getColumns()) {
    tc.pack();
    ac+=tc.getWidth();
  }
  int width=area.width - tree.computeTrim(0,0,0,0).width + vBar.getSize().x;
  if (width > ac) {
    int nw=tree.getColumn(1).getWidth() + width - ac;
    tree.getColumn(1).setWidth(nw);
  }
}

Fixed version (ground truth):
/** 
 * Packs all columns so that they are able to display all content. If there is any space left, the second column (summary) will be resized so that the entire width of the control is used.
 * @param tree the tree to resize
 */
private void doResize(final Tree tree){
  Rectangle area=tree.getClientArea();
  ScrollBar vBar=tree.getVerticalBar();
  int ac=0;
  for (  TreeColumn tc : tree.getColumns()) {
    if (tc.getResizable()) {
      tc.pack();
      ac+=tc.getWidth();
    }
 else {
      ac+=1;
    }
  }
  int width=area.width - tree.computeTrim(0,0,0,0).width + vBar.getSize().x;
  if (width > ac) {
    if (tree.getColumn(1).getResizable()) {
      int nw=tree.getColumn(1).getWidth() + width - ac;
      tree.getColumn(1).setWidth(nw);
    }
 else {
      int nw=tree.getColumn(0).getWidth() + width - ac;
      tree.getColumn(0).setWidth(nw);
    }
  }
}
Program: 96628
Project: 96628
Buggy source:
static JUnitModel getJUnitModel(){
  if (junitModel == null) {
    Exception cause=null;
    try {
      Class<?> clazz;
      try {
        clazz=Class.forName("String_Node_Str");
      }
 catch (      ClassNotFoundException e) {
        clazz=Class.forName("String_Node_Str");
      }
      Method method=clazz.getDeclaredMethod("String_Node_Str");
      junitModel=(JUnitModel)method.invoke(null);
    }
 catch (    Exception e) {
      NoClassDefFoundError error=new NoClassDefFoundError("String_Node_Str");
      error.initCause(cause);
      throw error;
    }
  }
  return junitModel;
}

Fixed version (ground truth):
static JUnitModel getJUnitModel(){
  if (junitModel == null) {
    try {
      Class<?> clazz;
      try {
        clazz=Class.forName("String_Node_Str");
      }
 catch (      ClassNotFoundException e) {
        clazz=Class.forName("String_Node_Str");
      }
      Method method=clazz.getDeclaredMethod("String_Node_Str");
      junitModel=(JUnitModel)method.invoke(null);
    }
 catch (    Exception e) {
      NoClassDefFoundError error=new NoClassDefFoundError("String_Node_Str");
      error.initCause(e);
      throw error;
    }
  }
  return junitModel;
}
Program: 96629
Project: 96629
Buggy source:
@Override public String getText(Object element){
  if (element instanceof IBuildPlan) {
    IBuildPlan plan=(IBuildPlan)element;
    if (plan.getLastBuild() != null) {
      long timestamp=plan.getLastBuild().getTimestamp();
      if (timestamp != 0) {
        return DateUtil.getRelative(timestamp);
      }
    }
  }
  return "String_Node_Str";
}

Fixed version (ground truth):
@Override public String getText(Object element){
  if (element instanceof IBuildPlan) {
    IBuildPlan plan=(IBuildPlan)element;
    if (plan.getLastBuild() != null) {
      long timestamp=plan.getLastBuild().getTimestamp();
      if (timestamp != 0) {
        if (System.currentTimeMillis() - timestamp < 60 * 1000) {
          return "String_Node_Str";
        }
 else {
          return DateUtil.getRelative(timestamp);
        }
      }
    }
  }
  return "String_Node_Str";
}
Program: 96630
Project: 96630
Buggy source:
public void save() throws IOException {
  Map<Object,Object> options=new HashMap<Object,Object>();
  resource.save(options);
}

Fixed version (ground truth):
public void save() throws IOException {
  Map<Object,Object> options=new HashMap<Object,Object>();
  options.put(XMLResource.OPTION_ENCODING,"String_Node_Str");
  resource.save(options);
}
Program: 96631
Project: 96631
Buggy source:
protected void createPopupMenu(Composite parent){
  MenuManager menuManager=new MenuManager();
  OpenInBrowserAction openInBrowserAction=new OpenInBrowserAction();
  menuManager.add(openInBrowserAction);
  viewer.addSelectionChangedListener(openInBrowserAction);
  RunBuildAction runBuildAction=new RunBuildAction();
  menuManager.add(runBuildAction);
  viewer.addSelectionChangedListener(runBuildAction);
  menuManager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
  menuManager.add(new Separator("String_Node_Str"));
  menuManager.add(propertiesAction);
  Menu contextMenu=menuManager.createContextMenu(parent);
  viewer.getTree().setMenu(contextMenu);
  getSite().registerContextMenu(menuManager,viewer);
}

Fixed version (ground truth):
protected void createPopupMenu(Composite parent){
  MenuManager menuManager=new MenuManager();
  OpenInBrowserAction openInBrowserAction=new OpenInBrowserAction();
  menuManager.add(openInBrowserAction);
  viewer.addSelectionChangedListener(openInBrowserAction);
  openInBrowserAction.selectionChanged((IStructuredSelection)viewer.getSelection());
  RunBuildAction runBuildAction=new RunBuildAction();
  menuManager.add(runBuildAction);
  viewer.addSelectionChangedListener(runBuildAction);
  runBuildAction.selectionChanged((IStructuredSelection)viewer.getSelection());
  menuManager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
  menuManager.add(new Separator("String_Node_Str"));
  menuManager.add(propertiesAction);
  Menu contextMenu=menuManager.createContextMenu(parent);
  viewer.getTree().setMenu(contextMenu);
  getSite().registerContextMenu(menuManager,viewer);
}
Program: 96632
Project: 96632
Buggy source:
@Override public void createPartControl(Composite parent){
  createViewer(parent);
  initActions();
  createPopupMenu(parent);
  contributeToActionBars();
  IWorkbenchSiteProgressService progress=(IWorkbenchSiteProgressService)getSite().getAdapter(IWorkbenchSiteProgressService.class);
  if (progress != null) {
    progress.showBusyForFamily(BuildsConstants.JOB_FAMILY);
  }
  model=BuildsUiInternal.getModel();
  modelListener=new EContentAdapter(){
    @Override public void notifyChanged(    Notification msg){
      super.notifyChanged(msg);
      if (!viewer.getControl().isDisposed()) {
        lastRefresh=new Date();
        updateDecoration(Status.OK_STATUS);
      }
    }
  }
;
  model.eAdapters().add(modelListener);
  viewer.setInput(model);
  viewer.expandAll();
  getSite().setSelectionProvider(viewer);
  getSite().getSelectionProvider().addSelectionChangedListener(propertiesAction);
  updateDecoration(Status.OK_STATUS);
}

Fixed version (ground truth):
@Override public void createPartControl(Composite parent){
  createViewer(parent);
  initActions();
  createPopupMenu(parent);
  contributeToActionBars();
  IWorkbenchSiteProgressService progress=(IWorkbenchSiteProgressService)getSite().getAdapter(IWorkbenchSiteProgressService.class);
  if (progress != null) {
    progress.showBusyForFamily(BuildsConstants.JOB_FAMILY);
  }
  model=BuildsUiInternal.getModel();
  modelListener=new EContentAdapter(){
    @Override public void notifyChanged(    Notification msg){
      super.notifyChanged(msg);
      if (!viewer.getControl().isDisposed()) {
        lastRefresh=new Date();
        updateDecoration(Status.OK_STATUS);
      }
    }
  }
;
  model.eAdapters().add(modelListener);
  viewer.setInput(model);
  viewer.expandAll();
  getSite().setSelectionProvider(viewer);
  getSite().getSelectionProvider().addSelectionChangedListener(propertiesAction);
  propertiesAction.selectionChanged((IStructuredSelection)getSite().getSelectionProvider().getSelection());
  updateDecoration(Status.OK_STATUS);
}
Program: 96633
Project: 96633
Buggy source:
@Override public Image getImage(Object element){
  return null;
}

Fixed version (ground truth):
@Override public Image getImage(Object element){
  if (element instanceof IBuildPlan) {
    ImageDescriptor descriptor=getImageDescriptor((IBuildPlan)element);
    if (descriptor != null) {
      return CommonImages.getImage(descriptor);
    }
  }
  return null;
}
Program: 96634
Project: 96634
Buggy source:
protected void createViewer(Composite parent){
  viewer=new TreeViewer(parent,SWT.FULL_SELECTION);
  Tree tree=viewer.getTree();
  tree.setHeaderVisible(true);
  TreeViewerColumn buildViewerColumn=new TreeViewerColumn(viewer,SWT.LEFT);
  buildViewerColumn.setLabelProvider(new DecoratingStyledCellLabelProvider(new BuildLabelProvider(),PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator(),null));
  TreeColumn buildColumn=buildViewerColumn.getColumn();
  buildColumn.setText("String_Node_Str");
  buildColumn.setWidth(220);
  TreeViewerColumn summaryViewerColumn=new TreeViewerColumn(viewer,SWT.LEFT);
  summaryViewerColumn.setLabelProvider(new BuildSummaryLabelProvider());
  TreeColumn summaryColumn=summaryViewerColumn.getColumn();
  summaryColumn.setText("String_Node_Str");
  summaryColumn.setWidth(220);
  TreeViewerColumn statusViewerColumn=new TreeViewerColumn(viewer,SWT.LEFT);
  statusViewerColumn.setLabelProvider(new BuildStatusLabelProvider());
  TreeColumn statusColumn=statusViewerColumn.getColumn();
  statusColumn.setText("String_Node_Str");
  statusColumn.setWidth(50);
  contentProvider=new BuildContentProvider();
  contentProvider.setSelectedOnly(true);
  viewer.setContentProvider(contentProvider);
  viewer.addDoubleClickListener(new IDoubleClickListener(){
    public void doubleClick(    DoubleClickEvent event){
      OpenInBrowserAction action=new OpenInBrowserAction();
      action.selectionChanged((IStructuredSelection)event.getSelection());
      action.run();
    }
  }
);
}

Fixed version (ground truth):
protected void createViewer(Composite parent){
  viewer=new TreeViewer(parent,SWT.FULL_SELECTION);
  Tree tree=viewer.getTree();
  tree.setHeaderVisible(true);
  TreeViewerColumn buildViewerColumn=new TreeViewerColumn(viewer,SWT.LEFT);
  buildViewerColumn.setLabelProvider(new DecoratingStyledCellLabelProvider(new BuildLabelProvider(),PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator(),null));
  TreeColumn buildColumn=buildViewerColumn.getColumn();
  buildColumn.setText("String_Node_Str");
  buildColumn.setWidth(220);
  TreeViewerColumn summaryViewerColumn=new TreeViewerColumn(viewer,SWT.LEFT);
  summaryViewerColumn.setLabelProvider(new BuildSummaryLabelProvider());
  TreeColumn summaryColumn=summaryViewerColumn.getColumn();
  summaryColumn.setText("String_Node_Str");
  summaryColumn.setWidth(220);
  TreeViewerColumn statusViewerColumn=new TreeViewerColumn(viewer,SWT.LEFT);
  statusViewerColumn.setLabelProvider(new BuildTimeLabelProvider());
  TreeColumn statusColumn=statusViewerColumn.getColumn();
  statusColumn.setText("String_Node_Str");
  statusColumn.setWidth(50);
  contentProvider=new BuildContentProvider();
  contentProvider.setSelectedOnly(true);
  viewer.setContentProvider(contentProvider);
  viewer.addDoubleClickListener(new IDoubleClickListener(){
    public void doubleClick(    DoubleClickEvent event){
      OpenInBrowserAction action=new OpenInBrowserAction();
      action.selectionChanged((IStructuredSelection)event.getSelection());
      action.run();
    }
  }
);
}
Program: 96635
Project: 96635
Buggy source:
@Override public boolean performFinish(){
  ((BuildServer)getModel()).applyToOriginal();
  original.getLocation().apply(getModel().getLocation());
  if (isNew()) {
    BuildsUiInternal.getModel().getServers().add(original);
  }
  List<IBuildPlan> oldPlans=BuildsUiInternal.getModel().getPlans(original);
  oldPlans=BuildsUiInternal.getModel().getPlans(original);
  BuildsUiInternal.getModel().getPlans().removeAll(oldPlans);
  List<IBuildPlan> selectedPlans=((BuildServerWizardPage)getPages()[0]).getSelectedPlans();
  for (  IBuildPlan plan : selectedPlans) {
    ((BuildPlan)plan).setServer(original);
  }
  BuildsUiInternal.getModel().getPlans().addAll(selectedPlans);
  return true;
}

Fixed version (ground truth):
@Override public boolean performFinish(){
  ((BuildServer)getModel()).applyToOriginal();
  original.getLocation().apply(getModel().getLocation());
  if (isNew()) {
    BuildsUiInternal.getModel().getServers().add(original);
  }
  List<IBuildPlan> oldPlans=BuildsUiInternal.getModel().getPlans(original);
  oldPlans=BuildsUiInternal.getModel().getPlans(original);
  BuildsUiInternal.getModel().getPlans().removeAll(oldPlans);
  List<IBuildPlan> selectedPlans=((BuildServerWizardPage)getPages()[0]).getSelectedPlans();
  for (  IBuildPlan plan : selectedPlans) {
    ((BuildPlan)plan).setServer(original);
  }
  BuildsUiInternal.getModel().getPlans().addAll(selectedPlans);
  BuildsView.openInActivePerspective();
  return true;
}
Program: 96636
Project: 96636
Buggy source:
private void createButtons(Composite section){
  Button button=new Button(section,SWT.PUSH);
  button.setText("String_Node_Str");
  button.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent event){
      validateSettings();
    }
  }
);
}

Fixed version (ground truth):
private void createButtons(Composite section){
  Button refreshButton=new Button(section,SWT.PUSH);
  GridDataFactory.fillDefaults().grab(true,false).applyTo(refreshButton);
  refreshButton.setText("String_Node_Str");
  refreshButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent event){
      validateSettings();
    }
  }
);
  Button selectAllButton=new Button(section,SWT.PUSH);
  GridDataFactory.fillDefaults().grab(true,false).applyTo(selectAllButton);
  selectAllButton.setText("String_Node_Str");
  selectAllButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent event){
      List<IBuildPlan> plans=getWorkingCopy().getPlans();
      for (      IBuildPlan plan : plans) {
        ((BuildPlan)plan).setSelected(true);
      }
      planViewer.setCheckedElements(plans.toArray());
    }
  }
);
  Button deselectAllButton=new Button(section,SWT.PUSH);
  GridDataFactory.fillDefaults().grab(true,false).applyTo(deselectAllButton);
  deselectAllButton.setText("String_Node_Str");
  deselectAllButton.addSelectionListener(new SelectionAdapter(){
    @Override public void widgetSelected(    SelectionEvent event){
      List<IBuildPlan> plans=getWorkingCopy().getPlans();
      for (      IBuildPlan plan : plans) {
        ((BuildPlan)plan).setSelected(false);
      }
      planViewer.setCheckedElements(new Object[]{});
    }
  }
);
}
Program: 96637
Project: 96637
Buggy source:
@Override public BuildServerBehaviour getBehaviour(IBuildServer server) throws CoreException {
  return new HudsonServerBehaviour(server);
}

Fixed version (ground truth):
@Override public BuildServerBehaviour getBehaviour(IBuildServer server) throws CoreException {
  return new HudsonServerBehaviour(server,createLocation(server));
}
Program: 96638
Project: 96638
Buggy source:
public HudsonServerBehaviour(IBuildServer server){
  super(server);
  this.client=new RestfulHudsonClient(new WebLocation(server.getRepositoryUrl()));
}

Fixed version (ground truth):
public HudsonServerBehaviour(IBuildServer server,AbstractWebLocation location){
  super(server);
  this.client=new RestfulHudsonClient(location);
}
Program: 96639
Project: 96639
Buggy source:
public BuildConnectorDelegate(BuildConnectorDescriptor descriptor){
  this.descriptor=descriptor;
  init(descriptor.connectorKind,descriptor.label);
}

Fixed version (ground truth):
public BuildConnectorDelegate(BuildConnectorDescriptor descriptor){
  this.descriptor=descriptor;
  init(descriptor.connectorKind,descriptor.label);
  setLocationFactory(locationFactory);
}