nus-yam/ex-repair huggingface dataset:
Program: 188829
Project: 188829
Buggy source:
@Test public void createLogEntry() throws ModelServiceException {
  LogEntry entry=new LogEntry();
  entry.setActionComponent("String_Node_Str");
  entry.setActionMethod("String_Node_Str");
  entry.setAddress("String_Node_Str");
  entry.setId("String_Node_Str");
  entry.setDatetime(new Date());
  List<LogEntryParameter> parameters=new ArrayList<LogEntryParameter>();
  parameters.add(new LogEntryParameter("String_Node_Str","String_Node_Str"));
  parameters.add(new LogEntryParameter("String_Node_Str","String_Node_Str"));
  entry.setParameters(parameters);
  model.addLogEntry(entry,logPath);
}

Fixed version (ground truth):
@Test public void createLogEntry() throws ModelServiceException {
  createLogActionDirectory();
  LogEntry entry=new LogEntry();
  entry.setActionComponent("String_Node_Str");
  entry.setActionMethod("String_Node_Str");
  entry.setAddress("String_Node_Str");
  entry.setId("String_Node_Str");
  entry.setDatetime(new Date());
  List<LogEntryParameter> parameters=new ArrayList<LogEntryParameter>();
  parameters.add(new LogEntryParameter("String_Node_Str","String_Node_Str"));
  parameters.add(new LogEntryParameter("String_Node_Str","String_Node_Str"));
  entry.setParameters(parameters);
  model.addLogEntry(entry,logPath);
}
Program: 188831
Project: 188831
Buggy source:
protected void notifySipStateCreated(SIPReport state){
  for (  ModelObserver observer : observers) {
    observer.sipStateCreated(state);
  }
}

Fixed version (ground truth):
protected void notifySipStateCreated(SIPReport state){
  for (  ModelObserver observer : observers) {
    observer.sipReportCreated(state);
  }
}
Program: 188832
Project: 188832
Buggy source:
private Representation convertResourceToRepresentation(Resource resource) throws ModelServiceException {
  if (resource instanceof DefaultDirectory) {
    StoragePath directoryPath=resource.getStoragePath();
    Map<String,Set<String>> directoryMetadata=resource.getMetadata();
    Boolean active=ModelUtils.getBoolean(directoryMetadata,RodaConstants.STORAGE_META_ACTIVE);
    Date dateCreated=ModelUtils.getDate(directoryMetadata,RodaConstants.STORAGE_META_DATE_CREATED);
    Date dateModified=ModelUtils.getDate(directoryMetadata,RodaConstants.STORAGE_META_DATE_MODIFIED);
    Set<RepresentationState> statuses=ModelUtils.getStatuses(directoryMetadata);
    String type=ModelUtils.getString(directoryMetadata,RodaConstants.STORAGE_META_TYPE);
    List<String> fileIds=new ArrayList<String>();
    try {
      fileIds=ModelUtils.getIds(storage,resource.getStoragePath());
    }
 catch (    StorageServiceException e) {
      LOGGER.error("String_Node_Str" + directoryPath.asString());
    }
    if (active == null) {
      active=false;
    }
    return new Representation(directoryPath.getName(),ModelUtils.getAIPidFromStoragePath(directoryPath),active,dateCreated,dateModified,statuses,type,fileIds);
  }
 else {
    throw new ModelServiceException("String_Node_Str",ModelServiceException.INTERNAL_SERVER_ERROR);
  }
}

Fixed version (ground truth):
private Representation convertResourceToRepresentation(Resource resource) throws ModelServiceException {
  if (resource instanceof DefaultDirectory) {
    StoragePath directoryPath=resource.getStoragePath();
    Map<String,Set<String>> directoryMetadata=resource.getMetadata();
    Boolean active=ModelUtils.getBoolean(directoryMetadata,RodaConstants.STORAGE_META_ACTIVE);
    Date dateCreated=ModelUtils.getDate(directoryMetadata,RodaConstants.STORAGE_META_DATE_CREATED);
    Date dateModified=ModelUtils.getDate(directoryMetadata,RodaConstants.STORAGE_META_DATE_MODIFIED);
    Set<RepresentationState> statuses=ModelUtils.getStatuses(directoryMetadata);
    String type=ModelUtils.getString(directoryMetadata,RodaConstants.STORAGE_META_TYPE);
    List<String> fileIds=ModelUtils.getChildIds(storage,resource.getStoragePath(),true);
    if (active == null) {
      active=false;
    }
    return new Representation(directoryPath.getName(),ModelUtils.getAIPidFromStoragePath(directoryPath),active,dateCreated,dateModified,statuses,type,fileIds);
  }
 else {
    throw new ModelServiceException("String_Node_Str",ModelServiceException.INTERNAL_SERVER_ERROR);
  }
}
Program: 188836
Project: 188836
Buggy source:
private void initRODAServices() throws PluginException {
  try {
    CASUtility casUtility=new CASUtility(getCasURL(),getCoreURL());
    CASUserPrincipal cup=casUtility.getCASUserPrincipal(getUsername(),getPassword());
    new RODAClient(getRodaServicesURL(),cup,casUtility);
    this.fedoraClientUtility=new FedoraClientUtility(getFedoraURL(),getFedoraGSearchURL(),cup,casUtility);
    initOK=true;
  }
 catch (  Exception e) {
    logger.debug("String_Node_Str" + e.getMessage(),e);
    throw new PluginException("String_Node_Str" + e.getMessage(),e);
  }
}

Fixed version (ground truth):
private void initRODAServices() throws PluginException {
  try {
    CASUtility casUtility=new CASUtility(getCasURL(),getCoreURL());
    CASUserPrincipal cup=casUtility.getCASUserPrincipal(getUsername(),getPassword(),"String_Node_Str");
    new RODAClient(getRodaServicesURL(),cup,casUtility);
    this.fedoraClientUtility=new FedoraClientUtility(getFedoraURL(),getFedoraGSearchURL(),cup,casUtility);
    initOK=true;
  }
 catch (  Exception e) {
    logger.debug("String_Node_Str" + e.getMessage(),e);
    throw new PluginException("String_Node_Str" + e.getMessage(),e);
  }
}
Program: 188838
Project: 188838
Buggy source:
public void addLogEntry(LogEntry logEntry) throws StorageActionException {
  String entryJSON=ModelUtils.getJsonLogEntry(logEntry);
  Binary dailyLog;
  try {
    dailyLog=storage.getBinary(ModelUtils.getLogPath(new Date()));
  }
 catch (  StorageActionException sae) {
    dailyLog=storage.createBinary(ModelUtils.getLogPath(new Date()),new HashMap<>(),new JsonContentPayload("String_Node_Str"),false);
  }
  try {
    java.io.File f=new java.io.File(dailyLog.getContent().getURI().getPath());
    FileUtils.writeStringToFile(f,entryJSON,true);
  }
 catch (  IOException e) {
  }
  notifyLogEntryCreated(logEntry);
}

