nus-yam/ex-repair huggingface dataset:
Program: 15553
Project: 15553
Buggy source:
public List<User> getAllUsers(){
  List<User> userList=null;
  String sparql="String_Node_Str" + "String_Node_Str" + lSMOauthGraphURL + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  try {
    String service=sparqlEndPoint;
    QueryExecution vqe=new QueryEngineHTTP(service,sparql);
    ResultSet results=vqe.execSelect();
    userList=new ArrayList<User>();
    while (results.hasNext()) {
      QuerySolution soln=results.nextSolution();
      String userId=soln.get("String_Node_Str").toString();
      User user=getUser(userId);
      userList.add(user);
    }
    logger.debug("String_Node_Str",userList.size());
    vqe.close();
  }
 catch (  Exception e) {
    e.printStackTrace();
    return null;
  }
  return userList;
}

Fixed version (ground truth):
public List<User> getAllUsers(){
  List<User> userList=null;
  String sparql="String_Node_Str" + "String_Node_Str" + lSMOauthGraphURL + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  try {
    String service=sparqlEndPoint;
    QueryExecution vqe=new QueryEngineHTTP(service,sparql);
    ResultSet results=vqe.execSelect();
    userList=new ArrayList<User>();
    while (results.hasNext()) {
      QuerySolution soln=results.nextSolution();
      String userId=soln.get("String_Node_Str").toString();
      User user=getUser(userId);
      userList.add(user);
    }
    logger.debug("String_Node_Str",userList.size());
    vqe.close();
  }
 catch (  Exception e) {
    logger.error("String_Node_Str",e);
    return null;
  }
  return userList;
}
Program: 15554
Project: 15554
Buggy source:
@Override public List<RegisteredService> getAllServices(){
  final List<RegisteredService> allRegisteredServices=getAllRegisteredServices();
  List<RegisteredService> filteredList=new ArrayList<RegisteredService>();
  for (  RegisteredService service : allRegisteredServices) {
    if (!filteredServices.contains(service.getName()))     filteredList.add(service);
  }
  return filteredList;
}

Fixed version (ground truth):
@Override public List<RegisteredService> getAllServices(){
  final List<RegisteredService> allRegisteredServices=getAllRegisteredServices();
  List<RegisteredService> filteredList=new ArrayList<RegisteredService>();
  for (  RegisteredService service : allRegisteredServices) {
    if (!filteredServices.contains(service.getName())) {
      filteredList.add(service);
    }
  }
  return filteredList;
}
Program: 15555
Project: 15555
Buggy source:
public List<Role> getAllRoles(){
  List<Role> roleList=null;
  String sparql="String_Node_Str" + "String_Node_Str" + lSMOauthGraphURL + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  try {
    String service=sparqlEndPoint;
    QueryExecution vqe=new QueryEngineHTTP(service,sparql);
    ResultSet results=vqe.execSelect();
    roleList=new ArrayList<Role>();
    while (results.hasNext()) {
      QuerySolution soln=results.nextSolution();
      String roleId=soln.get("String_Node_Str").toString();
      Role role=getRole(roleId);
      roleList.add(role);
    }
    vqe.close();
  }
 catch (  Exception e) {
    e.printStackTrace();
    return null;
  }
  return roleList;
}

Fixed version (ground truth):
public List<Role> getAllRoles(){
  List<Role> roleList=null;
  String sparql="String_Node_Str" + "String_Node_Str" + lSMOauthGraphURL + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  try {
    String service=sparqlEndPoint;
    QueryExecution vqe=new QueryEngineHTTP(service,sparql);
    ResultSet results=vqe.execSelect();
    roleList=new ArrayList<Role>();
    while (results.hasNext()) {
      QuerySolution soln=results.nextSolution();
      String roleId=soln.get("String_Node_Str").toString();
      Role role=getRole(roleId);
      roleList.add(role);
    }
    vqe.close();
  }
 catch (  Exception e) {
    logger.error("String_Node_Str",e);
    return null;
  }
  return roleList;
}
Program: 15556
Project: 15556
Buggy source:
/** 
 * Retrieves all LSMRegisteredServiceImpls
 * @return
 */
public List<RegisteredService> getAllRegisteredServices(){
  List<RegisteredService> serviceList=new ArrayList<RegisteredService>();
  String sparql="String_Node_Str" + "String_Node_Str" + lSMOauthGraphURL + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  try {
    String service=sparqlEndPoint;
    QueryExecution vqe=new QueryEngineHTTP(service,sparql);
    ResultSet results=vqe.execSelect();
    while (results.hasNext()) {
      QuerySolution soln=results.nextSolution();
      String serviceURL=soln.get("String_Node_Str").toString();
      String serviceId=serviceURL.substring(serviceURL.lastIndexOf("String_Node_Str") + 1);
      LSMRegisteredServiceImpl t=getRegisteredService(Long.parseLong(serviceId));
      serviceList.add(t);
    }
    vqe.close();
  }
 catch (  Exception e) {
    e.printStackTrace();
    return null;
  }
  return serviceList;
}

Fixed version (ground truth):
/** 
 * Retrieves all LSMRegisteredServiceImpls
 * @return
 */
public List<RegisteredService> getAllRegisteredServices(){
  List<RegisteredService> serviceList=new ArrayList<RegisteredService>();
  String sparql="String_Node_Str" + "String_Node_Str" + lSMOauthGraphURL + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  try {
    String service=sparqlEndPoint;
    QueryExecution vqe=new QueryEngineHTTP(service,sparql);
    ResultSet results=vqe.execSelect();
    while (results.hasNext()) {
      QuerySolution soln=results.nextSolution();
      String serviceURL=soln.get("String_Node_Str").toString();
      String serviceId=serviceURL.substring(serviceURL.lastIndexOf("String_Node_Str") + 1);
      LSMRegisteredServiceImpl t=getRegisteredService(Long.parseLong(serviceId));
      serviceList.add(t);
    }
    vqe.close();
  }
 catch (  Exception e) {
    logger.error("String_Node_Str",e);
    return null;
  }
  return serviceList;
}
Program: 15557
Project: 15557
Buggy source:
/** 
 * Retrievs a user by the username
 * @param username
 * @return
 */
