anon-iclr-submission/benchname-bug-localization huggingface dataset:
Repository: aya-prover/aya-dev
Issue: Newly created upstream aya file in LSP was not added to the correct library

Buggy:
```log
[Log]: Created new file: \\success\\common\\src\\Homotopy\\icekiva.aya, mocked a library Homotopy for it
[Log]: Created new file: \\success\\common\\src\\ice4k.aya, mocked a library src for it
[Log]: Created new file: \\success\\src\\ProtoIssues\\ice5k.aya, added to owner: tests
```

Expected:
```log
[Log]: Created new file: \\success\\common\\src\\Homotopy\\icekiva.aya, added to owner: common
[Log]: Created new file: \\success\\common\\src\\ice4k.aya, added to owner: common
[Log]: Created new file: \\success\\src\\ProtoIssues\\ice5k.aya, added to owner: tests
```

Changed files:
lsp/src/main/java/org/aya/lsp/server/AyaLanguageServer.java

diff --git a/lsp/src/main/java/org/aya/lsp/server/AyaLanguageServer.java b/lsp/src/main/java/org/aya/lsp/server/AyaLanguageServer.java
index 90fe6b23b..6edd5a658 100644
--- a/lsp/src/main/java/org/aya/lsp/server/AyaLanguageServer.java
+++ b/lsp/src/main/java/org/aya/lsp/server/AyaLanguageServer.java
@@ -7,6 +7,7 @@ import kala.collection.immutable.ImmutableMap;
 import kala.collection.immutable.ImmutableSeq;
 import kala.collection.mutable.MutableList;
 import kala.collection.mutable.MutableMap;
+import kala.collection.mutable.MutableSet;
 import kala.control.Option;
 import kala.tuple.Tuple;
 import org.aya.cli.library.LibraryCompiler;