Fixed version (ground truth):
public void addLogEntry(LogEntry logEntry) throws StorageActionException {
  String entryJSON=ModelUtils.getJsonLogEntry(logEntry);
  Binary dailyLog;
  try {
    storage.createContainer(DefaultStoragePath.parse(RodaConstants.STORAGE_CONTAINER_ACTIONLOG),new HashMap<>());
  }
 catch (  StorageActionException sae) {
  }
  try {
    dailyLog=storage.getBinary(ModelUtils.getLogPath(new Date()));
  }
 catch (  StorageActionException sae) {
    dailyLog=storage.createBinary(ModelUtils.getLogPath(new Date()),new HashMap<>(),new JsonContentPayload("String_Node_Str"),false);
  }
  try {
    java.io.File f=new java.io.File(dailyLog.getContent().getURI().getPath());
    FileUtils.writeStringToFile(f,entryJSON,true);
  }
 catch (  IOException e) {
  }
  notifyLogEntryCreated(logEntry);
}
Program: 188839
Project: 188839
Buggy source:
public ModelService(StorageService storage) throws ModelServiceException {
  super();
  this.storage=storage;
  try {
    storage.createContainer(DefaultStoragePath.parse(RodaConstants.STORAGE_CONTAINER_ACTIONLOG),null);
  }
 catch (  StorageActionException sae) {
    throw new ModelServiceException("String_Node_Str",0);
  }
}

Fixed version (ground truth):
public ModelService(StorageService storage){
  super();
  this.storage=storage;
}
Program: 188840
Project: 188840
Buggy source:
@Test public void getAgentPreservationObject() throws ModelServiceException, StorageActionException {
  AgentPreservationObject apo=model.getAgentPreservationObject(CorporaConstants.AGENT_RODA_8_PREMIS_XML);
  assertEquals(apo.getAgentType(),CorporaConstants.SOFTWARE_INGEST_TASK);
  assertEquals(apo.getAgentName(),CorporaConstants.INGEST_CREATE_AIP);
}

Fixed version (ground truth):
@Test public void getAgentPreservationObject() throws ModelServiceException, StorageActionException {
  storage.copy(corporaService,DefaultStoragePath.parse(CorporaConstants.SOURCE_PRESERVATION_CONTAINER),DefaultStoragePath.parse(CorporaConstants.SOURCE_PRESERVATION_CONTAINER));
  AgentPreservationObject apo=model.getAgentPreservationObject(CorporaConstants.AGENT_RODA_8_PREMIS_XML);
  assertEquals(apo.getAgentType(),CorporaConstants.SOFTWARE_INGEST_TASK);
  assertEquals(apo.getAgentName(),CorporaConstants.INGEST_CREATE_AIP);
}
Program: 188841
Project: 188841
Buggy source:
@BeforeClass public static void setUp() throws IOException, StorageActionException, URISyntaxException, ModelServiceException {
  basePath=Files.createTempDirectory("String_Node_Str");
  storage=new FileStorageService(basePath);
  model=new ModelService(storage);
  URL corporaURL=ModelServiceTest.class.getResource("String_Node_Str");
  corporaPath=Paths.get(corporaURL.toURI());
  corporaService=new FileStorageService(corporaPath);
  storage.copy(corporaService,DefaultStoragePath.parse(CorporaConstants.SOURCE_PRESERVATION_CONTAINER),DefaultStoragePath.parse(CorporaConstants.SOURCE_PRESERVATION_CONTAINER));
  logger.debug("String_Node_Str" + basePath);
}

Fixed version (ground truth):
@BeforeClass public static void setUp() throws IOException, StorageActionException, URISyntaxException, ModelServiceException {
  basePath=Files.createTempDirectory("String_Node_Str");
  storage=new FileStorageService(basePath);
  model=new ModelService(storage);
  URL corporaURL=ModelServiceTest.class.getResource("String_Node_Str");
  corporaPath=Paths.get(corporaURL.toURI());
  corporaService=new FileStorageService(corporaPath);
  logger.debug("String_Node_Str" + basePath);
}
Program: 188842
Project: 188842
Buggy source:
@Test public void createLogEntry() throws ModelServiceException, StorageActionException {
  try {
    LogEntry entry=new LogEntry();
    entry.setAction("String_Node_Str");
    entry.setDatetime("String_Node_Str");
    entry.setDatetime("String_Node_Str");
    LogEntryParameter[] parameters=new LogEntryParameter[2];
    LogEntryParameter p1=new LogEntryParameter("String_Node_Str","String_Node_Str");
    LogEntryParameter p2=new LogEntryParameter("String_Node_Str","String_Node_Str");
    parameters[0]=p1;
    parameters[1]=p2;
    entry.setParameters(parameters);
    model.addLogEntry(entry);
  }
 catch (  Exception e) {
    e.printStackTrace();
  }
}

Fixed version (ground truth):
@Test public void createLogEntry() throws ModelServiceException, StorageActionException {
  LogEntry entry=new LogEntry();
  entry.setAction("String_Node_Str");
  entry.setAddress("String_Node_Str");
  entry.setDatetime("String_Node_Str");
  LogEntryParameter[] parameters=new LogEntryParameter[2];
  LogEntryParameter p1=new LogEntryParameter("String_Node_Str","String_Node_Str");
  LogEntryParameter p2=new LogEntryParameter("String_Node_Str","String_Node_Str");
  parameters[0]=p1;
  parameters[1]=p2;
  entry.setParameters(parameters);
  model.addLogEntry(entry);
}
Program: 188845
Project: 188845
Buggy source:
private static boolean startXMPPToolBox(Properties configuration){
  setXMPPReplyTimeout(configuration);
  XMPPConnection connection=createAndStartConnection(configuration);
  addTraceListeners(connection);
  LOGGER.info("String_Node_Str");
  MediaServerComponent component;
  try {
    component=createXMPPComponent(configuration);
  }
 catch (  ComponentException e) {
    return false;
  }
  XMPPToolBox.getInstance().start(component,connection,configuration);
  LOGGER.info("String_Node_Str");
  return true;
}