public User getUserByUsername(String username){
  org.openiot.lsm.security.oauth.mgmt.User user=null;
  String userURL=instancesPrefix + "String_Node_Str" + username;
  if (username.contains(instancesPrefix + "String_Node_Str")) {
    userURL=username;
    username=username.substring(username.lastIndexOf("String_Node_Str") + 1);
  }
  String sparql="String_Node_Str" + "String_Node_Str" + lSMOauthGraphURL + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ userURL+ "String_Node_Str"+ "String_Node_Str"+ userURL+ "String_Node_Str"+ "String_Node_Str"+ userURL+ "String_Node_Str"+ "String_Node_Str"+ userURL+ "String_Node_Str";
  try {
    String service=sparqlEndPoint;
    QueryExecution vqe=new QueryEngineHTTP(service,sparql);
    ResultSet results=vqe.execSelect();
    if (results.hasNext()) {
      user=new org.openiot.lsm.security.oauth.mgmt.User();
      user.setUsername(username);
      QuerySolution soln=results.nextSolution();
      user.setEmail(soln.get("String_Node_Str").toString());
      user.setPassword(soln.get("String_Node_Str").toString());
      user.setName(soln.get("String_Node_Str").toString());
      List<Role> roles=getUserRoles(username);
      if (roles != null)       user.setRoles(roles);
    }
    vqe.close();
  }
 catch (  Exception e) {
    e.printStackTrace();
    return null;
  }
  return user;
}

Fixed version (ground truth):
/** 
 * Retrievs a user by the username
 * @param username
 * @return
 */
public User getUserByUsername(String usrname){
  org.openiot.lsm.security.oauth.mgmt.User user=null;
  String username=usrname;
  String userURL=instancesPrefix + "String_Node_Str" + username;
  if (username.contains(instancesPrefix + "String_Node_Str")) {
    userURL=username;
    username=username.substring(username.lastIndexOf("String_Node_Str") + 1);
  }
  String sparql="String_Node_Str" + "String_Node_Str" + lSMOauthGraphURL + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ userURL+ "String_Node_Str"+ "String_Node_Str"+ userURL+ "String_Node_Str"+ "String_Node_Str"+ userURL+ "String_Node_Str"+ "String_Node_Str"+ userURL+ "String_Node_Str";
  try {
    String service=sparqlEndPoint;
    QueryExecution vqe=new QueryEngineHTTP(service,sparql);
    ResultSet results=vqe.execSelect();
    if (results.hasNext()) {
      user=new org.openiot.lsm.security.oauth.mgmt.User();
      user.setUsername(username);
      QuerySolution soln=results.nextSolution();
      user.setEmail(soln.get("String_Node_Str").toString());
      user.setPassword(soln.get("String_Node_Str").toString());
      user.setName(soln.get("String_Node_Str").toString());
      List<Role> roles=getUserRoles(username);
      if (roles != null) {
        user.setRoles(roles);
      }
    }
    vqe.close();
  }
 catch (  Exception e) {
    logger.error("String_Node_Str",e);
    return null;
  }
  return user;
}
Program: 15558
Project: 15558
Buggy source:
public void addUser(User user){
  if (user.getRoles() == null)   user.setRoles(new ArrayList<Role>());
  lsmOAuthHttpManager.addUser(user);
}

Fixed version (ground truth):
public void addUser(User user){
  if (user.getRoles() == null) {
    user.setRoles(new ArrayList<Role>());
  }
  lsmOAuthHttpManager.addUser(user);
}
Program: 15559
Project: 15559
Buggy source:
/** 
 * Retrievs roles of a user
 * @param username
 * @return
 */
public List<Role> getUserRoles(String username){
  List<Role> roles=new ArrayList<Role>();
  String userURL=instancesPrefix + "String_Node_Str" + username;
  if (username.contains(instancesPrefix + "String_Node_Str")) {
    userURL=username;
    username=username.substring(username.lastIndexOf("String_Node_Str") + 1);
  }
  String sparql="String_Node_Str" + "String_Node_Str" + lSMOauthGraphURL + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ userURL+ "String_Node_Str"+ "String_Node_Str";
  try {
    String service=sparqlEndPoint;
    QueryExecution vqe=new QueryEngineHTTP(service,sparql);
    ResultSet results=vqe.execSelect();
    while (results.hasNext()) {
      QuerySolution soln=results.nextSolution();
      Role role=getRole(soln.get("String_Node_Str").toString());
      roles.add(role);
    }
    vqe.close();
  }
 catch (  Exception e) {
    e.printStackTrace();
    return null;
  }
  return roles;
}

Fixed version (ground truth):
/** 
 * Retrievs roles of a user
 * @param username
 * @return
 */
public List<Role> getUserRoles(String usrname){
  List<Role> roles=new ArrayList<Role>();
  String username=usrname;
  String userURL=instancesPrefix + "String_Node_Str" + username;
  if (username.contains(instancesPrefix + "String_Node_Str")) {
    userURL=username;
    username=username.substring(username.lastIndexOf("String_Node_Str") + 1);
  }
  String sparql="String_Node_Str" + "String_Node_Str" + lSMOauthGraphURL + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ userURL+ "String_Node_Str"+ "String_Node_Str";
  try {
    String service=sparqlEndPoint;
    QueryExecution vqe=new QueryEngineHTTP(service,sparql);
    ResultSet results=vqe.execSelect();
    while (results.hasNext()) {
      QuerySolution soln=results.nextSolution();
      Role role=getRole(soln.get("String_Node_Str").toString());
      roles.add(role);
    }
    vqe.close();
  }
 catch (  Exception e) {
    logger.error("String_Node_Str",e);
    return null;
  }
  return roles;
}
Program: 15560
Project: 15560
Buggy source:
public List<Permission> getAllPermissions(){
  List<Permission> permissionList=null;
  String sparql="String_Node_Str" + "String_Node_Str" + lSMOauthGraphURL + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  try {
    String service=sparqlEndPoint;
    QueryExecution vqe=new QueryEngineHTTP(service,sparql);
    ResultSet results=vqe.execSelect();
    permissionList=new ArrayList<Permission>();
    while (results.hasNext()) {
      QuerySolution soln=results.nextSolution();
      String userId=soln.get("String_Node_Str").toString();
      Permission perm=getPermission(userId);
      permissionList.add(perm);
    }
    vqe.close();
  }
 catch (  Exception e) {
    e.printStackTrace();
    return null;
  }
  return permissionList;
}