@@ -142,7 +143,23 @@ public class AyaLanguageServer implements LanguageServer {
     if (path == null) return null;
     var ayaJson = path.resolve(Constants.AYA_JSON);
     if (!Files.exists(ayaJson)) return findOwner(path.getParent());
-    return libraries.find(lib -> lib.underlyingLibrary().libraryRoot().equals(path)).getOrNull();
+    var book = MutableSet.<LibraryConfig>create();
+    for (var lib : libraries) {
+      var found = findOwner(book, lib, path);
+      if (found != null) return found;
+    }
+    return null;
+  }
+
+  private @Nullable LibraryOwner findOwner(@NotNull MutableSet<LibraryConfig> book, @NotNull LibraryOwner owner, @NotNull Path libraryRoot) {
+    if (book.contains(owner.underlyingLibrary())) return null;
+    book.add(owner.underlyingLibrary());
+    if (owner.underlyingLibrary().libraryRoot().equals(libraryRoot)) return owner;
+    for (var dep : owner.libraryDeps()) {
+      var found = findOwner(book, dep, libraryRoot);
+      if (found != null) return found;
+    }
+    return null;
   }
 
   private @Nullable LibrarySource find(@NotNull LibraryOwner owner, Path moduleFile) {
Repository: advanced-rocketry/advancedrocketry
Issue: [BUG] Multiplayer observatory NullPointerException on latest version



## Version of Advanced Rocketry
> 2.0.0-257
> The latest code from the 1.12.2 branch on github



## Have you verified this is an issue in the latest unstable build
- [x] Y
- [] N
- [] N/A


## Version of LibVulpes
> 0.4.2-87
> The latest code from the 1.12.2 branch



## Version of Minecraft
>1.12.2



## Does this occur without other mods installed
- [x] Y
- [] N
- [] N/A



## Crash report or log or visualVM (if applicable)
http://pastebin.com is a good place to put them
crash reports that are put in the issue itself are
hard to read
>(257 crash report) https://pastebin.com/QrJrXQz4
>(latest source code) https://pastebin.com/H0DzMWtg





## Description of the problem
>Note: The problem occurs exclusively in multiplayer.  And the error only occurs in the client.
>Description: When trying to view asteroid contents in the observatory, a NullPointerException occurs in the client and no asteroid content information is shown in the GUI.
>Step 1: Create 1.12.2 multiplayer server
>Step 2: Build observatory multiblock
>Step 3: Insert data storage module with distance data
>Step 4: Scan for asteroids
>Step 5: Click on any asteroid.  Nothing will appear in the right hand side of the GUI, and there will be a NullPointerException in the client log.


Changed files:
src/main/java/zmaster587/advancedRocketry/api/ARConfiguration.java

diff --git a/src/main/java/zmaster587/advancedRocketry/api/ARConfiguration.java b/src/main/java/zmaster587/advancedRocketry/api/ARConfiguration.java
index 6a0e6361..c3031bfe 100644
--- a/src/main/java/zmaster587/advancedRocketry/api/ARConfiguration.java
+++ b/src/main/java/zmaster587/advancedRocketry/api/ARConfiguration.java
@@ -167,6 +167,7 @@ public class ARConfiguration {
 			out.writeFloat(asteroid.richnessVariability);		//variability of richness
 			out.writeFloat(asteroid.probability);				//probability of the asteroid spawning
 			out.writeFloat(asteroid.timeMultiplier);
+			out.writeItemStack(asteroid.baseStack);
 			
 			out.writeInt(asteroid.stackProbabilities.size());
 			for(int i = 0; i < asteroid.stackProbabilities.size(); i++)
@@ -245,6 +246,12 @@ public class ARConfiguration {
 			asteroid.richnessVariability = in.readFloat();		//variability of richness
 			asteroid.probability = in.readFloat();				//probability of the asteroid spawning
 			asteroid.timeMultiplier = in.readFloat();
+			try {
+				asteroid.baseStack = in.readItemStack();
+			} catch (IOException e) {
+				e.printStackTrace();
+			}
+			
 			
 			int size = in.readInt();
 			for(int i = 0; i < size; i++)
Repository: innovativeonlineindustries/industrial-foregoing
Issue: [1.16] Issue Title: Fluid Extractor continues to drain power when internal buffer is full.

**Industrial Foregoing Version:** industrial-foregoing-1.16.1-3.0.4-eeeb31e

**Titanium Version:**

**Crashlog If Applicable (Upload to pastebin/gist):**

Expected Operation: When internal buffer is full of fluid, machine pauses operation, and ceases to drain power.

Actual Operation: When internal buffer is full of fluid, machine continues to operate, and voids additional fluids.


Changed files:
src/main/java/com/buuz135/industrial/block/core/tile/FluidExtractorTile.java

diff --git a/src/main/java/com/buuz135/industrial/block/core/tile/FluidExtractorTile.java b/src/main/java/com/buuz135/industrial/block/core/tile/FluidExtractorTile.java
index dc1847ba..e93edb26 100644
--- a/src/main/java/com/buuz135/industrial/block/core/tile/FluidExtractorTile.java
+++ b/src/main/java/com/buuz135/industrial/block/core/tile/FluidExtractorTile.java
@@ -48,7 +48,7 @@ public class FluidExtractorTile extends IndustrialAreaWorkingTile<FluidExtractor
         if (isLoaded(pos)) {
             if (currentRecipe == null || !currentRecipe.matches(this.world, pos))
                 currentRecipe = findRecipe(this.world, pos);
-            if (currentRecipe != null) {//GetDimensionType
+            if (currentRecipe != null && this.tank.getFluidAmount() < this.tank.getCapacity()) {//GetDimensionType
                 FluidExtractionProgress extractionProgress = EXTRACTION.computeIfAbsent(this.world.func_230315_m_(), dimensionType -> new HashMap<>()).computeIfAbsent(this.world.getChunkAt(pos).getPos(), chunkPos -> new HashMap<>()).computeIfAbsent(pos, pos1 -> new FluidExtractionProgress(this.world));
                 tank.fillForced(currentRecipe.output.copy(), IFluidHandler.FluidAction.EXECUTE);
                 if (this.world.rand.nextDouble() <= currentRecipe.breakChance) {
Repository: innovativeonlineindustries/industrial-foregoing
Issue: [1.16] Biofuel generators always using biofuel

**Industrial Foregoing Version:** 1.16.1-3.0.5

**Titanium Version:** 1.16.1-3.0.4

**Crashlog If Applicable (Upload to pastebin/gist):** N/A

Biofuel generators always burnign fuel even when full of energy.

https://youtu.be/c6kKxCg1ofw



Changed files:
src/main/java/com/buuz135/industrial/block/generator/tile/BiofuelGeneratorTile.java

diff --git a/src/main/java/com/buuz135/industrial/block/generator/tile/BiofuelGeneratorTile.java b/src/main/java/com/buuz135/industrial/block/generator/tile/BiofuelGeneratorTile.java
index c5c275a4..89a23399 100644
--- a/src/main/java/com/buuz135/industrial/block/generator/tile/BiofuelGeneratorTile.java
+++ b/src/main/java/com/buuz135/industrial/block/generator/tile/BiofuelGeneratorTile.java
@@ -44,7 +44,7 @@ public class BiofuelGeneratorTile extends IndustrialGeneratorTile<BiofuelGenerat
 
     @Override
     public boolean canStart() {
-        return biofuel.getFluidAmount() > 0;
+        return biofuel.getFluidAmount() > 0 && this.getEnergyStorage().getEnergyStored() < this.getEnergyStorage().getMaxEnergyStored();
     }
 
     @Override