Fixed version (ground truth):
private static void startXMPPToolBox(Properties configuration) throws InterruptedException {
  setXMPPReplyTimeout(configuration);
  XMPPConnection connection=null;
  while (true) {
    try {
      connection=createAndStartConnection(configuration);
      addTraceListeners(connection);
      LOGGER.info("String_Node_Str");
      break;
    }
 catch (    Exception e) {
      LOGGER.error("String_Node_Str",e);
    }
    Thread.sleep(30000);
  }
  MediaServerComponent component=null;
  while (true) {
    try {
      component=createXMPPComponent(configuration);
      LOGGER.info("String_Node_Str");
      break;
    }
 catch (    Exception e) {
      LOGGER.error("String_Node_Str",e);
    }
    Thread.sleep(30000);
  }
  XMPPToolBox.getInstance().start(component,connection,configuration);
}
Program: 188846
Project: 188846
Buggy source:
private static XMPPConnection createAndStartConnection(Properties configuration){
  String serviceName=configuration.getProperty(MediaServerConfiguration.XMPP_CONNECTION_SERVICENAME);
  String host=configuration.getProperty(MediaServerConfiguration.XMPP_CONNECTION_HOST);
  String userName=configuration.getProperty(MediaServerConfiguration.XMPP_CONNECTION_USERNAME);
  ConnectionConfiguration cc=new ConnectionConfiguration(host,Integer.parseInt(configuration.getProperty(MediaServerConfiguration.XMPP_CONNECTION_PORT)),serviceName);
  cc.setSASLAuthenticationEnabled(Boolean.valueOf(configuration.getProperty(MediaServerConfiguration.XMPP_CONNECTION_SASL)));
  cc.setSecurityMode(SecurityMode.valueOf(configuration.getProperty(MediaServerConfiguration.XMPP_CONNECTION_SECURITY)));
  XMPPConnection connection=new XMPPConnection(cc);
  try {
    connection.connect();
    connection.login(userName,configuration.getProperty(MediaServerConfiguration.XMPP_CONNECTION_PASSWORD));
  }
 catch (  org.jivesoftware.smack.XMPPException e) {
    LOGGER.error("String_Node_Str",e);
    throw new com.buddycloud.mediaserver.commons.exception.XMPPException(e.getMessage(),e);
  }
  return connection;
}

Fixed version (ground truth):
private static XMPPConnection createAndStartConnection(Properties configuration){
  String serviceName=configuration.getProperty(MediaServerConfiguration.XMPP_CONNECTION_SERVICENAME);
  String host=configuration.getProperty(MediaServerConfiguration.XMPP_CONNECTION_HOST);
  String userName=configuration.getProperty(MediaServerConfiguration.XMPP_CONNECTION_USERNAME);
  ConnectionConfiguration cc=new ConnectionConfiguration(host,Integer.parseInt(configuration.getProperty(MediaServerConfiguration.XMPP_CONNECTION_PORT)),serviceName);
  cc.setSASLAuthenticationEnabled(Boolean.valueOf(configuration.getProperty(MediaServerConfiguration.XMPP_CONNECTION_SASL)));
  cc.setSecurityMode(SecurityMode.valueOf(configuration.getProperty(MediaServerConfiguration.XMPP_CONNECTION_SECURITY)));
  XMPPConnection connection=new XMPPConnection(cc);
  try {
    connection.connect();
    connection.login(userName,configuration.getProperty(MediaServerConfiguration.XMPP_CONNECTION_PASSWORD));
  }
 catch (  org.jivesoftware.smack.XMPPException e) {
    LOGGER.error("String_Node_Str",e);
    try {
      connection.disconnect();
    }
 catch (    Exception e2) {
    }
    throw new com.buddycloud.mediaserver.commons.exception.XMPPException(e.getMessage(),e);
  }
  return connection;
}
Program: 188847
Project: 188847
Buggy source:
public static void main(String[] args){
  Properties configuration=MediaServerConfiguration.getInstance().getConfiguration();
  try {
    startRestletComponent(configuration);
  }
 catch (  Exception e) {
    LOGGER.error("String_Node_Str",e);
    System.exit(1);
  }
  try {
    while (!startXMPPToolBox(configuration)) {
      Thread.sleep(5000);
    }
  }
 catch (  Exception e) {
    LOGGER.error("String_Node_Str",e);
  }
  keepAlive();
}

Fixed version (ground truth):
public static void main(String[] args) throws InterruptedException {
  Properties configuration=MediaServerConfiguration.getInstance().getConfiguration();
  try {
    startRestletComponent(configuration);
  }
 catch (  Exception e) {
    LOGGER.error("String_Node_Str",e);
    System.exit(1);
  }
  startXMPPToolBox(configuration);
  keepAlive();
}
Program: 188848
Project: 188848
Buggy source:
public void storeMedia(Media media) throws MetadataSourceException {
  LOGGER.debug("String_Node_Str" + media.getId());
  PreparedStatement statement=null;
  try {
    statement=prepareStatement(Queries.SAVE_MEDIA,media.getId(),media.getFileName(),media.getEntityId(),media.getAuthor(),media.getTitle(),media.getDescription(),media.getMimeType(),media.getFileExtension(),media.getShaChecksum(),media.getFileSize(),media.getLength(),media.getHeight(),media.getWidth());
    statement.execute();
    LOGGER.debug("String_Node_Str" + media.getId());
  }
 catch (  SQLException e) {
    LOGGER.error("String_Node_Str",e);
    throw new MetadataSourceException(e.getMessage(),e);
  }
 finally {
    close(statement);
  }
}

Fixed version (ground truth):
public void storeMedia(Media media) throws MetadataSourceException {
  LOGGER.debug("String_Node_Str" + media.getId());
  PreparedStatement statement=null;
  try {
    String extension=media.getFileExtension();
    if (null == extension) {
      extension="String_Node_Str";
    }
    statement=prepareStatement(Queries.SAVE_MEDIA,media.getId(),media.getFileName(),media.getEntityId(),media.getAuthor(),media.getTitle(),media.getDescription(),media.getMimeType(),extension,media.getShaChecksum(),media.getFileSize(),media.getLength(),media.getHeight(),media.getWidth());
    statement.execute();
    LOGGER.debug("String_Node_Str" + media.getId());
  }
 catch (  SQLException e) {
    LOGGER.error("String_Node_Str",e);
    throw new MetadataSourceException(e.getMessage(),e);
  }
 finally {
    close(statement);
  }
}
Program: 188850
Project: 188850
Buggy source:
@Override protected void testSetUp() throws Exception {
  File destDir=new File(configuration.getProperty(MediaServerConfiguration.MEDIA_STORAGE_ROOT_PROPERTY) + File.separator + BASE_CHANNEL);
  if (!destDir.mkdir()) {
    FileUtils.cleanDirectory(destDir);
  }
  fileToDelete=new File(destDir + File.separator + MEDIA_ID);
  FileUtils.copyFile(new File(TEST_FILE_PATH + TEST_AVATAR_NAME),fileToDelete);
  Media media=buildMedia(MEDIA_ID,TEST_FILE_PATH + TEST_AVATAR_NAME);
  dataSource.storeMedia(media);
  dataSource.storeAvatar(media);
  AuthVerifier authClient=xmppTest.getAuthVerifier();
  EasyMock.expect(authClient.verifyRequest(EasyMock.matches(BASE_USER),EasyMock.matches(BASE_TOKEN),EasyMock.startsWith(URL))).andReturn(true);
  PubSubClient pubSubClient=xmppTest.getPubSubClient();
  EasyMock.expect(pubSubClient.matchUserCapability(EasyMock.matches(BASE_USER),EasyMock.matches(BASE_CHANNEL),(CapabilitiesDecorator)EasyMock.notNull())).andReturn(true);
  EasyMock.replay(authClient);
  EasyMock.replay(pubSubClient);
}