Fixed version (ground truth):
public List<Permission> getAllPermissions(){
  List<Permission> permissionList=null;
  String sparql="String_Node_Str" + "String_Node_Str" + lSMOauthGraphURL + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str";
  try {
    String service=sparqlEndPoint;
    QueryExecution vqe=new QueryEngineHTTP(service,sparql);
    ResultSet results=vqe.execSelect();
    permissionList=new ArrayList<Permission>();
    while (results.hasNext()) {
      QuerySolution soln=results.nextSolution();
      String userId=soln.get("String_Node_Str").toString();
      Permission perm=getPermission(userId);
      permissionList.add(perm);
    }
    vqe.close();
  }
 catch (  Exception e) {
    logger.error("String_Node_Str",e);
    return null;
  }
  return permissionList;
}
Program: 15561
Project: 15561
Buggy source:
/** 
 * Retrieves a user by the email
 * @param email
 * @return
 */
public User getUserByEmail(String email){
  org.openiot.lsm.security.oauth.mgmt.User user=null;
  String sparql="String_Node_Str" + "String_Node_Str" + lSMOauthGraphURL + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ email+ "String_Node_Str";
  try {
    String service=sparqlEndPoint;
    QueryExecution vqe=new QueryEngineHTTP(service,sparql);
    ResultSet results=vqe.execSelect();
    while (results.hasNext()) {
      QuerySolution soln=results.nextSolution();
      user=getUser(soln.get("String_Node_Str").toString());
    }
    vqe.close();
  }
 catch (  Exception e) {
    e.printStackTrace();
    return null;
  }
  return user;
}

Fixed version (ground truth):
/** 
 * Retrieves a user by the email
 * @param email
 * @return
 */
public User getUserByEmail(String email){
  org.openiot.lsm.security.oauth.mgmt.User user=null;
  String sparql="String_Node_Str" + "String_Node_Str" + lSMOauthGraphURL + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ email+ "String_Node_Str";
  try {
    String service=sparqlEndPoint;
    QueryExecution vqe=new QueryEngineHTTP(service,sparql);
    ResultSet results=vqe.execSelect();
    while (results.hasNext()) {
      QuerySolution soln=results.nextSolution();
      user=getUser(soln.get("String_Node_Str").toString());
    }
    vqe.close();
  }
 catch (  Exception e) {
    logger.error("String_Node_Str",e);
    return null;
  }
  return user;
}
Program: 15562
Project: 15562
Buggy source:
public List<User> getRoleUsers(Role role){
  List<User> userList=new ArrayList<User>();
  String roleId=instancesPrefix + "String_Node_Str" + Role.toRoleIdStr(role);
  String sparql="String_Node_Str" + lSMOauthGraphURL + "String_Node_Str"+ "String_Node_Str"+ roleId+ "String_Node_Str";
  try {
    String service=sparqlEndPoint;
    QueryExecution vqe=new QueryEngineHTTP(service,sparql);
    ResultSet results=vqe.execSelect();
    while (results.hasNext()) {
      QuerySolution soln=results.nextSolution();
      String userId=soln.get("String_Node_Str").toString();
      User user=getUser(userId);
      userList.add(user);
    }
    vqe.close();
  }
 catch (  Exception e) {
    e.printStackTrace();
    return null;
  }
  return userList;
}

Fixed version (ground truth):
public List<User> getRoleUsers(Role role){
  List<User> userList=new ArrayList<User>();
  String roleId=instancesPrefix + "String_Node_Str" + Role.toRoleIdStr(role);
  String sparql="String_Node_Str" + lSMOauthGraphURL + "String_Node_Str"+ "String_Node_Str"+ roleId+ "String_Node_Str";
  try {
    String service=sparqlEndPoint;
    QueryExecution vqe=new QueryEngineHTTP(service,sparql);
    ResultSet results=vqe.execSelect();
    while (results.hasNext()) {
      QuerySolution soln=results.nextSolution();
      String userId=soln.get("String_Node_Str").toString();
      User user=getUser(userId);
      userList.add(user);
    }
    vqe.close();
  }
 catch (  Exception e) {
    if (logger.isErrorEnabled()) {
      logger.error("String_Node_Str" + role + "String_Node_Str",e);
    }
    return null;
  }
  return userList;
}
Program: 15563
Project: 15563
Buggy source:
public LSMRegisteredServiceImpl getRegisteredService(long serviceId){
  final LSMRegisteredServiceImpl registeredService=lsmOAuthHttpManager.getRegisteredService(serviceId);
  return registeredService;
}

Fixed version (ground truth):
public LSMRegisteredServiceImpl getRegisteredService(long serviceId){
  return lsmOAuthHttpManager.getRegisteredService(serviceId);
}
Program: 15564
Project: 15564
Buggy source:
@Override public LSMRegisteredServiceImpl addRegisteredService(LSMRegisteredServiceImpl registeredService){
  final boolean isNew=registeredService.getId() == -1;
  LSMRegisteredServiceImpl lsmRegisteredServiceImpl;
  if (registeredService instanceof LSMRegisteredServiceImpl)   lsmRegisteredServiceImpl=(LSMRegisteredServiceImpl)registeredService;
 else {
    lsmRegisteredServiceImpl=new LSMRegisteredServiceImpl();
    lsmRegisteredServiceImpl.copyFrom(registeredService);
  }
  if (isNew) {
    final List<RegisteredService> allRegisteredServices=getAllRegisteredServices();
    long id=1;
    if (allRegisteredServices != null)     for (    RegisteredService service : allRegisteredServices)     if (service.getId() >= id)     id=service.getId() + 1;
    lsmRegisteredServiceImpl.setId(id);
    lsmOAuthHttpManager.addRegisteredService(lsmRegisteredServiceImpl);
  }
 else {
    deleteRegisteredService(lsmRegisteredServiceImpl.getId());
    lsmOAuthHttpManager.addRegisteredService(lsmRegisteredServiceImpl);
  }
  return getRegisteredService(lsmRegisteredServiceImpl.getId());
}

