anon-iclr-submission/benchname-bug-localization huggingface dataset:
Repository: dougnoel/sentinel
Issue: Sometimes a wait of 0.002 seconds will make the next click go faster

Adding in a step of "And I wait 0.002 seconds" will make elements that couldn't be found on pop up divs suddenly found immediately. Not sure why this is, but I've found that taking the it down to a millisecond also works. Solution is to add a millisecond wait in front of every element discovery. I'm not a fan of this solution, but I don't have a better one at this time.

Changed files:
src/main/java/com/dougnoel/sentinel/elements/PageElement.java

diff --git a/src/main/java/com/dougnoel/sentinel/elements/PageElement.java b/src/main/java/com/dougnoel/sentinel/elements/PageElement.java
index f2a694b3..1cb62de7 100644
--- a/src/main/java/com/dougnoel/sentinel/elements/PageElement.java
+++ b/src/main/java/com/dougnoel/sentinel/elements/PageElement.java
@@ -99,7 +99,13 @@ public class PageElement {
 			       .withTimeout(timeout)
 			       .pollingEvery(interval)
 			       .ignoring(NoSuchElementException.class);
-		
+		try {
+			Thread.sleep(2); //Added to deal with intermittent issues that require 2 millisecond waits.
+		} catch (InterruptedException e) {
+			String message = StringUtils.format(
+					"Thread Interrupted: {}", e.getMessage());
+			log.error(message);
+		}
 		WebElement element = wait.until(new Function<WebDriver, WebElement>() {
 			public WebElement apply(WebDriver driver) {
 				return driver.findElement(locator);
Repository: dougnoel/sentinel
Issue: pageObjectPackages configuration option is spelled incorrectly in error message

When you do not have any pageObject Packages defined, an error is thrown asking you to set the value pageObjectPackage. It should be pageObjectPackages.

Though at this point we should probably just search the entire program for them and mark where they exist for future use.

Changed files:
src/main/java/com/dougnoel/sentinel/pages/PageFactory.java, src/main/java/com/dougnoel/sentinel/apis/APIFactory.java

diff --git a/src/main/java/com/dougnoel/sentinel/apis/APIFactory.java b/src/main/java/com/dougnoel/sentinel/apis/APIFactory.java
index 21691c84..c0fa8d34 100644
--- a/src/main/java/com/dougnoel/sentinel/apis/APIFactory.java
+++ b/src/main/java/com/dougnoel/sentinel/apis/APIFactory.java
@@ -76,7 +76,7 @@ public class APIFactory {
 			}
 		}
 		if(api == null) {
-			throw new ConfigurationNotFoundException("The API you want to test could not be built. At least one Page object package is required to run a test. Please add a pageObjectPackage property to your conf/sentinel.yml configuration file and try again.");
+			throw new ConfigurationNotFoundException("The API you want to test could not be built. At least one Page object package is required to run a test. Please add a pageObjectPackages property to your conf/sentinel.yml configuration file and try again.");
 		}
 		return api;
 	}
diff --git a/src/main/java/com/dougnoel/sentinel/pages/PageFactory.java b/src/main/java/com/dougnoel/sentinel/pages/PageFactory.java
index 928e6935..49d564fd 100644
--- a/src/main/java/com/dougnoel/sentinel/pages/PageFactory.java
+++ b/src/main/java/com/dougnoel/sentinel/pages/PageFactory.java
@@ -66,7 +66,7 @@ public class PageFactory {
 	 */
 	public static Page buildOrRetrievePage(String pageName) throws PageNotFoundException, ConfigurationNotFoundException {
 		Page page = pages.get(pageName);
-		final String errorMessage = "The page you want to test could not be built. At least one Page object package is required to run a test. Please add a pageObjectPackage property to your conf/sentinel.yml configuration file and try again.";
+		final String errorMessage = "The page you want to test could not be built. At least one Page object package is required to run a test. Please add a pageObjectPackages property to your conf/sentinel.yml configuration file and try again.";
 		if (page != null) {
 			return page;
 		} else {
Repository: dougnoel/sentinel
Issue: Custom element types in projects extending sentinel cause exception

1. use any test project that consumes sentinel and provides custom element types
2. reference an element of a custom element type anywhere in any test

Expected condition: sentinel loads the custom type, finds the element, and performs the step

Error seen: 
```
com.dougnoel.sentinel.exceptions.FileException: <path to page object file, redacted> could not find suitable class for element in this file. Caught

	at com.dougnoel.sentinel.elements.ElementFactory.createElement(ElementFactory.java:101)
	at com.dougnoel.sentinel.pages.Page.lambda$getElement$0(Page.java:77)
	at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1220)
	at com.dougnoel.sentinel.pages.Page.getElement(Page.java:77)
	at com.dougnoel.sentinel.elements.ElementFunctions.getElement(ElementFunctions.java:34)
```

This is caused by a recent change to the FileManager.getClassPath() method.

Changed files:
src/main/java/com/dougnoel/sentinel/system/FileManager.java

diff --git a/src/main/java/com/dougnoel/sentinel/system/FileManager.java b/src/main/java/com/dougnoel/sentinel/system/FileManager.java
index 202fadb2..eb44cab1 100644
--- a/src/main/java/com/dougnoel/sentinel/system/FileManager.java
+++ b/src/main/java/com/dougnoel/sentinel/system/FileManager.java
@@ -100,7 +100,7 @@ public class FileManager {
 	public static String getClassPath(String className) {
 		try {
 			String filePath = findFilePath(className + ".java").getPath();
-			String returnValue = convertPathSeparators(StringUtils.removeEnd(filePath, ".java"));
+			String returnValue = StringUtils.removeEnd(filePath, ".java").replace(File.separator, ".");
 			return StringUtils.substringAfter(returnValue, "java.");
 		} catch (FileException fe) {
 			return null;
Repository: dougnoel/sentinel
Issue: Fix Unit Test Timeouts

We keep getting timeouts in our unit tests when run in Actions due to internet wonkiness. I want to implement 2 fixes:

1.) Change downloads to use long process timeout (60 seconds)
2.) Change the timeout in the Actions file by passing in an argument to increase it to 20 seconds to deal with NGNX page timeouts.

Changed files:
src/main/java/com/dougnoel/sentinel/system/DownloadManager.java

diff --git a/src/main/java/com/dougnoel/sentinel/system/DownloadManager.java b/src/main/java/com/dougnoel/sentinel/system/DownloadManager.java
index d934bd84..68491c31 100644
--- a/src/main/java/com/dougnoel/sentinel/system/DownloadManager.java
+++ b/src/main/java/com/dougnoel/sentinel/system/DownloadManager.java
@@ -97,7 +97,7 @@ public class DownloadManager {
         String downloadedFileName = null;
         var valid = true;
         
-        long timeOut = Time.out().toSeconds();
+        long timeOut = Time.longProcessTimeout().toSeconds();
         long loopTime = Time.loopInterval().toMillis();
         var downloadFolderPath = Paths.get(downloadDir);
         var watchService = FileSystems.getDefault().newWatchService();