Fixed version (ground truth):
@Override protected void testSetUp() throws Exception {
  setupFilesAndDB();
  setupMocks();
}
Program: 188851
Project: 188851
Buggy source:
@Test public void deleteAvatar() throws Exception {
  ClientResource client=new ClientResource(URL);
  client.setChallengeResponse(ChallengeScheme.HTTP_BASIC,BASE_USER,BASE_TOKEN);
  client.delete();
  Assert.assertFalse(fileToDelete.exists());
}

Fixed version (ground truth):
@Test public void deleteAvatar() throws Exception {
  ClientResource client=new ClientResource(URL);
  client.setChallengeResponse(ChallengeScheme.HTTP_BASIC,BASE_USER,BASE_TOKEN);
  client.delete();
  assertFalse(fileToDelete.exists());
}
Program: 188852
Project: 188852
Buggy source:
public void testTearDown() throws Exception {
}

Fixed version (ground truth):
public void testTearDown() throws Exception {
  EasyMock.verify(authClient);
  EasyMock.verify(pubSubClient);
  EasyMock.reset(authClient);
  EasyMock.reset(pubSubClient);
}
Program: 188853
Project: 188853
Buggy source:
@Test public void deleteAvatarParamAuth() throws Exception {
  Base64 encoder=new Base64(true);
  String authStr=BASE_USER + "String_Node_Str" + BASE_TOKEN;
  ClientResource client=new ClientResource(URL + "String_Node_Str" + new String(encoder.encode(authStr.getBytes())));
  client.delete();
  Assert.assertFalse(fileToDelete.exists());
}

Fixed version (ground truth):
@Test public void deleteAvatarParamAuth() throws Exception {
  Base64 encoder=new Base64(true);
  String authStr=BASE_USER + "String_Node_Str" + BASE_TOKEN;
  ClientResource client=new ClientResource(URL + "String_Node_Str" + new String(encoder.encode(authStr.getBytes())));
  client.delete();
  assertFalse(fileToDelete.exists());
}
Program: 188854
Project: 188854
Buggy source:
@Override protected void testSetUp() throws Exception {
  File destDir=new File(configuration.getProperty(MediaServerConfiguration.MEDIA_STORAGE_ROOT_PROPERTY) + File.separator + BASE_CHANNEL);
  if (!destDir.mkdir()) {
    FileUtils.cleanDirectory(destDir);
  }
  fileToDelete=new File(destDir + File.separator + MEDIA_ID);
  FileUtils.copyFile(new File(TEST_FILE_PATH + TEST_IMAGE_NAME),fileToDelete);
  Media media=buildMedia(MEDIA_ID,TEST_FILE_PATH + TEST_IMAGE_NAME);
  dataSource.storeMedia(media);
  AuthVerifier authClient=xmppTest.getAuthVerifier();
  EasyMock.expect(authClient.verifyRequest(EasyMock.matches(BASE_USER),EasyMock.matches(BASE_TOKEN),EasyMock.startsWith(URL))).andReturn(true);
  PubSubClient pubSubClient=xmppTest.getPubSubClient();
  EasyMock.expect(pubSubClient.matchUserCapability(EasyMock.matches(BASE_USER),EasyMock.matches(BASE_CHANNEL),(CapabilitiesDecorator)EasyMock.notNull())).andReturn(true);
  EasyMock.replay(authClient);
  EasyMock.replay(pubSubClient);
}

Fixed version (ground truth):
@Override protected void testSetUp() throws Exception {
  setupFilesAndDB();
  setupMocks();
}
Program: 188855
Project: 188855
Buggy source:
@Test public void deleteMedia() throws Exception {
  ClientResource client=new ClientResource(URL);
  client.setChallengeResponse(ChallengeScheme.HTTP_BASIC,BASE_USER,BASE_TOKEN);
  client.delete();
  Assert.assertFalse(fileToDelete.exists());
}

Fixed version (ground truth):
@Test public void deleteMedia() throws Exception {
  ClientResource client=new ClientResource(URL);
  client.setChallengeResponse(ChallengeScheme.HTTP_BASIC,BASE_USER,BASE_TOKEN);
  client.delete();
  assertFalse(fileToDelete.exists());
}
Program: 188856
Project: 188856
Buggy source:
public void testTearDown() throws Exception {
}

Fixed version (ground truth):
public void testTearDown() throws Exception {
  EasyMock.verify(authClient);
  EasyMock.verify(pubSubClient);
  EasyMock.reset(authClient);
  EasyMock.reset(pubSubClient);
}
Program: 188857
Project: 188857
Buggy source:
@Test public void deleteMediaParamAuth() throws Exception {
  Base64 encoder=new Base64(true);
  String authStr=BASE_USER + "String_Node_Str" + BASE_TOKEN;
  ClientResource client=new ClientResource(URL + "String_Node_Str" + new String(encoder.encode(authStr.getBytes())));
  client.delete();
  Assert.assertFalse(fileToDelete.exists());
}

Fixed version (ground truth):
@Test public void deleteMediaParamAuth() throws Exception {
  Base64 encoder=new Base64(true);
  String authStr=BASE_USER + "String_Node_Str" + BASE_TOKEN;
  ClientResource client=new ClientResource(URL + "String_Node_Str" + new String(encoder.encode(authStr.getBytes())));
  client.delete();
  assertFalse(fileToDelete.exists());
}
Program: 188858
Project: 188858
Buggy source:
public static String getBareId(String userId){
  return userId.split("String_Node_Str")[0];
}

Fixed version (ground truth):
public static String getBareId(String userId){
  return userId != null ? userId.split("String_Node_Str")[0] : null;
}
Program: 188860
Project: 188860
Buggy source:
@Post("String_Node_Str") public Representation postWebFormMedia(Representation entity){
  setServerHeader();
  Request request=getRequest();
  String auth=getQueryValue(Constants.AUTH_QUERY);
  String userId=null;
  String token=null;
  try {
    userId=getUserId(request,auth);
    token=getTransactionId(request,auth);
  }
 catch (  Throwable t) {
    setStatus(Status.CLIENT_ERROR_BAD_REQUEST);
    return new StringRepresentation(t.getLocalizedMessage(),MediaType.APPLICATION_JSON);
  }
  Representation verifyRequest=verifyRequest(userId,token,request.getResourceRef().getIdentifier());
  if (verifyRequest != null) {
    return verifyRequest;
  }
  MediaDAO mediaDAO=DAOFactory.getInstance().getDAO();
  String entityId=(String)request.getAttributes().get(Constants.ENTITY_ARG);
  String result="String_Node_Str";
  try {
    if (MediaType.MULTIPART_FORM_DATA.equals(entity.getMediaType(),true)) {
      result=mediaDAO.insertFormDataMedia(userId,entityId,getRequest(),false);
    }
 else {
      result=mediaDAO.insertWebFormMedia(userId,entityId,new Form(entity),false);
    }
    setStatus(Status.SUCCESS_CREATED);
  }
 catch (  FileUploadException e) {
    setStatus(Status.CLIENT_ERROR_BAD_REQUEST);
  }
catch (  UserNotAllowedException e) {
    setStatus(Status.CLIENT_ERROR_FORBIDDEN);
  }
catch (  Throwable t) {
    return unexpectedError(t);
  }
  return new StringRepresentation(result,MediaType.APPLICATION_JSON);
}