Fixed version (ground truth):
@Override public LSMRegisteredServiceImpl addRegisteredService(LSMRegisteredServiceImpl registeredService){
  final boolean isNew=registeredService.getId() == -1;
  LSMRegisteredServiceImpl lsmRegisteredServiceImpl;
  if (registeredService instanceof LSMRegisteredServiceImpl) {
    lsmRegisteredServiceImpl=(LSMRegisteredServiceImpl)registeredService;
  }
 else {
    lsmRegisteredServiceImpl=new LSMRegisteredServiceImpl();
    lsmRegisteredServiceImpl.copyFrom(registeredService);
  }
  if (isNew) {
    final List<RegisteredService> allRegisteredServices=getAllRegisteredServices();
    long id=1;
    if (allRegisteredServices != null) {
      for (      RegisteredService service : allRegisteredServices) {
        if (service.getId() >= id) {
          id=service.getId() + 1;
        }
      }
    }
    lsmRegisteredServiceImpl.setId(id);
    lsmOAuthHttpManager.addRegisteredService(lsmRegisteredServiceImpl);
  }
 else {
    deleteRegisteredService(lsmRegisteredServiceImpl.getId());
    lsmOAuthHttpManager.addRegisteredService(lsmRegisteredServiceImpl);
  }
  return getRegisteredService(lsmRegisteredServiceImpl.getId());
}
Program: 15565
Project: 15565
Buggy source:
public synchronized static OAuthorizationCredentials login(){
  if (credentials == null) {
    logger.debug("String_Node_Str",username);
    OAuthorizationCredentials cred=acUtil.login(username,password);
    logger.debug("String_Node_Str",cred);
    credentials=cred;
    lastExpiryCheck=System.currentTimeMillis();
  }
  return credentials;
}

Fixed version (ground truth):
public synchronized static OAuthorizationCredentials login(){
  if (credentials == null) {
    acUtil.logout();
    logger.debug("String_Node_Str",username);
    OAuthorizationCredentials cred=acUtil.login(username,password);
    logger.debug("String_Node_Str",cred);
    credentials=cred;
    lastExpiryCheck=System.currentTimeMillis();
  }
  return credentials;
}
Program: 15567
Project: 15567
Buggy source:
public boolean initialize(){
  LSMSensorMetaData metadata;
  VSensorConfig vsensor=getVirtualSensorConfiguration();
  try {
    metadata=LSMRepository.getInstance().loadMetadata(vsensor);
  }
 catch (  Exception e) {
    e.printStackTrace();
    logger.error("String_Node_Str" + vsensor.getName());
    return false;
  }
  TreeMap<String,String> params=vsensor.getMainClassInitialParams();
  sensorName=vsensor.getName();
  for (  DataField df : vsensor.getOutputStructure()) {
    logger.info("String_Node_Str" + df.getName() + "String_Node_Str"+ df.getProperty());
    if (df.getProperty() != null)     fieldUris.put(df.getName().toUpperCase(),df.getProperty());
 else {
      String propUri=metadata.getFields().get(df.getName()).getLsmPropertyName();
      fieldUris.put(df.getName().toUpperCase(),propUri);
    }
  }
  String allow_nulls_str=params.get("String_Node_Str");
  if (allow_nulls_str != null)   allow_nulls=allow_nulls_str.equalsIgnoreCase("String_Node_Str");
  logger.info("String_Node_Str" + allow_nulls);
  String publishLsmStr=params.get("String_Node_Str");
  if (publishLsmStr != null)   publish_to_lsm=publishLsmStr.equalsIgnoreCase("String_Node_Str");
  for (int i=0; i < vsensor.getOutputStructure().length; i++) {
    fields.add(vsensor.getOutputStructure()[i].getName());
    logger.info(fields.get(i));
  }
  return true;
}

Fixed version (ground truth):
public boolean initialize(){
  LSMSensorMetaData metadata;
  VSensorConfig vsensor=getVirtualSensorConfiguration();
  try {
    metadata=LSMRepository.getInstance().loadMetadata(vsensor);
  }
 catch (  Exception e) {
    e.printStackTrace();
    logger.error("String_Node_Str" + vsensor.getName());
    return false;
  }
  TreeMap<String,String> params=vsensor.getMainClassInitialParams();
  sensorName=vsensor.getName();
  for (  DataField df : vsensor.getOutputStructure()) {
    logger.info("String_Node_Str" + df.getName() + "String_Node_Str"+ df.getProperty());
    if (df.getProperty() != null)     fieldUris.put(df.getName().toUpperCase(),df.getProperty());
 else {
      for (      LSMFieldMetaData md : metadata.getFields().values()) {
        if (md.getGsnFieldName().equals(df.getName()))         fieldUris.put(df.getName().toUpperCase(),md.getLsmPropertyName());
      }
    }
  }
  String allow_nulls_str=params.get("String_Node_Str");
  if (allow_nulls_str != null)   allow_nulls=allow_nulls_str.equalsIgnoreCase("String_Node_Str");
  logger.info("String_Node_Str" + allow_nulls);
  String publishLsmStr=params.get("String_Node_Str");
  if (publishLsmStr != null)   publish_to_lsm=publishLsmStr.equalsIgnoreCase("String_Node_Str");
  for (int i=0; i < vsensor.getOutputStructure().length; i++) {
    fields.add(vsensor.getOutputStructure()[i].getName());
    logger.info(fields.get(i));
  }
  return true;
}
Program: 15568
Project: 15568
Buggy source:
public static void main(String[] args){
  MobileBroker mb1=new MobileBroker(new File("String_Node_Str" + File.separator + "String_Node_Str"+ File.separator+ "String_Node_Str"));
  mb1.setNotificationListener(new NotificationListener(){
    @Override public void notify(    UUID subscriberId,    String subscriberName,    Publication publication){
      HashtablePublication notification=(HashtablePublication)publication;
      HashMap<String,Object> receivedData=notification.getProperties();
      System.out.println("String_Node_Str");
      System.out.println(publication);
      System.out.println();
    }
    @Override public void notify(    UUID subscriberId,    String subscriberName,    Subscription subscription){
    }
  }
);
  mb1.connect();
  File inputFolder=new File("String_Node_Str" + File.separator + "String_Node_Str");
  for (  File content : inputFolder.listFiles()) {
    if (content.getName().startsWith("String_Node_Str")) {
      mb1.announceFromXMLFile(content.getName());
    }
  }
  try {
    Thread.sleep(100);
  }
 catch (  InterruptedException e) {
    e.printStackTrace();
  }
  for (  File content : inputFolder.listFiles()) {
    if (content.getName().startsWith("String_Node_Str")) {
      mb1.publishFromXMLFile(content.getName());
    }
  }
}

