nus-yam/ex-repair huggingface dataset:
Program: 15593
Project: 15593
Buggy source:
public void logout(){
  Subject subject=SecurityUtils.getSubject();
  if (subject.isAuthenticated()) {
    subject.logout();
  }
  getAuthorizationManager().reset();
}

Fixed version (ground truth):
public void logout(){
  Subject subject=SecurityUtils.getSubject();
  if (subject.isAuthenticated()) {
    subject.logout();
  }
  reset();
}
Program: 15594
Project: 15594
Buggy source:
public OAuthorizationCredentials login(String username,String password){
  BaseOAuth20Client<?> client=getClient();
  OAuthCredentialsRest credentials=new OAuthCredentialsRest(username,password,client.getName(),client.getKey(),client.getSecret());
  ClientToken token=new ClientToken(client.getName(),credentials);
  Subject subject=SecurityUtils.getSubject();
  logger.debug("String_Node_Str",username);
  subject.login(token);
  OAuthorizationCredentials oauthCredentials=getOAuthorizationCredentials();
  logger.debug("String_Node_Str",oauthCredentials);
  getAuthorizationManager().reset();
  return oauthCredentials;
}

Fixed version (ground truth):
public OAuthorizationCredentials login(String username,String password){
  BaseOAuth20Client<?> client=getClient();
  OAuthCredentialsRest credentials=new OAuthCredentialsRest(username,password,client.getName(),client.getKey(),client.getSecret());
  ClientToken token=new ClientToken(client.getName(),credentials);
  Subject subject=SecurityUtils.getSubject();
  logger.debug("String_Node_Str",username);
  subject.login(token);
  OAuthorizationCredentials oauthCredentials=getOAuthorizationCredentials();
  logger.debug("String_Node_Str",oauthCredentials);
  return oauthCredentials;
}
Program: 15595
Project: 15595
Buggy source:
public AccessTokenExpiredException(String message){
  super(message);
}

Fixed version (ground truth):
public AccessTokenExpiredException(String token,String message){
  super(message);
  this.token=token;
}
Program: 15596
Project: 15596
Buggy source:
protected Map<String,Set<Permission>> getAuthorizationInfo(final OAuthorizationCredentials credentials,final String targetClientId){
  Map<String,Set<Permission>> authorizationInfo=null;
  try {
    CacheKey key=new CacheKey(targetClientId,credentials);
    if (cachingEnabled)     authorizationInfo=cacheManager.get(key);
    if (authorizationInfo == null) {
      authorizationInfo=getAuthorizationInfoInternal(credentials,targetClientId);
      if (cachingEnabled)       cacheManager.put(key,authorizationInfo);
    }
  }
 catch (  AccessTokenExpiredException e) {
    accessTokenExpired=true;
    clearCache(null);
  }
  return authorizationInfo;
}

Fixed version (ground truth):
protected Map<String,Set<Permission>> getAuthorizationInfo(final OAuthorizationCredentials credentials,final String targetClientId){
  Map<String,Set<Permission>> authorizationInfo=null;
  CacheKey key=new CacheKey(targetClientId,credentials);
  if (cachingEnabled)   authorizationInfo=cacheManager.get(key);
  if (authorizationInfo == null) {
    authorizationInfo=getAuthorizationInfoInternal(credentials,targetClientId);
    if (cachingEnabled)     cacheManager.put(key,authorizationInfo);
  }
  return authorizationInfo;
}
Program: 15597
Project: 15597
Buggy source:
@Override public void clearCache(PrincipalCollection principals){
  if (cachingEnabled) {
    cacheManager.clear();
  }
}

Fixed version (ground truth):
@Override public void clearCache(PrincipalCollection principals){
  if (cachingEnabled) {
    if (principals == null) {
      logger.debug("String_Node_Str");
      cacheManager.clear();
    }
 else {
      final CasOAuthWrapperProfile profile=principals.oneByType(CasOAuthWrapperProfile.class);
      String accessToken=profile.getAccessToken();
      logger.debug("String_Node_Str",accessToken);
      clearCacheForToken(accessToken);
    }
  }
}
Program: 15599
Project: 15599
Buggy source:
void reset(){
  accessTokenExpired=false;
  clearCache(null);
}

Fixed version (ground truth):
void reset(String token){
  clearCacheForToken(token);
}
Program: 15600
Project: 15600
Buggy source:
public CacheKey(String targetClientId,OAuthorizationCredentials credentials){
  super();
  this.targetClientId=targetClientId;
  this.credentials=credentials;
}

Fixed version (ground truth):
public CacheKey(String targetClientId,OAuthorizationCredentials credentials){
  this.targetClientId=targetClientId;
  this.credentials=credentials;
}
Program: 15601
Project: 15601
Buggy source:
public SesameSPARQLClient(String url) throws RepositoryException {
  try {
    therepository.initialize();
  }
 catch (  RepositoryException e) {
    logger.error("String_Node_Str" + url + "String_Node_Str",e);
    throw e;
  }
}