Fixed version (ground truth):
@Post("String_Node_Str") public Representation postWebFormMedia(Representation entity){
  setServerHeader();
  Request request=getRequest();
  String auth=getQueryValue(Constants.AUTH_QUERY);
  String userId=null;
  String token=null;
  try {
    userId=getUserId(request,auth);
    token=getTransactionId(request,auth);
  }
 catch (  Throwable t) {
    setStatus(Status.CLIENT_ERROR_BAD_REQUEST);
    return new StringRepresentation(t.getLocalizedMessage(),MediaType.APPLICATION_JSON);
  }
  Representation checkRequest=checkRequest(userId,token,request.getResourceRef().getIdentifier());
  if (checkRequest != null) {
    return checkRequest;
  }
  MediaDAO mediaDAO=DAOFactory.getInstance().getDAO();
  String entityId=(String)request.getAttributes().get(Constants.ENTITY_ARG);
  String result="String_Node_Str";
  try {
    if (MediaType.MULTIPART_FORM_DATA.equals(entity.getMediaType(),true)) {
      result=mediaDAO.insertFormDataMedia(userId,entityId,getRequest(),false);
    }
 else {
      result=mediaDAO.insertWebFormMedia(userId,entityId,new Form(entity),false);
    }
    setStatus(Status.SUCCESS_CREATED);
  }
 catch (  FileUploadException e) {
    setStatus(Status.CLIENT_ERROR_BAD_REQUEST);
  }
catch (  UserNotAllowedException e) {
    setStatus(Status.CLIENT_ERROR_FORBIDDEN);
  }
catch (  Throwable t) {
    return unexpectedError(t);
  }
  return new StringRepresentation(result,MediaType.APPLICATION_JSON);
}
Program: 188862
Project: 188862
Buggy source:
/** 
 * Deletes media (DELETE /<channel>/<mediaId>) 
 */
@Delete public Representation deleteMedia(){
  setServerHeader();
  Request request=getRequest();
  String auth=getQueryValue(Constants.AUTH_QUERY);
  String userId=null;
  String token=null;
  try {
    userId=getUserId(request,auth);
    token=getTransactionId(request,auth);
  }
 catch (  Throwable t) {
    setStatus(Status.CLIENT_ERROR_BAD_REQUEST);
    return new StringRepresentation("String_Node_Str",MediaType.APPLICATION_JSON);
  }
  Representation verifyRequest=verifyRequest(userId,token,request.getResourceRef().getIdentifier());
  if (verifyRequest != null) {
    return verifyRequest;
  }
  String entityId=(String)request.getAttributes().get(Constants.ENTITY_ARG);
  String mediaId=(String)request.getAttributes().get(Constants.MEDIA_ARG);
  MediaDAO mediaDAO=DAOFactory.getInstance().getDAO();
  try {
    mediaDAO.deleteMedia(userId,entityId,mediaId);
    return new StringRepresentation("String_Node_Str",MediaType.APPLICATION_JSON);
  }
 catch (  MetadataSourceException e) {
    setStatus(Status.SERVER_ERROR_INTERNAL);
  }
catch (  MediaNotFoundException e) {
    setStatus(Status.CLIENT_ERROR_NOT_FOUND);
  }
catch (  UserNotAllowedException e) {
    setStatus(Status.CLIENT_ERROR_FORBIDDEN);
  }
catch (  Throwable t) {
    return unexpectedError(t);
  }
  return new EmptyRepresentation();
}

Fixed version (ground truth):
/** 
 * Deletes media (DELETE /<channel>/<mediaId>) 
 */
@Delete public Representation deleteMedia(){
  setServerHeader();
  Request request=getRequest();
  String auth=getQueryValue(Constants.AUTH_QUERY);
  String userId=null;
  String token=null;
  try {
    userId=getUserId(request,auth);
    token=getTransactionId(request,auth);
  }
 catch (  Throwable t) {
    setStatus(Status.CLIENT_ERROR_BAD_REQUEST);
    return new StringRepresentation("String_Node_Str",MediaType.APPLICATION_JSON);
  }
  Representation verifyRequest=checkRequest(userId,token,request.getResourceRef().getIdentifier());
  if (verifyRequest != null) {
    return verifyRequest;
  }
  String entityId=(String)request.getAttributes().get(Constants.ENTITY_ARG);
  String mediaId=(String)request.getAttributes().get(Constants.MEDIA_ARG);
  MediaDAO mediaDAO=DAOFactory.getInstance().getDAO();
  try {
    mediaDAO.deleteMedia(userId,entityId,mediaId);
    return new StringRepresentation("String_Node_Str",MediaType.APPLICATION_JSON);
  }
 catch (  MetadataSourceException e) {
    setStatus(Status.SERVER_ERROR_INTERNAL);
  }
catch (  MediaNotFoundException e) {
    setStatus(Status.CLIENT_ERROR_NOT_FOUND);
  }
catch (  UserNotAllowedException e) {
    setStatus(Status.CLIENT_ERROR_FORBIDDEN);
  }
catch (  Throwable t) {
    return unexpectedError(t);
  }
  return new EmptyRepresentation();
}
Program: 188864
Project: 188864
Buggy source:
/** 
 * Updates media (POST /<channel>/<mediaId>) 
 */
@Post("String_Node_Str") public Representation updateMedia(Representation entity){
  setServerHeader();
  Request request=getRequest();
  String auth=getQueryValue(Constants.AUTH_QUERY);
  String userId=null;
  String token=null;
  try {
    userId=getUserId(request,auth);
    token=getTransactionId(request,auth);
  }
 catch (  Throwable t) {
    setStatus(Status.CLIENT_ERROR_BAD_REQUEST);
    return new StringRepresentation("String_Node_Str",MediaType.APPLICATION_JSON);
  }
  Representation verifyRequest=verifyRequest(userId,token,request.getResourceRef().getIdentifier());
  if (verifyRequest != null) {
    return verifyRequest;
  }
  String entityId=(String)request.getAttributes().get(Constants.ENTITY_ARG);
  String mediaId=(String)request.getAttributes().get(Constants.MEDIA_ARG);
  MediaDAO mediaDAO=DAOFactory.getInstance().getDAO();
  try {
    return new StringRepresentation(mediaDAO.updateMedia(userId,entityId,mediaId,new Form(entity)),MediaType.APPLICATION_JSON);
  }
 catch (  MetadataSourceException e) {
    setStatus(Status.SERVER_ERROR_INTERNAL);
  }
catch (  MediaNotFoundException e) {
    setStatus(Status.CLIENT_ERROR_NOT_FOUND);
  }
catch (  UserNotAllowedException e) {
    setStatus(Status.CLIENT_ERROR_FORBIDDEN);
  }
catch (  Throwable t) {
    return unexpectedError(t);
  }
  return new EmptyRepresentation();
}