Fixed version (ground truth):
public static void main(String[] args){
  String configFile=null;
  String inputFolderPath=null;
  try {
    configFile=args[0];
    inputFolderPath=args[1];
  }
 catch (  Exception e) {
    System.out.println("String_Node_Str");
    System.out.println("String_Node_Str");
    System.exit(-1);
  }
  MobileBroker mb1=new MobileBroker(new File(configFile));
  mb1.setNotificationListener(new NotificationListener(){
    @Override public void notify(    UUID subscriberId,    String subscriberName,    Publication publication){
      HashtablePublication notification=(HashtablePublication)publication;
      HashMap<String,Object> receivedData=notification.getProperties();
      System.out.println("String_Node_Str");
      System.out.println(publication);
      System.out.println();
    }
    @Override public void notify(    UUID subscriberId,    String subscriberName,    Subscription subscription){
    }
  }
);
  mb1.connect();
  File inputFolder=new File(inputFolderPath);
  for (  File content : inputFolder.listFiles()) {
    if (content.getName().startsWith("String_Node_Str")) {
      mb1.announceFromXMLFile(inputFolderPath + System.getProperty("String_Node_Str") + content.getName());
    }
  }
  try {
    Thread.sleep(1000);
  }
 catch (  InterruptedException e) {
    e.printStackTrace();
  }
  for (  File content : inputFolder.listFiles()) {
    if (content.getName().startsWith("String_Node_Str")) {
      mb1.publishFromXMLFile(inputFolderPath + System.getProperty("String_Node_Str") + content.getName());
    }
  }
}
Program: 15569
Project: 15569
Buggy source:
public static void main(String[] args) throws InterruptedException, IOException {
  Publisher publisher=new Publisher(new File("String_Node_Str" + File.separator + "String_Node_Str"+ File.separator+ "String_Node_Str"));
  publisher.connect();
  File publicationFolder=new File("String_Node_Str" + File.separator + "String_Node_Str");
  for (  File content : publicationFolder.listFiles()) {
    if (content.getName().startsWith("String_Node_Str")) {
      publisher.publishFromXMLFile(content.getName());
    }
  }
  publisher.disconnectFromBroker();
}

Fixed version (ground truth):
public static void main(String[] args) throws InterruptedException, IOException {
  String configFile=null;
  String publicationFolderPath=null;
  try {
    configFile=args[0];
    publicationFolderPath=args[1];
  }
 catch (  Exception e) {
    System.out.println("String_Node_Str");
    System.out.println("String_Node_Str");
    System.exit(-1);
  }
  Publisher publisher=new Publisher(new File(configFile));
  publisher.connect();
  File publicationFolder=new File(publicationFolderPath);
  for (  File content : publicationFolder.listFiles()) {
    if (content.getName().startsWith("String_Node_Str")) {
      publisher.publishFromXMLFile(publicationFolder + System.getProperty("String_Node_Str") + content.getName());
    }
  }
  Thread.sleep(1000);
  publisher.disconnectFromBroker();
}
Program: 15570
Project: 15570
Buggy source:
public static void main(String[] args){
  Subscriber subscriber=new Subscriber(new File("String_Node_Str" + File.separator + "String_Node_Str"+ File.separator+ "String_Node_Str"));
  subscriber.setNotificationListener(new NotificationListener(){
    @Override public void notify(    UUID subscriberId,    String subscriberName,    Publication publication){
      HashtablePublication notification=(HashtablePublication)publication;
      HashMap<String,Object> receivedData=notification.getProperties();
      System.out.println("String_Node_Str");
      System.out.println(publication);
      System.out.println();
    }
    @Override public void notify(    UUID subscriberId,    String subscriberName,    Subscription subscription){
    }
  }
);
  subscriber.connect();
  File subscriptionFolder=new File("String_Node_Str" + File.separator + "String_Node_Str");
  for (  File content : subscriptionFolder.listFiles()) {
    if (content.getName().startsWith("String_Node_Str")) {
      subscriber.subscribeFromXMLFile(content.getName());
    }
  }
}

Fixed version (ground truth):
public static void main(String[] args){
  String configFile=null;
  String subscriptionFolderPath=null;
  try {
    configFile=args[0];
    subscriptionFolderPath=args[1];
  }
 catch (  Exception e) {
    System.out.println("String_Node_Str");
    System.out.println("String_Node_Str");
    System.exit(-1);
  }
  Subscriber subscriber=new Subscriber(new File(configFile));
  subscriber.setNotificationListener(new NotificationListener(){
    @Override public void notify(    UUID subscriberId,    String subscriberName,    Publication publication){
      HashtablePublication notification=(HashtablePublication)publication;
      HashMap<String,Object> receivedData=notification.getProperties();
      System.out.println("String_Node_Str");
      System.out.println(publication);
      System.out.println();
    }
    @Override public void notify(    UUID subscriberId,    String subscriberName,    Subscription subscription){
    }
  }
);
  subscriber.connect();
  File subscriptionFolder=new File(subscriptionFolderPath);
  for (  File content : subscriptionFolder.listFiles()) {
    if (content.getName().startsWith("String_Node_Str")) {
      subscriber.subscribeFromXMLFile(subscriptionFolderPath + System.getProperty("String_Node_Str") + content.getName());
    }
  }
}
Program: 15571
Project: 15571
Buggy source:
/** 
 * method used for reading input XML file
 */