Fixed version (ground truth):
public SesameSPARQLClient(String url) throws RepositoryException {
  therepository=new SPARQLRepository(url);
  try {
    therepository.initialize();
  }
 catch (  RepositoryException e) {
    logger.error("String_Node_Str" + url + "String_Node_Str",e);
    throw e;
  }
}
Program: 15602
Project: 15602
Buggy source:
public void init(ServletConfig config) throws ServletException {
  super.init(config);
  ConstantsUtil.realPath=this.getServletContext().getRealPath("String_Node_Str");
  InputStream in=ConnectionManager.class.getResourceAsStream("String_Node_Str");
  try {
    if (in == null)     prop.load(new FileInputStream(ConstantsUtil.realPath + "String_Node_Str"));
 else     prop.load(in);
  }
 catch (  FileNotFoundException e) {
    e.printStackTrace();
  }
catch (  IOException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
public void init(ServletConfig config) throws ServletException {
  super.init(config);
  ConstantsUtil.realPath=this.getServletContext().getRealPath("String_Node_Str");
  propertyManagement=new PropertyManagement();
}
Program: 15604
Project: 15604
Buggy source:
public Sensor getSpecifiedSensorWithLatLng(double lat,double lng){
  Sensor sensor=null;
  Connection conn=null;
  String sql="String_Node_Str" + "String_Node_Str" + metaGraph + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ lat+ "String_Node_Str"+ "String_Node_Str"+ lng+ "String_Node_Str"+ "String_Node_Str";
  try {
    conn=ConnectionManager.getConnectionPool().getConnection();
    PlaceManager placeManager=new PlaceManager(metaGraph,dataGraph);
    Statement st=conn.createStatement();
    if (st.execute(sql)) {
      ResultSet rs=st.getResultSet();
      while (rs.next()) {
        sensor=new Sensor();
        sensor.setId(rs.getString("String_Node_Str"));
        sensor.setSource(rs.getString("String_Node_Str"));
        sensor.setSensorType(rs.getString("String_Node_Str"));
        sensor.setSourceType(rs.getString("String_Node_Str"));
        Place place=placeManager.getPlaceWithPlaceId(rs.getString("String_Node_Str"));
        sensor.setPlace(place);
      }
      ConnectionManager.attemptClose(rs);
    }
    ConnectionManager.attemptClose(st);
    ConnectionManager.attemptClose(conn);
  }
 catch (  Exception e) {
    e.printStackTrace();
    ConnectionManager.attemptClose(conn);
  }
  return sensor;
}

Fixed version (ground truth):
public Sensor getSpecifiedSensorWithLatLng(double lat,double lng){
  Sensor sensor=null;
  Connection conn=null;
  String sql="String_Node_Str" + "String_Node_Str" + metaGraph + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ lat+ "String_Node_Str"+ "String_Node_Str"+ lng+ "String_Node_Str"+ "String_Node_Str";
  try {
    conn=ConnectionManager.getConnectionPool().getConnection();
    PlaceManager placeManager=new PlaceManager(metaGraph,dataGraph);
    Statement st=conn.createStatement();
    if (st.execute(sql)) {
      ResultSet rs=st.getResultSet();
      while (rs.next()) {
        sensor=new Sensor();
        sensor.setId(rs.getString("String_Node_Str"));
        sensor.setSource(rs.getString("String_Node_Str"));
        sensor.setSensorType(rs.getString("String_Node_Str"));
        sensor.setSourceType(rs.getString("String_Node_Str"));
        Place place=placeManager.getPlaceWithPlaceId(rs.getString("String_Node_Str"));
        sensor.setPlace(place);
        sensor.setProperties(getObservesListOfSensor(rs.getString("String_Node_Str")));
      }
      ConnectionManager.attemptClose(rs);
    }
    ConnectionManager.attemptClose(st);
    ConnectionManager.attemptClose(conn);
  }
 catch (  Exception e) {
    e.printStackTrace();
    ConnectionManager.attemptClose(conn);
  }
  return sensor;
}
Program: 15605
Project: 15605
Buggy source:
@SuppressWarnings("String_Node_Str") public Sensor getSpecifiedSensorWithPlaceId(String placeId){
  Sensor sensor=null;
  Connection conn=null;
  PlaceManager placeManager=new PlaceManager(metaGraph,dataGraph);
  String sql="String_Node_Str" + "String_Node_Str" + metaGraph + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ placeId+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  try {
    conn=ConnectionManager.getConnectionPool().getConnection();
    Statement st=conn.createStatement();
    if (st.execute(sql)) {
      ResultSet rs=st.getResultSet();
      while (rs.next()) {
        sensor=new Sensor();
        sensor.setId(rs.getString("String_Node_Str"));
        sensor.setSource(rs.getString("String_Node_Str"));
        sensor.setSensorType(rs.getString("String_Node_Str"));
        sensor.setSourceType(rs.getString("String_Node_Str"));
        Place place=placeManager.getPlaceWithPlaceId(placeId);
        sensor.setPlace(place);
      }
      ConnectionManager.attemptClose(rs);
    }
    ConnectionManager.attemptClose(st);
    ConnectionManager.attemptClose(conn);
  }
 catch (  Exception e) {
    e.printStackTrace();
    ConnectionManager.attemptClose(conn);
  }
  return sensor;
}

Fixed version (ground truth):
@SuppressWarnings("String_Node_Str") public Sensor getSpecifiedSensorWithPlaceId(String placeId){
  Sensor sensor=null;
  Connection conn=null;
  PlaceManager placeManager=new PlaceManager(metaGraph,dataGraph);
  String sql="String_Node_Str" + "String_Node_Str" + metaGraph + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ placeId+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  try {
    conn=ConnectionManager.getConnectionPool().getConnection();
    Statement st=conn.createStatement();
    if (st.execute(sql)) {
      ResultSet rs=st.getResultSet();
      while (rs.next()) {
        sensor=new Sensor();
        sensor.setId(rs.getString("String_Node_Str"));
        sensor.setSource(rs.getString("String_Node_Str"));
        sensor.setSensorType(rs.getString("String_Node_Str"));
        sensor.setSourceType(rs.getString("String_Node_Str"));
        Place place=placeManager.getPlaceWithPlaceId(placeId);
        sensor.setPlace(place);
        sensor.setProperties(getObservesListOfSensor(rs.getString("String_Node_Str")));
      }
      ConnectionManager.attemptClose(rs);
    }
    ConnectionManager.attemptClose(st);
    ConnectionManager.attemptClose(conn);
  }
 catch (  Exception e) {
    e.printStackTrace();
    ConnectionManager.attemptClose(conn);
  }
  return sensor;
}
Program: 15606
Project: 15606
Buggy source:
public Sensor getSpecifiedSensorWithSource(String source){
  PlaceManager placeManager=new PlaceManager(metaGraph,dataGraph);
  Connection conn=null;
  Sensor sensor=null;
  String sql="String_Node_Str" + "String_Node_Str" + metaGraph + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ source+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  try {
    conn=ConnectionManager.getConnectionPool().getConnection();
    Statement st=conn.createStatement();
    if (st.execute(sql)) {
      ResultSet rs=st.getResultSet();
      while (rs.next()) {
        sensor=new Sensor();
        sensor.setId(rs.getString("String_Node_Str"));
        sensor.setSensorType(rs.getString("String_Node_Str"));
        sensor.setSource(source);
        sensor.setSourceType(rs.getString("String_Node_Str"));
        Place place=placeManager.getPlaceWithPlaceId(rs.getString("String_Node_Str"));
        sensor.setPlace(place);
      }
      ConnectionManager.attemptClose(rs);
    }
    ConnectionManager.attemptClose(st);
    ConnectionManager.attemptClose(conn);
  }
 catch (  Exception e) {
    e.printStackTrace();
    ConnectionManager.attemptClose(conn);
  }
  return sensor;
}

Fixed version (ground truth):
public Sensor getSpecifiedSensorWithSource(String source){
  PlaceManager placeManager=new PlaceManager(metaGraph,dataGraph);
  Connection conn=null;
  Sensor sensor=null;
  String sql="String_Node_Str" + "String_Node_Str" + metaGraph + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ source+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  try {
    conn=ConnectionManager.getConnectionPool().getConnection();
    Statement st=conn.createStatement();
    if (st.execute(sql)) {
      ResultSet rs=st.getResultSet();
      while (rs.next()) {
        sensor=new Sensor();
        sensor.setId(rs.getString("String_Node_Str"));
        sensor.setSensorType(rs.getString("String_Node_Str"));
        sensor.setSource(source);
        sensor.setSourceType(rs.getString("String_Node_Str"));
        Place place=placeManager.getPlaceWithPlaceId(rs.getString("String_Node_Str"));
        sensor.setPlace(place);
        sensor.setProperties(getObservesListOfSensor(rs.getString("String_Node_Str")));
      }
      ConnectionManager.attemptClose(rs);
    }
    ConnectionManager.attemptClose(st);
    ConnectionManager.attemptClose(conn);
  }
 catch (  Exception e) {
    e.printStackTrace();
    ConnectionManager.attemptClose(conn);
  }
  return sensor;
}
Program: 15607
Project: 15607
Buggy source:
public LSMRegisteredServiceImpl getRegisteredService(long serviceId){
  final LSMRegisteredServiceImpl registeredService=lsmOAuthHttpManager.getRegisteredService(serviceId);
  if (registeredService != null) {
    if ("String_Node_Str".equals(registeredService.getUsernameAttribute()))     registeredService.setUsernameAttribute(null);
    if ("String_Node_Str".equals(registeredService.getTheme()))     registeredService.setTheme(null);
    registeredService.setAnonymousAccess(false);
  }
  return registeredService;
}

Fixed version (ground truth):
public LSMRegisteredServiceImpl getRegisteredService(long serviceId){
  final LSMRegisteredServiceImpl registeredService=lsmOAuthHttpManager.getRegisteredService(serviceId);
  return registeredService;
}
Program: 15609
Project: 15609
Buggy source:
public void importApplications(){
  ApplicationDesignPageContext context=getContext();
  if (context.getUploadedSpec() == null) {
    FacesContext.getCurrentInstance().addMessage(null,new FacesMessage(FacesMessage.SEVERITY_FATAL,messages.getString("String_Node_Str"),FaceletLocalization.getLocalisedMessage(messages,"String_Node_Str")));
    return;
  }
  OSDSpec spec=null;
  try {
    spec=SchedulerAPIWrapper.unmarshalOSDSpec(IOUtils.toString(context.getUploadedSpec().getInputstream(),"String_Node_Str"));
  }
 catch (  Exception ex) {
    FacesContext.getCurrentInstance().addMessage(null,new FacesMessage(FacesMessage.SEVERITY_FATAL,messages.getString("String_Node_Str"),FaceletLocalization.getLocalisedMessage(messages,"String_Node_Str")));
    return;
  }
  context.getAppManager().loadOSDSPec(spec);
  context.cleanupWorkspace();
  FacesContext.getCurrentInstance().addMessage(null,new FacesMessage(FacesMessage.SEVERITY_INFO,messages.getString("String_Node_Str"),FaceletLocalization.getLocalisedMessage(messages,"String_Node_Str")));
  applicationBean.redirect("String_Node_Str");
}

Fixed version (ground truth):
public void importApplications(){
  ApplicationDesignPageContext context=getContext();
  if (context.getUploadedSpec() == null) {
    FacesContext.getCurrentInstance().addMessage(null,new FacesMessage(FacesMessage.SEVERITY_FATAL,messages.getString("String_Node_Str"),FaceletLocalization.getLocalisedMessage(messages,"String_Node_Str")));
    return;
  }
  OSDSpec spec=null;
  try {
    spec=SchedulerAPIWrapper.unmarshalOSDSpec(IOUtils.toString(context.getUploadedSpec().getInputstream(),"String_Node_Str"));
  }
 catch (  Exception ex) {
    FacesContext.getCurrentInstance().addMessage(null,new FacesMessage(FacesMessage.SEVERITY_FATAL,messages.getString("String_Node_Str"),FaceletLocalization.getLocalisedMessage(messages,"String_Node_Str")));
    return;
  }
  context.getAppManager().loadOSDSPec(spec);
  context.cleanupWorkspace();
  if (context.isPersistSpec()) {
    try {
      SchedulerAPIWrapper.registerService(context.getAppManager().exportOSDSpec());
    }
 catch (    APIException ex) {
      LoggerService.log(ex);
      FacesContext.getCurrentInstance().addMessage(null,new FacesMessage(FacesMessage.SEVERITY_FATAL,messages.getString("String_Node_Str"),FaceletLocalization.getLocalisedMessage(messages,"String_Node_Str")));
    }
  }
  FacesContext.getCurrentInstance().addMessage(null,new FacesMessage(FacesMessage.SEVERITY_INFO,messages.getString("String_Node_Str"),FaceletLocalization.getLocalisedMessage(messages,"String_Node_Str")));
  applicationBean.redirect("String_Node_Str");
}
Program: 15610
Project: 15610
Buggy source:
public void loadApplication(String name){
  ApplicationDesignPageContext context=getContext();
  context.getAppManager().selectOAMOByName(name);
  GraphModel graphModel=new DefaultGraphModel();
  String graphMeta=context.getAppManager().getSelectedOAMO() != null ? context.getAppManager().getSelectedOAMO().getGraphMeta() : null;
  if (graphMeta != null) {
    try {
      JSONObject spec=new JSONObject(new JSONTokener(graphMeta));
      graphModel.importJSON(spec);
    }
 catch (    JSONException ex) {
      LoggerService.log(ex);
      FacesContext.getCurrentInstance().addMessage(null,new FacesMessage(FacesMessage.SEVERITY_FATAL,messages.getString("String_Node_Str"),FaceletLocalization.getLocalisedMessage(messages,"String_Node_Str")));
      context.setGraphModel(null);
      context.cleanupWorkspace();
      return;
    }
  }
  context.setGraphModel(graphModel);
  context.clearAvailableSensors();
}

Fixed version (ground truth):
public void loadApplication(String name){
  ApplicationDesignPageContext context=getContext();
  context.getAppManager().selectOAMOByName(name);
  GraphModel graphModel=new DefaultGraphModel();
  String graphMeta=context.getAppManager().getSelectedOAMO() != null ? context.getAppManager().getSelectedOAMO().getGraphMeta() : null;
  if (graphMeta != null) {
    try {
      JSONObject spec=new JSONObject(new JSONTokener(graphMeta));
      graphModel.importJSON(spec);
    }
 catch (    JSONException ex) {
      LoggerService.log(ex);
      FacesContext.getCurrentInstance().addMessage(null,new FacesMessage(FacesMessage.SEVERITY_FATAL,messages.getString("String_Node_Str"),FaceletLocalization.getLocalisedMessage(messages,"String_Node_Str")));
      context.setGraphModel(null);
      context.cleanupWorkspace();
      return;
    }
  }
  context.setGraphModel(graphModel);
  context.clearAvailableSensors();
  applicationBean.redirect("String_Node_Str");
}
Program: 15615
Project: 15615
Buggy source:
@Override public void clearData(){
  model.getMarkers().clear();
  model.getCircles().clear();
  RequestContext requestContext=RequestContext.getCurrentInstance();
  if (requestContext != null) {
    requestContext.update(panel.getClientId());
  }
}

Fixed version (ground truth):
@Override public void clearData(){
  model.getMarkers().clear();
  model.getCircles().clear();
  selectedMarker=null;
  infoWindowContent.setValue("String_Node_Str");
  mapViewType=mapType.toString();
  mapCenter=centerLat + "String_Node_Str" + centerLon;
  mapZoom=zoom;
  RequestContext requestContext=RequestContext.getCurrentInstance();
  if (requestContext != null) {
    requestContext.update(panel.getClientId());
  }
}
Program: 15616
Project: 15616
Buggy source:
private void parseAttributes(List<PresentationAttr> presentationAttributes){
  numAttributes=0;
  for (  PresentationAttr attr : presentationAttributes) {
    if ("String_Node_Str".equals(attr.getName())) {
      numAttributes=Integer.valueOf(attr.getValue());
      attributeValues=new String[numAttributes];
      break;
    }
  }
}

Fixed version (ground truth):
private void parseAttributes(List<PresentationAttr> presentationAttributes){
  numAttributes=0;
  for (  PresentationAttr attr : presentationAttributes) {
    if ("String_Node_Str".equals(attr.getName())) {
      numAttributes=Integer.valueOf(attr.getValue());
      attributeValues=new String[numAttributes];
    }
 else     if ("String_Node_Str".equals(attr.getName())) {
      title=attr.getValue();
    }
  }
}
Program: 15617
Project: 15617
Buggy source:
@Override public void processData(SdumServiceResultSet resultSet){
  boolean triggerUpdate=true;
  for (int i=0; i < numAttributes; i++) {
    attributeValues[i]=null;
  }
  for (  QueryResult resultBlock : resultSet.getQueryResult()) {
    for (    Result result : resultBlock.getSparql().getResults().getResult()) {
      for (      Binding binding : result.getBinding()) {
        if (binding.getName().startsWith("String_Node_Str")) {
          Integer seriesIndex=Integer.valueOf(binding.getName().substring(5)) - 1;
          attributeValues[seriesIndex]=binding.getLiteral().getContent();
        }
      }
    }
  }
  if (triggerUpdate) {
    String html="String_Node_Str";
    for (int i=0; i < numAttributes; i++) {
      html+="String_Node_Str" + (i + 1) + "String_Node_Str"+ (attributeValues[i] == null ? "String_Node_Str" : attributeValues[i])+ "String_Node_Str";
    }
    html+="String_Node_Str";
    widget.setValue(html);
    widget.setRendered(true);
    emptyMessage.setRendered(false);
    RequestContext requestContext=RequestContext.getCurrentInstance();
    if (requestContext != null) {
      requestContext.update(panel.getClientId());
    }
  }
}

Fixed version (ground truth):
@Override public void processData(SdumServiceResultSet resultSet){
  boolean triggerUpdate=true;
  for (int i=0; i < numAttributes; i++) {
    attributeValues[i]=null;
  }
  for (  QueryResult resultBlock : resultSet.getQueryResult()) {
    for (    Result result : resultBlock.getSparql().getResults().getResult()) {
      for (      Binding binding : result.getBinding()) {
        if (binding.getName().startsWith("String_Node_Str")) {
          Integer seriesIndex=Integer.valueOf(binding.getName().substring(4)) - 1;
          attributeValues[seriesIndex]=binding.getLiteral().getContent();
        }
      }
    }
  }
  if (triggerUpdate) {
    String html="String_Node_Str";
    for (int i=0; i < numAttributes; i++) {
      html+="String_Node_Str" + (i + 1) + "String_Node_Str"+ (attributeValues[i] == null ? "String_Node_Str" : attributeValues[i])+ "String_Node_Str";
    }
    html+="String_Node_Str";
    widget.setValue(html);
    widget.setRendered(true);
    emptyMessage.setRendered(false);
    RequestContext requestContext=RequestContext.getCurrentInstance();
    if (requestContext != null) {
      requestContext.update(panel.getClientId());
    }
  }
}
Program: 15620
Project: 15620
Buggy source:
/** 
 * Generate a JSF widget to render the widget view
 */
Panel createWidget(List<PresentationAttr> presentationAttributes);

Fixed version (ground truth):
/** 
 * Generate a JSF widget to render the widget view
 */
Panel createWidget(String serviceId,List<PresentationAttr> presentationAttributes);
Program: 15621
Project: 15621
Buggy source:
public AuthorizationManager getAuthorizationManager(){
  if (authorizationManager != null) {
    AuthorizationManager authorizationManager=new AuthorizationManager();
    authorizationManager.setClient((CasOAuthWrapperClient)getClient());
    authorizationManager.setPermissionsURL(getCasOAuthClientRealm().getPermissionsURL());
  }
  return authorizationManager;
}

Fixed version (ground truth):
public AuthorizationManager getAuthorizationManager(){
  if (authorizationManager == null) {
    authorizationManager=new AuthorizationManager();
    authorizationManager.setClient((CasOAuthWrapperClient)getClient());
    authorizationManager.setPermissionsURL(getCasOAuthClientRealm().getPermissionsURL());
  }
  return authorizationManager;
}
Program: 15623
Project: 15623
Buggy source:
/** 
 * Invokes a previously defined Service having the specified applicationID. This call will produce only one Result Set.
 * @param applicationID
 * @return
 */
@GET @Path("String_Node_Str") public SdumServiceResultSet pollForReport(@QueryParam("String_Node_Str") String applicationID){
  PollForReportImpl pollForReportImpl=new PollForReportImpl(applicationID);
  return pollForReportImpl.getSdumServiceResultSet();
}

Fixed version (ground truth):
/** 
 * Invokes a previously defined Service having the specified serviceID.
 * @param applicationID
 * @return
 */
@GET @Path("String_Node_Str") public SdumServiceResultSet pollForReport(@QueryParam("String_Node_Str") String applicationID){
  PollForReportImpl pollForReportImpl=new PollForReportImpl(applicationID);
  return pollForReportImpl.getSdumServiceResultSet();
}
Program: 15625
Project: 15625
Buggy source:
public static OSMO parseOSMORootData(TupleQueryResult qres){
  OSMO osmo=new OSMO();
  try {
    BindingSet b=qres.next();
    Set names=b.getBindingNames();
    for (    Object n : names) {
      if (((String)n).equalsIgnoreCase("String_Node_Str")) {
        String str=(b.getValue((String)n) == null) ? null : b.getValue((String)n).stringValue();
        osmo.setName(str);
        System.out.print("String_Node_Str" + osmo.getName() + "String_Node_Str");
      }
 else       if (((String)n).equalsIgnoreCase("String_Node_Str")) {
        String str=(b.getValue((String)n) == null) ? null : b.getValue((String)n).stringValue();
        osmo.setDescription(str);
        System.out.print("String_Node_Str" + osmo.getDescription() + "String_Node_Str");
      }
 else       if (((String)n).equalsIgnoreCase("String_Node_Str")) {
        String str=(b.getValue((String)n) == null) ? null : b.getValue((String)n).stringValue();
        QueryRequest qr=new QueryRequest();
        qr.setQuery(str);
        osmo.setQueryRequest(qr);
        System.out.print("String_Node_Str" + osmo.getQueryRequest().getQuery() + "String_Node_Str");
      }
    }
    return osmo;
  }
 catch (  QueryEvaluationException e) {
    e.printStackTrace();
    return null;
  }
catch (  Exception e) {
    e.printStackTrace();
    return null;
  }
}

Fixed version (ground truth):
public static OSMO parseOSMORootData(TupleQueryResult qres){
  OSMO osmo=new OSMO();
  try {
    BindingSet b=qres.next();
    Set names=b.getBindingNames();
    for (    Object n : names) {
      if (((String)n).equalsIgnoreCase("String_Node_Str")) {
        String str=(b.getValue((String)n) == null) ? null : b.getValue((String)n).stringValue();
        osmo.setName(str);
        System.out.print("String_Node_Str" + osmo.getName() + "String_Node_Str");
      }
 else       if (((String)n).equalsIgnoreCase("String_Node_Str")) {
        String str=(b.getValue((String)n) == null) ? null : b.getValue((String)n).stringValue();
        osmo.setDescription(str);
        System.out.print("String_Node_Str" + osmo.getDescription() + "String_Node_Str");
      }
 else       if (((String)n).equalsIgnoreCase("String_Node_Str")) {
        String str=(b.getValue((String)n) == null) ? null : b.getValue((String)n).stringValue();
        QueryRequest qr=new QueryRequest();
        qr.setQuery(str);
        osmo.getQueryRequest().add(qr);
        System.out.print("String_Node_Str" + osmo.getQueryRequest().get(0).getQuery() + "String_Node_Str");
      }
    }
    return osmo;
  }
 catch (  QueryEvaluationException e) {
    e.printStackTrace();
    return null;
  }
catch (  Exception e) {
    e.printStackTrace();
    return null;
  }
}
Program: 15627
Project: 15627
Buggy source:
private void addMissingXAxii(){
  String xAxisType=(String)getPropertyValueMap().get("String_Node_Str");
  if ("String_Node_Str".equals(xAxisType)) {
    return;
  }
  int maxSeries=Integer.valueOf((String)getPropertyByName("String_Node_Str").getAllowedValues()[getPropertyByName("String_Node_Str").getAllowedValues().length - 1]);
  for (int i=0; i < maxSeries; i++) {
    GraphNodeEndpoint yep=getEndpointByLabel("String_Node_Str" + (i + 1));
    if (yep == null) {
      return;
    }
    int insIndex=Math.max(0,getEndpointDefinitions().indexOf(yep) - 1);
    GraphNodeEndpoint ep=getEndpointByLabel("String_Node_Str" + (i + 1));
    if (ep == null) {
      ep=new DefaultGraphNodeEndpoint();
      ep.setType(EndpointType.Input);
      ep.setAnchor(AnchorType.Left);
      ep.setConnectorType(ConnectorType.Rectangle);
      ep.setLabel("String_Node_Str" + (i + 1));
      ep.setRequired(true);
      if ("String_Node_Str".equals(xAxisType)) {
        ep.setScope("String_Node_Str");
        ep.setMaxConnections(1);
      }
 else {
        ep.setScope("String_Node_Str");
        ep.setMaxConnections(-1);
      }
      getEndpointDefinitions().add(insIndex,ep);
    }
 else {
      if ("String_Node_Str".equals(xAxisType) && ep.getScope().contains("String_Node_Str")) {
        disconnectEndpoint(ep);
        ep.setScope("String_Node_Str");
      }
 else       if ("String_Node_Str".equals(xAxisType) && ep.getScope().contains("String_Node_Str")) {
        disconnectEndpoint(ep);
        ep.setScope("String_Node_Str");
      }
    }
  }
}

Fixed version (ground truth):
private void addMissingXAxii(){
  String xAxisType=(String)getPropertyValueMap().get("String_Node_Str");
  if ("String_Node_Str".equals(xAxisType)) {
    return;
  }
  int maxSeries=Integer.valueOf((String)getPropertyByName("String_Node_Str").getAllowedValues()[getPropertyByName("String_Node_Str").getAllowedValues().length - 1]);
  for (int i=0; i < maxSeries; i++) {
    GraphNodeEndpoint yep=getEndpointByLabel("String_Node_Str" + (i + 1));
    if (yep == null) {
      return;
    }
    int insIndex=Math.max(0,getEndpointDefinitions().indexOf(yep));
    GraphNodeEndpoint ep=getEndpointByLabel("String_Node_Str" + (i + 1));
    if (ep == null) {
      ep=new DefaultGraphNodeEndpoint();
      ep.setType(EndpointType.Input);
      ep.setAnchor(AnchorType.Left);
      ep.setConnectorType(ConnectorType.Rectangle);
      ep.setLabel("String_Node_Str" + (i + 1));
      ep.setRequired(true);
      if ("String_Node_Str".equals(xAxisType)) {
        ep.setScope("String_Node_Str");
        ep.setMaxConnections(1);
      }
 else {
        ep.setScope("String_Node_Str");
        ep.setMaxConnections(-1);
      }
      getEndpointDefinitions().add(insIndex,ep);
    }
 else {
      if ("String_Node_Str".equals(xAxisType) && ep.getScope().contains("String_Node_Str")) {
        disconnectEndpoint(ep);
        ep.setScope("String_Node_Str");
      }
 else       if ("String_Node_Str".equals(xAxisType) && ep.getScope().contains("String_Node_Str")) {
        disconnectEndpoint(ep);
        ep.setScope("String_Node_Str");
      }
    }
  }
}
Program: 15628
Project: 15628
Buggy source:
private HttpResponse getResponse(GenericUrl uri) throws GeoIp2Exception, IOException {
  HttpRequestFactory requestFactory=this.transport.createRequestFactory();
  HttpRequest request;
  try {
    request=requestFactory.buildGetRequest(uri);
  }
 catch (  IOException e) {
    throw new GeoIp2Exception("String_Node_Str",e);
  }
  request.setConnectTimeout(this.timeout);
  HttpHeaders headers=request.getHeaders();
  headers.setAccept("String_Node_Str");
  headers.setBasicAuthentication(String.valueOf(this.userId),this.licenseKey);
  headers.setUserAgent("String_Node_Str" + this.getClass().getPackage().getImplementationVersion() + "String_Node_Str");
  try {
    return request.execute();
  }
 catch (  HttpResponseException e) {
    int status=e.getStatusCode();
    if ((status >= 400) && (status < 500)) {
      WebServiceClient.handle4xxStatus(e.getContent(),status,uri);
    }
 else     if ((status >= 500) && (status < 600)) {
      throw new HttpException("String_Node_Str" + status + "String_Node_Str"+ uri,status,uri.toURL());
    }
    throw new HttpException("String_Node_Str" + status + "String_Node_Str"+ uri,status,uri.toURL());
  }
}

Fixed version (ground truth):
private HttpResponse getResponse(GenericUrl uri) throws GeoIp2Exception, IOException {
  HttpTransport transport=this.testTransport == null ? new NetHttpTransport() : this.testTransport;
  HttpRequestFactory requestFactory=transport.createRequestFactory();
  HttpRequest request;
  try {
    request=requestFactory.buildGetRequest(uri);
  }
 catch (  IOException e) {
    throw new GeoIp2Exception("String_Node_Str",e);
  }
  request.setConnectTimeout(this.timeout);
  HttpHeaders headers=request.getHeaders();
  headers.setAccept("String_Node_Str");
  headers.setBasicAuthentication(String.valueOf(this.userId),this.licenseKey);
  headers.setUserAgent("String_Node_Str" + this.getClass().getPackage().getImplementationVersion() + "String_Node_Str");
  try {
    return request.execute();
  }
 catch (  HttpResponseException e) {
    int status=e.getStatusCode();
    if ((status >= 400) && (status < 500)) {
      WebServiceClient.handle4xxStatus(e.getContent(),status,uri);
    }
 else     if ((status >= 500) && (status < 600)) {
      throw new HttpException("String_Node_Str" + status + "String_Node_Str"+ uri,status,uri.toURL());
    }
    throw new HttpException("String_Node_Str" + status + "String_Node_Str"+ uri,status,uri.toURL());
  }
}
Program: 15629
Project: 15629
Buggy source:
WebServiceClient(Builder builder){
  this.host=builder.host;
  this.locales=builder.locales;
  this.licenseKey=builder.licenseKey;
  this.timeout=builder.timeout;
  this.transport=builder.transport;
  this.userId=builder.userId;
}

Fixed version (ground truth):
WebServiceClient(Builder builder){
  this.host=builder.host;
  this.locales=builder.locales;
  this.licenseKey=builder.licenseKey;
  this.timeout=builder.timeout;
  this.testTransport=builder.testTransport;
  this.userId=builder.userId;
}
Program: 15630
Project: 15630
Buggy source:
@Before public void setUp() throws IOException, GeoIp2Exception {
  HttpTransport transport=new TestTransport();
  WebServiceClient client=new WebServiceClient.Builder(42,"String_Node_Str").transport(transport).build();
  this.country=client.country(InetAddress.getByName("String_Node_Str"));
}

Fixed version (ground truth):
@Before public void setUp() throws IOException, GeoIp2Exception {
  HttpTransport transport=new TestTransport();
  WebServiceClient client=new WebServiceClient.Builder(42,"String_Node_Str").testTransport(transport).build();
  this.country=client.country(InetAddress.getByName("String_Node_Str"));
}
Program: 15631
Project: 15631
Buggy source:
@Test public void omni() throws IOException, GeoIp2Exception {
  HttpTransport transport=new TestTransport();
  WebServiceClient client=new WebServiceClient.Builder(42,"String_Node_Str").host("String_Node_Str").transport(transport).build();
  OmniResponse omni=client.omni(InetAddress.getByName("String_Node_Str"));
  assertEquals(omni.getTraits().getIpAddress(),"String_Node_Str");
}

Fixed version (ground truth):
@Test public void omni() throws IOException, GeoIp2Exception {
  HttpTransport transport=new TestTransport();
  WebServiceClient client=new WebServiceClient.Builder(42,"String_Node_Str").host("String_Node_Str").testTransport(transport).build();
  OmniResponse omni=client.omni(InetAddress.getByName("String_Node_Str"));
  assertEquals(omni.getTraits().getIpAddress(),"String_Node_Str");
}
Program: 15632
Project: 15632
Buggy source:
@Before public void createClient(){
  HttpTransport transport=new TestTransport();
  this.client=new WebServiceClient.Builder(42,"String_Node_Str").transport(transport).build();
}

Fixed version (ground truth):
@Before public void createClient(){
  HttpTransport transport=new TestTransport();
  this.client=new WebServiceClient.Builder(42,"String_Node_Str").testTransport(transport).build();
}
Program: 15633
Project: 15633
Buggy source:
@Test public void testMissing() throws IOException, GeoIp2Exception {
  WebServiceClient client=new WebServiceClient.Builder(42,"String_Node_Str").transport(this.transport).locales(Arrays.asList("String_Node_Str")).build();
  CityIspOrgResponse cio=client.cityIspOrg(InetAddress.getByName("String_Node_Str"));
  assertNotNull(cio.getCity());
  assertNull("String_Node_Str",cio.getCity().getName());
}

Fixed version (ground truth):
@Test public void testMissing() throws IOException, GeoIp2Exception {
  WebServiceClient client=new WebServiceClient.Builder(42,"String_Node_Str").testTransport(this.transport).locales(Arrays.asList("String_Node_Str")).build();
  CityIspOrgResponse cio=client.cityIspOrg(InetAddress.getByName("String_Node_Str"));
  assertNotNull(cio.getCity());
  assertNull("String_Node_Str",cio.getCity().getName());
}
Program: 15634
Project: 15634
Buggy source:
@Test public void noLocale() throws IOException, GeoIp2Exception {
  WebServiceClient client=new WebServiceClient.Builder(42,"String_Node_Str").transport(this.transport).build();
  CityIspOrgResponse cio=client.cityIspOrg(InetAddress.getByName("String_Node_Str"));
  assertEquals("String_Node_Str",cio.getContinent().getName(),"String_Node_Str");
}

Fixed version (ground truth):
@Test public void noLocale() throws IOException, GeoIp2Exception {
  WebServiceClient client=new WebServiceClient.Builder(42,"String_Node_Str").testTransport(this.transport).build();
  CityIspOrgResponse cio=client.cityIspOrg(InetAddress.getByName("String_Node_Str"));
  assertEquals("String_Node_Str",cio.getContinent().getName(),"String_Node_Str");
}
Program: 15635
Project: 15635
Buggy source:
@Test public void testNames() throws IOException, GeoIp2Exception {
  WebServiceClient client=new WebServiceClient.Builder(42,"String_Node_Str").transport(this.transport).locales(Arrays.asList("String_Node_Str","String_Node_Str")).build();
  CityIspOrgResponse cio=client.cityIspOrg(InetAddress.getByName("String_Node_Str"));
  assertEquals("String_Node_Str","String_Node_Str",cio.getContinent().getName());
  assertEquals("String_Node_Str","String_Node_Str",cio.getCountry().getName());
  assertEquals("String_Node_Str",cio.getCountry().getName(),cio.getCountry().getName());
}

Fixed version (ground truth):
@Test public void testNames() throws IOException, GeoIp2Exception {
  WebServiceClient client=new WebServiceClient.Builder(42,"String_Node_Str").testTransport(this.transport).locales(Arrays.asList("String_Node_Str","String_Node_Str")).build();
  CityIspOrgResponse cio=client.cityIspOrg(InetAddress.getByName("String_Node_Str"));
  assertEquals("String_Node_Str","String_Node_Str",cio.getContinent().getName());
  assertEquals("String_Node_Str","String_Node_Str",cio.getCountry().getName());
  assertEquals("String_Node_Str",cio.getCountry().getName(),cio.getCountry().getName());
}
Program: 15636
Project: 15636
Buggy source:
@Test public void testFallback() throws IOException, GeoIp2Exception {
  WebServiceClient client=new WebServiceClient.Builder(42,"String_Node_Str").transport(this.transport).locales(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str")).build();
  CityIspOrgResponse cio=client.cityIspOrg(InetAddress.getByName("String_Node_Str"));
  assertEquals("String_Node_Str",cio.getContinent().getName(),"String_Node_Str");
}

Fixed version (ground truth):
@Test public void testFallback() throws IOException, GeoIp2Exception {
  WebServiceClient client=new WebServiceClient.Builder(42,"String_Node_Str").testTransport(this.transport).locales(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str")).build();
  CityIspOrgResponse cio=client.cityIspOrg(InetAddress.getByName("String_Node_Str"));
  assertEquals("String_Node_Str",cio.getContinent().getName(),"String_Node_Str");
}
Program: 15637
Project: 15637
Buggy source:
@Test public void noFallback() throws IOException, GeoIp2Exception {
  WebServiceClient client=new WebServiceClient.Builder(42,"String_Node_Str").transport(this.transport).locales(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str")).build();
  CityIspOrgResponse cio=client.cityIspOrg(InetAddress.getByName("String_Node_Str"));
  assertNull("String_Node_Str",cio.getContinent().getName());
}

Fixed version (ground truth):
@Test public void noFallback() throws IOException, GeoIp2Exception {
  WebServiceClient client=new WebServiceClient.Builder(42,"String_Node_Str").testTransport(this.transport).locales(Arrays.asList("String_Node_Str","String_Node_Str","String_Node_Str")).build();
  CityIspOrgResponse cio=client.cityIspOrg(InetAddress.getByName("String_Node_Str"));
  assertNull("String_Node_Str",cio.getContinent().getName());
}
Program: 15638
Project: 15638
Buggy source:
@Test public void russianFallback() throws IOException, GeoIp2Exception {
  WebServiceClient client=new WebServiceClient.Builder(42,"String_Node_Str").transport(this.transport).locales(Arrays.asList("String_Node_Str","String_Node_Str")).build();
  CityIspOrgResponse cio=client.cityIspOrg(InetAddress.getByName("String_Node_Str"));
  assertEquals("String_Node_Str","String_Node_Str",cio.getCountry().getName());
}

Fixed version (ground truth):
@Test public void russianFallback() throws IOException, GeoIp2Exception {
  WebServiceClient client=new WebServiceClient.Builder(42,"String_Node_Str").testTransport(this.transport).locales(Arrays.asList("String_Node_Str","String_Node_Str")).build();
  CityIspOrgResponse cio=client.cityIspOrg(InetAddress.getByName("String_Node_Str"));
  assertEquals("String_Node_Str","String_Node_Str",cio.getCountry().getName());
}
Program: 15639
Project: 15639
Buggy source:
@Before public void createClient() throws IOException, GeoIp2Exception {
  HttpTransport transport=new TestTransport();
  WebServiceClient client=new WebServiceClient.Builder(42,"String_Node_Str").transport(transport).build();
  this.omni=client.omni(InetAddress.getByName("String_Node_Str"));
}

Fixed version (ground truth):
@Before public void createClient() throws IOException, GeoIp2Exception {
  HttpTransport transport=new TestTransport();
  WebServiceClient client=new WebServiceClient.Builder(42,"String_Node_Str").testTransport(transport).build();
  this.omni=client.omni(InetAddress.getByName("String_Node_Str"));
}
Program: 15640
Project: 15640
Buggy source:
HTTPException(String message,Throwable cause,int http_status,String uri){
  super(message,cause);
  http_status=this.http_status;
  uri=this.uri;
}

Fixed version (ground truth):
HTTPException(String message,Throwable cause,int http_status,String uri){
  super(message,cause);
  this.http_status=http_status;
  this.uri=uri;
}
Program: 15641
Project: 15641
Buggy source:
WebServiceException(String message,String code,int http_status,String uri){
  super(message,http_status,uri);
  code=this.code;
}

Fixed version (ground truth):
WebServiceException(String message,String code,int http_status,String uri){
  super(message,http_status,uri);
  this.code=code;
}
Program: 15642
Project: 15642
Buggy source:
/** 
 * Compares a portion of this slice with a portion of the specified slice.  Equality is solely based on the contents of the slice.
 */
@SuppressWarnings("String_Node_Str") public int compareTo(int offset,int length,Slice that,int otherOffset,int otherLength){
  if ((this == that) && (offset == otherOffset) && (length == otherLength)) {
    return 0;
  }
  checkIndexLength(offset,length);
  that.checkIndexLength(otherOffset,otherLength);
  int compareLength=Math.min(length,otherLength);
  while (compareLength >= SIZE_OF_LONG) {
    long thisLong=unsafe.getLong(base,address + offset);
    thisLong=Long.reverseBytes(thisLong);
    long thatLong=unsafe.getLong(that.base,that.address + otherOffset);
    thatLong=Long.reverseBytes(thatLong);
    int v=UnsignedLongs.compare(thisLong,thatLong);
    if (v != 0) {
      return v;
    }
    offset+=SIZE_OF_LONG;
    otherOffset+=SIZE_OF_LONG;
    compareLength-=SIZE_OF_LONG;
  }
  while (compareLength > 0) {
    byte thisByte=unsafe.getByte(base,address + offset);
    byte thatByte=unsafe.getByte(that.base,that.address + otherOffset);
    int v=UnsignedBytes.compare(thisByte,thatByte);
    if (v != 0) {
      return v;
    }
    offset++;
    otherOffset++;
    compareLength--;
  }
  return Integer.compare(size,that.size);
}

Fixed version (ground truth):
/** 
 * Compares a portion of this slice with a portion of the specified slice.  Equality is solely based on the contents of the slice.
 */
@SuppressWarnings("String_Node_Str") public int compareTo(int offset,int length,Slice that,int otherOffset,int otherLength){
  if ((this == that) && (offset == otherOffset) && (length == otherLength)) {
    return 0;
  }
  checkIndexLength(offset,length);
  that.checkIndexLength(otherOffset,otherLength);
  int compareLength=Math.min(length,otherLength);
  while (compareLength >= SIZE_OF_LONG) {
    long thisLong=unsafe.getLong(base,address + offset);
    thisLong=Long.reverseBytes(thisLong);
    long thatLong=unsafe.getLong(that.base,that.address + otherOffset);
    thatLong=Long.reverseBytes(thatLong);
    int v=UnsignedLongs.compare(thisLong,thatLong);
    if (v != 0) {
      return v;
    }
    offset+=SIZE_OF_LONG;
    otherOffset+=SIZE_OF_LONG;
    compareLength-=SIZE_OF_LONG;
  }
  while (compareLength > 0) {
    byte thisByte=unsafe.getByte(base,address + offset);
    byte thatByte=unsafe.getByte(that.base,that.address + otherOffset);
    int v=UnsignedBytes.compare(thisByte,thatByte);
    if (v != 0) {
      return v;
    }
    offset++;
    otherOffset++;
    compareLength--;
  }
  return Integer.compare(length,otherLength);
}
Program: 15647
Project: 15647
Buggy source:
@Override public void onPageSelected(int position){
  if (position + 1 >= sharedAdapterHelper.getArticleItems().size()) {
    sharedAdapterHelper.load(ArticleActivity.this);
  }
  final JSONObject article=sharedAdapterHelper.getArticleItems().get(position);
  String articleId=article.optString("String_Node_Str");
  if (!readArticleIdSet.contains(articleId) && !article.optBoolean("String_Node_Str")) {
    readArticleIdSet.add(article.optString("String_Node_Str"));
  }
  drawerList.setItemChecked(position,true);
  drawerList.smoothScrollToPositionFromTop(position,100);
  drawerList.invalidate();
  updateActionBar();
}

Fixed version (ground truth):
@Override public void onPageSelected(int position){
  if (position + 1 >= sharedAdapterHelper.getArticleItems().size()) {
    sharedAdapterHelper.load(ArticleActivity.this);
  }
  final JSONObject article=sharedAdapterHelper.getArticleItems().get(position);
  String articleId=article.optString("String_Node_Str");
  if (!readArticleIdSet.contains(articleId) && !article.optBoolean("String_Node_Str")) {
    readArticleIdSet.add(article.optString("String_Node_Str"));
  }
  if (drawerLayout == null) {
    if (drawerList.getCheckedItemCount() == 0) {
      drawerList.setSelectionFromTop(position,100);
    }
 else {
      drawerList.smoothScrollToPositionFromTop(position,100);
    }
    drawerList.setItemChecked(position,true);
  }
  updateActionBar();
}
Program: 15648
Project: 15648
Buggy source:
@Override public void onPageScrolled(int position,float positionOffset,int positionOffsetPixels){
  drawerList.invalidate();
}

Fixed version (ground truth):
@Override public void onPageScrolled(int position,float positionOffset,int positionOffsetPixels){
}
Program: 15649
Project: 15649
Buggy source:
@Override public void onDrawerOpened(View view){
  invalidateOptionsMenu();
  getActionBar().show();
}

Fixed version (ground truth):
@Override public void onDrawerOpened(View view){
  invalidateOptionsMenu();
  getActionBar().show();
  int position=viewPager.getCurrentItem();
  drawerList.setItemChecked(position,true);
  if (position <= drawerList.getFirstVisiblePosition() || position >= drawerList.getLastVisiblePosition()) {
    drawerList.setSelectionFromTop(position,100);
  }
}