Fixed version (ground truth):
/** 
 * Updates media (POST /<channel>/<mediaId>) 
 */
@Post("String_Node_Str") public Representation updateMedia(Representation entity){
  setServerHeader();
  Request request=getRequest();
  String auth=getQueryValue(Constants.AUTH_QUERY);
  String userId=null;
  String token=null;
  try {
    userId=getUserId(request,auth);
    token=getTransactionId(request,auth);
  }
 catch (  Throwable t) {
    setStatus(Status.CLIENT_ERROR_BAD_REQUEST);
    return new StringRepresentation("String_Node_Str",MediaType.APPLICATION_JSON);
  }
  Representation verifyRequest=checkRequest(userId,token,request.getResourceRef().getIdentifier());
  if (verifyRequest != null) {
    return verifyRequest;
  }
  String entityId=(String)request.getAttributes().get(Constants.ENTITY_ARG);
  String mediaId=(String)request.getAttributes().get(Constants.MEDIA_ARG);
  MediaDAO mediaDAO=DAOFactory.getInstance().getDAO();
  try {
    return new StringRepresentation(mediaDAO.updateMedia(userId,entityId,mediaId,new Form(entity)),MediaType.APPLICATION_JSON);
  }
 catch (  MetadataSourceException e) {
    setStatus(Status.SERVER_ERROR_INTERNAL);
  }
catch (  MediaNotFoundException e) {
    setStatus(Status.CLIENT_ERROR_NOT_FOUND);
  }
catch (  UserNotAllowedException e) {
    setStatus(Status.CLIENT_ERROR_FORBIDDEN);
  }
catch (  Throwable t) {
    return unexpectedError(t);
  }
  return new EmptyRepresentation();
}
Program: 188865
Project: 188865
Buggy source:
protected Representation authenticationResponse(){
  List<ChallengeRequest> challengeRequests=new ArrayList<ChallengeRequest>();
  challengeRequests.add(new ChallengeRequest(ChallengeScheme.HTTP_BASIC,MediaServerApplication.REALM));
  Response response=getResponse();
  response.setChallengeRequests(challengeRequests);
  return response.getEntity();
}

Fixed version (ground truth):
protected Representation authenticationResponse(){
  List<ChallengeRequest> challengeRequests=new ArrayList<ChallengeRequest>();
  challengeRequests.add(new ChallengeRequest(ChallengeScheme.HTTP_BASIC,MediaServerApplication.REALM));
  StringRepresentation representation=new StringRepresentation("String_Node_Str",MediaType.APPLICATION_JSON);
  Response response=getResponse();
  response.setChallengeRequests(challengeRequests);
  response.setEntity(representation);
  return response.getEntity();
}
Program: 188866
Project: 188866
Buggy source:
protected String getFileExtension(String fileName,String mimeType){
  if (fileName != null) {
    return fileName.substring(fileName.indexOf("String_Node_Str") + 1);
  }
  return MimeTypeMapping.lookupExtension(mimeType);
}

Fixed version (ground truth):
protected String getFileExtension(String fileName,String mimeType){
  if (fileName != null) {
    String[] dotSplit=fileName.split("String_Node_Str");
    if (dotSplit.length > 1) {
      return dotSplit[dotSplit.length - 1];
    }
  }
  return MimeTypeMapping.lookupExtension(mimeType);
}
Program: 188867
Project: 188867
Buggy source:
protected Thumbnail getPreview(String entityId,String mediaId,Integer maxHeight,Integer maxWidth,String mediaDirectory) throws MetadataSourceException, IOException, InvalidPreviewFormatException, MediaNotFoundException {
  File media=new File(mediaDirectory + File.separator + mediaId);
  if (!media.exists()) {
    throw new MediaNotFoundException(mediaId,entityId);
  }
  String previewId=dataSource.getPreviewId(mediaId,maxHeight,maxWidth);
  if (previewId != null) {
    File preview=new File(mediaDirectory + File.separator + previewId);
    if (!preview.exists()) {
      dataSource.deletePreview(previewId);
    }
 else {
      return new Thumbnail(dataSource.getPreviewMimeType(mediaId),IOUtils.toByteArray(FileUtils.openInputStream(preview)));
    }
  }
 else {
    previewId=RandomStringUtils.randomAlphanumeric(20);
  }
  return buildNewPreview(media,mediaId,previewId,mediaDirectory,maxHeight,maxWidth);
}

Fixed version (ground truth):
protected Thumbnail getPreview(String entityId,String mediaId,Integer maxHeight,Integer maxWidth,String mediaDirectory) throws MetadataSourceException, IOException, InvalidPreviewFormatException, MediaNotFoundException {
  File media=new File(mediaDirectory + File.separator + mediaId);
  if (!media.exists()) {
    throw new MediaNotFoundException(mediaId,entityId);
  }
  String previewId=dataSource.getPreviewId(mediaId,maxHeight,maxWidth);
  if (previewId != null) {
    File preview=new File(mediaDirectory + File.separator + previewId);
    if (!preview.exists()) {
      dataSource.deletePreview(previewId);
    }
 else {
      return new Thumbnail(dataSource.getPreviewMimeType(previewId),IOUtils.toByteArray(FileUtils.openInputStream(preview)));
    }
  }
 else {
    previewId=RandomStringUtils.randomAlphanumeric(20);
  }
  return buildNewPreview(media,mediaId,previewId,mediaDirectory,maxHeight,maxWidth);
}
Program: 188868
Project: 188868
Buggy source:
public boolean verifyUser(String userId,String token,String url){
  try {
    IQ reply=SyncPacketSendUtil.getReply(component,createVerifyTokenPacket(userId,token,url));
    return reply.getType().equals(Type.result);
  }
 catch (  Exception e) {
    LOGGER.warn("String_Node_Str" + userId + "String_Node_Str");
  }
  return true;
}

Fixed version (ground truth):
public boolean verifyUser(String userId,String token,String url){
  try {
    IQ reply=SyncPacketSendUtil.getReply(component,createVerifyTokenPacket(userId,token,url));
    return reply.getType().equals(Type.result);
  }
 catch (  Exception e) {
    LOGGER.warn("String_Node_Str" + userId + "String_Node_Str");
  }
  return false;
}
Program: 188870
Project: 188870
Buggy source:
private void postProcessMetadata(){
  Log.debug("String_Node_Str");
  if (meta != null && processingID != 0) {
    for (    File file : processingIDFiles) {
      Log.debug("String_Node_Str" + file.toString());
      int maxTries=(Integer)options.valueOf("String_Node_Str");
      for (int i=0; i < maxTries; i++) {
        if (LockingFileTools.lockAndAppend(file,processingID + System.getProperty("String_Node_Str"))) {
          break;
        }
 else         if (i < maxTries) {
          ProcessTools.sleep((Integer)options.valueOf("String_Node_Str"));
        }
 else {
          ReturnValue retval=new ReturnValue();
          retval.printAndAppendtoStderr("String_Node_Str");
          retval.setExitStatus(ReturnValue.METADATAINVALIDIDCHAIN);
          meta.update_processing_event(processingID,retval);
          meta.update_processing_status(processingID,ProcessingStatus.failed);
          System.exit(retval.getExitStatus());
        }
      }
    }
    Log.debug("String_Node_Str");
    for (    File file : processingAccessionFiles) {
      Log.debug("String_Node_Str" + file.toString());
      writeProcessingAccessionToFile(file,true);
    }
    Log.debug("String_Node_Str");
    if (processingAccessionFileCheck != null) {
      writeProcessingAccessionToFile(processingAccessionFileCheck,false);
    }
    Log.debug("String_Node_Str");
    meta.update_processing_status(processingID,ProcessingStatus.success);
  }
}