public void readFile(){
  try {
    BufferedReader in=new BufferedReader(new FileReader("String_Node_Str" + System.getProperty("String_Node_Str") + this.fileName));
    readBuffer(in);
  }
 catch (  FileNotFoundException e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
/** 
 * method used for reading input XML file
 */
public void readFile(){
  try {
    BufferedReader in=new BufferedReader(new FileReader(this.fileName));
    readBuffer(in);
  }
 catch (  FileNotFoundException e) {
    e.printStackTrace();
  }
}
Program: 15573
Project: 15573
Buggy source:
private Sensor processObjectRequestImpl(String api,String sensorInfo,String graphURL,String clientId,String token){
  Sensor sensor=null;
  try {
    SensorManager sensorManager=new SensorManager();
    sensorManager.setMetaGraph(graphURL);
switch (api) {
case "String_Node_Str":
      String permissionString="String_Node_Str";
    if (PermissionsUtil.getUserType(graphURL) == PermissionsUtil.GUESS_USER)     permissionString=PermissionsUtil.GET_SENSOR_GUESS;
 else     if (PermissionsUtil.getUserType(graphURL) == PermissionsUtil.DEMO_USER)     permissionString=PermissionsUtil.GET_SENSOR_DEMO;
 else     permissionString=PermissionsUtil.GET_SENSOR_MAIN;
  if (SecurityUtil.hasPermission(PermissionsUtil.LSM_ALL,getServletContext(),token,clientId) || SecurityUtil.hasPermission(permissionString,getServletContext(),token,clientId)) {
    sensor=sensorManager.getSpecifiedSensorWithSensorId(sensorInfo);
    logger.info(sensor.getId());
  }
 else   logger.info("String_Node_Str");
break;
default :
break;
}
}
 catch (Exception e) {
e.printStackTrace();
}
return sensor;
}

Fixed version (ground truth):
private Sensor processObjectRequestImpl(String api,String sensorInfo,String graphURL,String clientId,String token){
  Sensor sensor=null;
  try {
    SensorManager sensorManager=new SensorManager();
    sensorManager.setMetaGraph(graphURL);
switch (api) {
case "String_Node_Str":
      String permissionString="String_Node_Str";
    if (PermissionsUtil.getUserType(graphURL) == PermissionsUtil.GUESS_USER)     permissionString=PermissionsUtil.GET_SENSOR_GUESS;
 else     if (PermissionsUtil.getUserType(graphURL) == PermissionsUtil.DEMO_USER)     permissionString=PermissionsUtil.GET_SENSOR_DEMO;
 else     permissionString=PermissionsUtil.GET_SENSOR_MAIN;
  if (SecurityUtil.hasPermission(PermissionsUtil.LSM_ALL,getServletContext(),token,clientId) || SecurityUtil.hasPermission(permissionString,getServletContext(),token,clientId)) {
    sensor=sensorManager.getSpecificSensorWithSensorId(sensorInfo);
    logger.info(sensor.getId());
  }
 else   logger.info("String_Node_Str");
break;
default :
break;
}
}
 catch (Exception e) {
e.printStackTrace();
}
return sensor;
}
Program: 15574
Project: 15574
Buggy source:
public static String getMDataOfSensorTypeInArea(String lsmMetaGraph,double longitude,double latitude,float radius,String sensorType){
  StringBuilder update=new StringBuilder();
  String 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"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str" + lsmMetaGraph + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ sensorType+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ longitude+ "String_Node_Str"+ latitude+ "String_Node_Str"+ radius+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  logger.debug("String_Node_Str" + str);
  update.append(str);
  return update.toString();
}

Fixed version (ground truth):
public static String getMDataOfSensorTypeInArea(String lsmMetaGraph,double longitude,double latitude,float radius,String sensorType){
  StringBuilder update=new StringBuilder();
  String 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"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str" + lsmMetaGraph + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ sensorType+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ longitude+ "String_Node_Str"+ latitude+ "String_Node_Str"+ radius+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  logger.debug("String_Node_Str" + str);
  update.append(str);
  return update.toString();
}
Program: 15575
Project: 15575
Buggy source:
public static String getSensTypeInArea(String lsmMetaGraph,double longitude,double latitude,float radius){
  StringBuilder update=new StringBuilder();
  String str=("String_Node_Str" + "String_Node_Str" + lsmMetaGraph + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ longitude+ "String_Node_Str"+ latitude+ "String_Node_Str"+ radius+ "String_Node_Str"+ "String_Node_Str");
  logger.debug("String_Node_Str" + str);
  update.append(str);
  return update.toString();
}

Fixed version (ground truth):
public static String getSensTypeInArea(String lsmMetaGraph,double longitude,double latitude,float radius){
  StringBuilder update=new StringBuilder();
  String str=("String_Node_Str" + "String_Node_Str" + lsmMetaGraph + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ longitude+ "String_Node_Str"+ latitude+ "String_Node_Str"+ radius+ "String_Node_Str"+ "String_Node_Str");
  logger.debug("String_Node_Str" + str);
  update.append(str);
  return update.toString();
}
Program: 15576
Project: 15576
Buggy source:
public static String getMeasumerementDataTypeOfSensorTypeInArea(String lsmMetaGraph,double longitude,double latitude,float radius,String sensorType,String measurement,String unit){
  StringBuilder update=new StringBuilder();
  String str=("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str" + measurement + "String_Node_Str"+ "String_Node_Str"+ unit+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ lsmMetaGraph+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ sensorType+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ longitude+ "String_Node_Str"+ latitude+ "String_Node_Str"+ radius+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  update.append(str);
  return update.toString();
}

Fixed version (ground truth):
public static String getMeasumerementDataTypeOfSensorTypeInArea(String lsmMetaGraph,double longitude,double latitude,float radius,String sensorType,String measurement,String unit){
  StringBuilder update=new StringBuilder();
  String str=("String_Node_Str" + "String_Node_Str" + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str" + measurement + "String_Node_Str"+ "String_Node_Str"+ unit+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ lsmMetaGraph+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ sensorType+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ longitude+ "String_Node_Str"+ latitude+ "String_Node_Str"+ radius+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  update.append(str);
  return update.toString();
}
Program: 15577
Project: 15577
Buggy source:
public static String getMeasumerementAndUnitOfSensorTypeInArea(String lsmMetaGraph,double longitude,double latitude,float radius,String sensorType){
  StringBuilder update=new StringBuilder();
  String 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"+ "String_Node_Str"+ "String_Node_Str" + lsmMetaGraph + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ sensorType+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ longitude+ "String_Node_Str"+ latitude+ "String_Node_Str"+ radius+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  update.append(str);
  return update.toString();
}

Fixed version (ground truth):
public static String getMeasumerementAndUnitOfSensorTypeInArea(String lsmMetaGraph,double longitude,double latitude,float radius,String sensorType){
  StringBuilder update=new StringBuilder();
  String 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"+ "String_Node_Str"+ "String_Node_Str" + lsmMetaGraph + "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ sensorType+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ longitude+ "String_Node_Str"+ latitude+ "String_Node_Str"+ radius+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str"+ "String_Node_Str");
  update.append(str);
  return update.toString();
}
Program: 15579
Project: 15579
Buggy source:
@Override public void deleteTriples(String graphURL,String clientId,String token){
  HttpURLConnection conn=null;
  ObjectOutputStream dos=null;
  String api="String_Node_Str";
  String urlString=ObjectServletURL;
  try {
    URL url=new URL(urlString);
    conn=(HttpURLConnection)url.openConnection();
    conn.setDoInput(true);
    conn.setDoOutput(true);
    conn.setUseCaches(false);
    conn.setRequestMethod("String_Node_Str");
    conn.setRequestProperty("String_Node_Str",api);
    conn.setRequestProperty("String_Node_Str","String_Node_Str");
    conn.setRequestProperty("String_Node_Str","String_Node_Str");
    conn.setRequestProperty("String_Node_Str","String_Node_Str");
    RDFTuple tuple=new RDFTuple(graphURL,"String_Node_Str");
    dos=new ObjectOutputStream(conn.getOutputStream());
    dos.writeObject(tuple);
    dos.flush();
    dos.close();
    int responseCode=conn.getResponseCode();
    if (responseCode == HttpURLConnection.HTTP_OK) {
      BufferedReader reader=new BufferedReader(new InputStreamReader(conn.getInputStream()));
      String response=reader.readLine();
      logger.info(response);
    }
 else {
      logger.error("String_Node_Str" + responseCode);
    }
  }
 catch (  Exception ex) {
    logger.error("String_Node_Str",ex);
  }
}

Fixed version (ground truth):
@Override public void deleteTriples(String graphURL,String clientId,String token){
  HttpURLConnection conn=null;
  ObjectOutputStream dos=null;
  String api="String_Node_Str";
  String urlString=ObjectServletURL;
  try {
    URL url=new URL(urlString);
    conn=(HttpURLConnection)url.openConnection();
    conn.setDoInput(true);
    conn.setDoOutput(true);
    conn.setUseCaches(false);
    conn.setRequestMethod("String_Node_Str");
    conn.setRequestProperty("String_Node_Str",api);
    conn.setRequestProperty("String_Node_Str","String_Node_Str");
    conn.setRequestProperty("String_Node_Str","String_Node_Str");
    conn.setRequestProperty("String_Node_Str","String_Node_Str");
    conn.setRequestProperty("String_Node_Str",clientId);
    conn.setRequestProperty("String_Node_Str",token);
    RDFTuple tuple=new RDFTuple(graphURL,"String_Node_Str");
    dos=new ObjectOutputStream(conn.getOutputStream());
    dos.writeObject(tuple);
    dos.flush();
    dos.close();
    int responseCode=conn.getResponseCode();
    if (responseCode == HttpURLConnection.HTTP_OK) {
      BufferedReader reader=new BufferedReader(new InputStreamReader(conn.getInputStream()));
      String response=reader.readLine();
      logger.info(response);
    }
 else {
      logger.error("String_Node_Str" + responseCode);
    }
  }
 catch (  Exception ex) {
    logger.error("String_Node_Str",ex);
  }
}
Program: 15580
Project: 15580
Buggy source:
@Override public void uploadSchema(LSMSchema schema,String name,String clientId,String token){
  try {
    URL url=new URL(UPLOAD_URL);
    HttpURLConnection httpConn=(HttpURLConnection)url.openConnection();
    httpConn.setUseCaches(false);
    httpConn.setDoOutput(true);
    httpConn.setRequestMethod("String_Node_Str");
    httpConn.setRequestProperty("String_Node_Str",name);
    httpConn.setRequestProperty("String_Node_Str","String_Node_Str");
    OutputStream outputStream=httpConn.getOutputStream();
    logger.info("String_Node_Str");
    schema.getBase().write(outputStream,"String_Node_Str");
    logger.info("String_Node_Str");
    outputStream.close();
    int responseCode=httpConn.getResponseCode();
    if (responseCode == HttpURLConnection.HTTP_OK) {
      BufferedReader reader=new BufferedReader(new InputStreamReader(httpConn.getInputStream()));
      String response=reader.readLine();
      logger.info("String_Node_Str" + response);
    }
 else {
      logger.error("String_Node_Str" + responseCode);
    }
  }
 catch (  Exception e) {
    logger.error("String_Node_Str",e);
  }
}

Fixed version (ground truth):
@Override public void uploadSchema(LSMSchema schema,String name,String clientId,String token){
  try {
    URL url=new URL(UPLOAD_URL);
    HttpURLConnection httpConn=(HttpURLConnection)url.openConnection();
    httpConn.setUseCaches(false);
    httpConn.setDoOutput(true);
    httpConn.setRequestMethod("String_Node_Str");
    httpConn.setRequestProperty("String_Node_Str",name);
    httpConn.setRequestProperty("String_Node_Str","String_Node_Str");
    httpConn.setRequestProperty("String_Node_Str",clientId);
    httpConn.setRequestProperty("String_Node_Str",token);
    OutputStream outputStream=httpConn.getOutputStream();
    logger.info("String_Node_Str");
    schema.getBase().write(outputStream,"String_Node_Str");
    logger.info("String_Node_Str");
    outputStream.close();
    int responseCode=httpConn.getResponseCode();
    if (responseCode == HttpURLConnection.HTTP_OK) {
      BufferedReader reader=new BufferedReader(new InputStreamReader(httpConn.getInputStream()));
      String response=reader.readLine();
      logger.info("String_Node_Str" + response);
    }
 else {
      logger.error("String_Node_Str" + responseCode);
    }
  }
 catch (  Exception e) {
    logger.error("String_Node_Str",e);
  }
}
Program: 15581
Project: 15581
Buggy source:
public void deleteTriples(String graphName,String triples){
  Connection conn=null;
  try {
    logger.info("String_Node_Str");
    if (!VirtuosoConstantUtil.authorizedGraphs.contains(graphName)) {
      logger.info("String_Node_Str" + graphName);
      return;
    }
    conn=ConnectionManager.getConnectionPool().getConnection();
    String sql="String_Node_Str" + graphName + "String_Node_Str"+ triples+ "String_Node_Str";
    logger.info("String_Node_Str");
    logger.info("String_Node_Str" + sql);
    PreparedStatement ps=conn.prepareStatement(sql);
    boolean i=ps.execute(sql);
    System.out.println("String_Node_Str" + graphName);
    ConnectionManager.attemptClose(ps);
    ConnectionManager.attemptClose(conn);
  }
 catch (  Exception e) {
    logger.error("String_Node_Str",e);
    ConnectionManager.attemptClose(conn);
  }
}

Fixed version (ground truth):
public void deleteTriples(String graphName,String triples){
  Connection conn=null;
  try {
    logger.info("String_Node_Str");
    conn=ConnectionManager.getConnectionPool().getConnection();
    String sql="String_Node_Str" + graphName + "String_Node_Str"+ triples+ "String_Node_Str";
    logger.info("String_Node_Str");
    logger.info("String_Node_Str" + sql);
    PreparedStatement ps=conn.prepareStatement(sql);
    boolean i=ps.execute(sql);
    System.out.println("String_Node_Str" + graphName);
    ConnectionManager.attemptClose(ps);
    ConnectionManager.attemptClose(conn);
  }
 catch (  Exception e) {
    logger.error("String_Node_Str",e);
    ConnectionManager.attemptClose(conn);
  }
}
Program: 15583
Project: 15583
Buggy source:
public void clearGraph(String graphName){
  Connection conn=null;
  try {
    logger.info("String_Node_Str");
    if (!VirtuosoConstantUtil.authorizedGraphs.contains(graphName)) {
      logger.info("String_Node_Str" + graphName);
      return;
    }
    conn=ConnectionManager.getConnectionPool().getConnection();
    logger.info("String_Node_Str" + graphName);
    String sql="String_Node_Str" + graphName + "String_Node_Str";
    PreparedStatement ps=conn.prepareStatement(sql);
    boolean i=ps.execute(sql);
    logger.info("String_Node_Str" + graphName);
    ConnectionManager.attemptClose(ps);
    ConnectionManager.attemptClose(conn);
  }
 catch (  Exception e) {
    logger.error("String_Node_Str",e);
    ConnectionManager.attemptClose(conn);
  }
}

Fixed version (ground truth):
public void clearGraph(String graphName){
  Connection conn=null;
  try {
    logger.info("String_Node_Str");
    conn=ConnectionManager.getConnectionPool().getConnection();
    logger.info("String_Node_Str" + graphName);
    String sql="String_Node_Str" + graphName + "String_Node_Str";
    PreparedStatement ps=conn.prepareStatement(sql);
    boolean i=ps.execute(sql);
    logger.info("String_Node_Str" + graphName);
    ConnectionManager.attemptClose(ps);
    ConnectionManager.attemptClose(conn);
  }
 catch (  Exception e) {
    logger.error("String_Node_Str",e);
    ConnectionManager.attemptClose(conn);
  }
}
Program: 15585
Project: 15585
Buggy source:
public static void init(){
  SensorManager sensorManager=new SensorManager();
  logger.debug("String_Node_Str");
  List<RegisteredService> allRegisteredServices=sensorManager.getAllRegisteredServices();
  if (allRegisteredServices == null || allRegisteredServices.isEmpty()) {
    logger.debug("String_Node_Str");
    SecurityInitializer securityInitializer=new SecurityInitializer();
    securityInitializer.initialize();
  }
}

Fixed version (ground truth):
public static void init(){
  SensorManager sensorManager=new SensorManager();
  props=new PropertyManagement();
  String securityLsmGraphURL=props.getSecurityLsmGraphURL();
  sensorManager.setMetaGraph(securityLsmGraphURL);
  logger.debug("String_Node_Str");
  List<RegisteredService> allRegisteredServices=sensorManager.getAllRegisteredServices();
  if (allRegisteredServices == null || allRegisteredServices.isEmpty()) {
    logger.debug("String_Node_Str");
    SecurityInitializer securityInitializer=new SecurityInitializer(securityLsmGraphURL);
    securityInitializer.initialize();
  }
}
Program: 15586
Project: 15586
Buggy source:
private SecurityInitializer(){
  props=new PropertyManagement();
  lSMOauthGraphURL=props.getSecurityLsmGraphURL();
  helper=new OauthServletHelper();
  acUtil=AccessControlUtil.getRestInstance();
}

Fixed version (ground truth):
private SecurityInitializer(String graphURL){
  props=new PropertyManagement();
  lSMOauthGraphURL=graphURL;
  helper=new OauthServletHelper();
  acUtil=AccessControlUtil.getRestInstance();
}
Program: 15591
Project: 15591
Buggy source:
@Override public void logout(){
  reset();
}

Fixed version (ground truth):
@Override public void logout(){
}
Program: 15592
Project: 15592
Buggy source:
/** 
 * Clears the state information. Call this method before redirecting the user to re-login.
 */
public void reset(){
  getAuthorizationManager().reset();
}

Fixed version (ground truth):
/** 
 * Clears the state information.
 */
public void reset(){
  Subject subject=SecurityUtils.getSubject();
  if (subject.isAuthenticated())   getAuthorizationManager().clearCache(subject.getPrincipals());
}