Fixed version (ground truth):
private void postProcessMetadata(){
  Log.debug("String_Node_Str");
  if (meta != null && processingID != 0) {
    for (    File file : processingIDFiles) {
      Log.debug("String_Node_Str" + file.toString());
      this.writeStringToFile(file,true,processingID + System.getProperty("String_Node_Str"));
    }
    Log.debug("String_Node_Str");
    for (    File file : processingAccessionFiles) {
      Log.debug("String_Node_Str" + file.toString());
      writeStringToFile(file,true,processingAccession + System.getProperty("String_Node_Str"));
    }
    Log.debug("String_Node_Str");
    if (processingAccessionFileCheck != null) {
      writeStringToFile(processingAccessionFileCheck,true,processingAccession + System.getProperty("String_Node_Str"));
    }
    Log.debug("String_Node_Str");
    meta.update_processing_status(processingID,ProcessingStatus.success);
  }
}
Program: 188871
Project: 188871
Buggy source:
@Override public ReturnValue do_run(){
  try {
    File tempBundleFile=File.createTempFile("String_Node_Str","String_Node_Str");
    tempBundleFile.deleteOnExit();
    File tempSchedulerFile=File.createTempFile("String_Node_Str","String_Node_Str");
    tempSchedulerFile.deleteOnExit();
    if (!options.has(workflowAccessionSpec)) {
      runBundleManagerPlugin(options.valueOf(this.bundleDirSpec),tempBundleFile);
    }
 else {
      FileUtils.write(tempBundleFile,String.valueOf(options.valueOf(workflowAccessionSpec)));
    }
    runWorkflowSchedulerPlugin(tempBundleFile,tempSchedulerFile);
    runWorkflowLauncherPlugin(tempSchedulerFile);
    if (options.has(this.waitSpec)) {
      runWatcherPlugin();
    }
  }
 catch (  IOException e) {
    throw new ExitException(ReturnValue.FILENOTWRITABLE);
  }
 finally {
    if (!options.has(noRunSpec)) {
      runStatusCheckerPlugin();
    }
    if (metadata instanceof MetadataInMemory) {
      int workflowRunSWID=Integer.parseInt(workflowRunAccession);
      if (metadata.getWorkflowRun(workflowRunSWID).getStatus().equals(WorkflowRunStatus.failed)) {
        String stdout=metadata.getWorkflowRunReportStdOut(workflowRunSWID);
        String stderr=metadata.getWorkflowRunReportStdErr(workflowRunSWID);
        Log.stdoutWithTime("String_Node_Str" + stdout);
        Log.stderrWithTime("String_Node_Str" + stderr);
      }
    }
  }
  return new ReturnValue();
}

Fixed version (ground truth):
@Override public ReturnValue do_run(){
  boolean success=true;
  try {
    File tempBundleFile=File.createTempFile("String_Node_Str","String_Node_Str");
    tempBundleFile.deleteOnExit();
    File tempSchedulerFile=File.createTempFile("String_Node_Str","String_Node_Str");
    tempSchedulerFile.deleteOnExit();
    if (!options.has(workflowAccessionSpec)) {
      runBundleManagerPlugin(options.valueOf(this.bundleDirSpec),tempBundleFile);
    }
 else {
      FileUtils.write(tempBundleFile,String.valueOf(options.valueOf(workflowAccessionSpec)));
    }
    runWorkflowSchedulerPlugin(tempBundleFile,tempSchedulerFile);
    runWorkflowLauncherPlugin(tempSchedulerFile);
    if (options.has(this.waitSpec)) {
      runWatcherPlugin();
    }
  }
 catch (  IOException e) {
    throw new ExitException(ReturnValue.FILENOTWRITABLE);
  }
 finally {
    if (!options.has(noRunSpec)) {
      runStatusCheckerPlugin();
    }
    int workflowRunSWID=Integer.parseInt(workflowRunAccession);
    if (metadata instanceof MetadataInMemory) {
      if (metadata.getWorkflowRun(workflowRunSWID).getStatus().equals(WorkflowRunStatus.failed)) {
        String stdout=metadata.getWorkflowRunReportStdOut(workflowRunSWID);
        String stderr=metadata.getWorkflowRunReportStdErr(workflowRunSWID);
        Log.stdoutWithTime("String_Node_Str" + stdout);
        Log.stderrWithTime("String_Node_Str" + stderr);
      }
    }
    if (metadata.getWorkflowRun(workflowRunSWID).getStatus().equals(WorkflowRunStatus.failed)) {
      success=false;
    }
  }
  if (!success) {
    return new ReturnValue(ReturnValue.FAILURE);
  }
  return new ReturnValue();
}
Program: 188873
Project: 188873
Buggy source:
/** 
 */
private void populateNfsWorkDir(){
  File lib=new File(this.nfsWorkDir,"String_Node_Str");
  lib.mkdir();
}

Fixed version (ground truth):
/** 
 */
private void populateNfsWorkDir(){
  File lib=new File(this.nfsWorkDir,"String_Node_Str");
  boolean mkdir=lib.mkdir();
  if (!mkdir) {
    throw new RuntimeException("String_Node_Str");
  }
}
Program: 188874
Project: 188874
Buggy source:
public static String seqwareJarPath(AbstractWorkflowDataModel objectModel){
  return objectModel.getWorkflowBaseDir() + "String_Node_Str" + objectModel.getTags().get("String_Node_Str")+ "String_Node_Str";
}

Fixed version (ground truth):
private static String seqwareJarPath(AbstractWorkflowDataModel objectModel){
  return objectModel.getWorkflowBaseDir() + "String_Node_Str" + objectModel.getTags().get("String_Node_Str")+ "String_Node_Str";
}
Program: 188875
Project: 188875
Buggy source:
@Override public ReturnValue watchWorkflow(String jobToken){
  Metadata ws=MetadataFactory.get(ConfigTools.getSettings());
  WorkflowRun workflowRun=ws.getWorkflowRun(Integer.valueOf(jobToken));
  Log.stdout("String_Node_Str" + jobToken + "String_Node_Str"+ workflowRun.getStatus().name());
  return new ReturnValue(workflowRun.getStatus() == WorkflowRunStatus.completed ? ReturnValue.SUCCESS : ReturnValue.FAILURE);
}

Fixed version (ground truth):
@Override public ReturnValue watchWorkflow(String jobToken){
  Metadata ws=MetadataFactory.get(ConfigTools.getSettings());
  WorkflowRun workflowRun=ws.getWorkflowRun(Integer.parseInt(jobToken));
  Log.stdout("String_Node_Str" + jobToken + "String_Node_Str"+ workflowRun.getStatus().name());
  return new ReturnValue(workflowRun.getStatus() == WorkflowRunStatus.completed ? ReturnValue.SUCCESS : ReturnValue.FAILURE);
}
Program: 188876
Project: 188876
Buggy source:
public static File initNfsWorkDir(AbstractWorkflowDataModel model){
  try {
    File nfsWorkDir=FileTools.createDirectoryWithUniqueName(new File(model.getEnv().getOOZIE_WORK_DIR()),"String_Node_Str");
    nfsWorkDir.setWritable(true,false);
    System.out.println("String_Node_Str" + nfsWorkDir.getAbsolutePath());
    return nfsWorkDir;
  }
 catch (  IOException e) {
    throw rethrow(e);
  }
}

Fixed version (ground truth):
private static File initNfsWorkDir(AbstractWorkflowDataModel model){
  try {
    File nfsWorkDir=FileTools.createDirectoryWithUniqueName(new File(model.getEnv().getOOZIE_WORK_DIR()),"String_Node_Str");
    boolean setWritable=nfsWorkDir.setWritable(true,false);
    if (!setWritable) {
      throw new RuntimeException("String_Node_Str");
    }
    System.out.println("String_Node_Str" + nfsWorkDir.getAbsolutePath());
    return nfsWorkDir;
  }
 catch (  IOException e) {
    throw rethrow(e);
  }
}
Program: 188878
Project: 188878
Buggy source:
private static void create(List<String> args){
  if (isHelp(args,true)) {
    out("String_Node_Str");
    out("String_Node_Str");
    out("String_Node_Str");
    out("String_Node_Str");
    out("String_Node_Str");
    out("String_Node_Str");
    out("String_Node_Str");
    out("String_Node_Str");
    out("String_Node_Str");
    out("String_Node_Str");
    out("String_Node_Str");
    out("String_Node_Str");
    out("String_Node_Str");
    out("String_Node_Str");
    out("String_Node_Str");
    out("String_Node_Str");
    out("String_Node_Str");
    out("String_Node_Str");
  }
 else {
    String obj=args.remove(0);
    if ("String_Node_Str".equals(obj)) {
      createExperiment(args);
    }
 else     if ("String_Node_Str".equals(obj)) {
      createIus(args);
    }
 else     if ("String_Node_Str".equals(obj)) {
      createLane(args);
    }
 else     if ("String_Node_Str".equals(obj)) {
      createSample(args);
    }
 else     if ("String_Node_Str".equals(obj)) {
      createSequencerRun(args);
    }
 else     if ("String_Node_Str".equals(obj)) {
      createStudy(args);
    }
 else     if ("String_Node_Str".equals(obj)) {
      createWorkflow(args);
    }
 else     if ("String_Node_Str".equals(obj)) {
      createWorkflowRun(args);
    }
 else {
      kill("String_Node_Str",obj);
    }
  }
}

Fixed version (ground truth):
private static void create(List<String> args){
  if (isHelp(args,true)) {
    out("String_Node_Str");
    out("String_Node_Str");
    out("String_Node_Str");
    out("String_Node_Str");
    out("String_Node_Str");
    out("String_Node_Str");
    out("String_Node_Str");
    out("String_Node_Str");
    out("String_Node_Str");
    out("String_Node_Str");
    out("String_Node_Str");
    out("String_Node_Str");
    out("String_Node_Str");
    out("String_Node_Str");
    out("String_Node_Str");
    out("String_Node_Str");
    out("String_Node_Str");
  }
 else {
    String obj=args.remove(0);
    if ("String_Node_Str".equals(obj)) {
      createExperiment(args);
    }
 else     if ("String_Node_Str".equals(obj)) {
      createIus(args);
    }
 else     if ("String_Node_Str".equals(obj)) {
      createLane(args);
    }
 else     if ("String_Node_Str".equals(obj)) {
      createSample(args);
    }
 else     if ("String_Node_Str".equals(obj)) {
      createSequencerRun(args);
    }
 else     if ("String_Node_Str".equals(obj)) {
      createStudy(args);
    }
 else     if ("String_Node_Str".equals(obj)) {
      createWorkflow(args);
    }
 else     if ("String_Node_Str".equals(obj)) {
      createWorkflowRun(args);
    }
 else {
      kill("String_Node_Str",obj);
    }
  }
}
Program: 188880
Project: 188880
Buggy source:
@Test public void testSequencerRunSkipValue() throws IOException {
  annotateSkipImplicitly(AttributeType.SEQUENCER_RUN,4715);
}

Fixed version (ground truth):
@Test public void testSequencerRunSkipValue() throws IOException {
  ExtendedTestDatabaseCreator.resetDatabaseWithUsers();
  annotateSkipImplicitly(AttributeType.SEQUENCER_RUN,4715);
}
Program: 188881
Project: 188881
Buggy source:
@Test public void testSequencerRunAnnotateArbitrary() throws IOException {
  annotateAndReannotate(AttributeType.SEQUENCER_RUN,47150);
}

Fixed version (ground truth):
@Test public void testSequencerRunAnnotateArbitrary() throws IOException {
  ExtendedTestDatabaseCreator.resetDatabaseWithUsers();
  annotateAndReannotate(AttributeType.SEQUENCER_RUN,47150);
}
Program: 188882
Project: 188882
Buggy source:
@Test public void testSequencerRunSkipOnly() throws IOException {
  toggleSkipOnly(AttributeType.SEQUENCER_RUN,47150);
}

Fixed version (ground truth):
@Test public void testSequencerRunSkipOnly() throws IOException {
  ExtendedTestDatabaseCreator.resetDatabaseWithUsers();
  toggleSkipOnly(AttributeType.SEQUENCER_RUN,47150);
}
Program: 188883
Project: 188883
Buggy source:
@Test public void testSequencerRunAnnotateArbitrary() throws IOException {
  annotateAndReannotate(AttributeType.SEQUENCER_RUN,47150);
}

Fixed version (ground truth):
@Test public void testSequencerRunAnnotateArbitrary() throws IOException {
  ExtendedTestDatabaseCreator.resetDatabaseWithUsers();
  annotateAndReannotate(AttributeType.SEQUENCER_RUN,47150);
}
Program: 188884
Project: 188884
Buggy source:
@Test public void testSequencerRunSkipOnly() throws IOException {
  toggleSkipOnly(AttributeType.SEQUENCER_RUN,47150);
}

Fixed version (ground truth):
@Test public void testSequencerRunSkipOnly() throws IOException {
  ExtendedTestDatabaseCreator.resetDatabaseWithUsers();
  toggleSkipOnly(AttributeType.SEQUENCER_RUN,47150);
}