anon-iclr-submission/benchname-bug-localization huggingface dataset:
Repository: microsoftgraph/msgraph-sdk-java
Issue: Fail to PATCH event

Hello I just upgraded to the latest 1.8.0 version from 1.7.1 and using https://graph.microsoft.com/v1.0 service root. However when I try to update an event it gives the following error message.



Cannot invoke the action, eventually got an error: com.microsoft.graph.http.GraphServiceException: Error code: RequestBodyRead
Error message: The property 'graphResponseHeaders' does not exist on type 'Microsoft.OutlookServices.Event'. Make sure to only use property names that are defined by the type or mark the type as open type.

PATCH https://graph.microsoft.com/v1.0/users/aa6683ae-427a-44e7-836b-ec0741fc717a/events/AAMkADEwMjU3OGYyLWU0NTktNDgyNy05ODUxLWRlYzQ5OWE4MmU5MwBGAAAAAACSVpJrwKxgR5K20zCB8fQRBwC98SkOlY-sRoGpzahBToGYAAAw0TA4AAC98SkOlY-sRoGpzahBToGYAAAw0TgTAAA=
SdkVersion : graph-java/v1.7.1
Authorization : Bearer eyJ0eXAiOiJKV1QiLCJub25jZSI[...]
{"originalStartTimeZone":"Pacific Standard Time","[...]

400 : Bad Request
[...]

[Some information was truncated for brevity, enable debug logging for more details]


Changed files:
src/main/java/com/microsoft/graph/serializer/DefaultSerializer.java

diff --git a/src/main/java/com/microsoft/graph/serializer/DefaultSerializer.java b/src/main/java/com/microsoft/graph/serializer/DefaultSerializer.java
index cb4fd614ee..7e93e795c0 100644
--- a/src/main/java/com/microsoft/graph/serializer/DefaultSerializer.java
+++ b/src/main/java/com/microsoft/graph/serializer/DefaultSerializer.java
@@ -72,7 +72,7 @@ public class DefaultSerializer implements ISerializer {
     public <T> T deserializeObject(final String inputString, final Class<T> clazz) {
     	return deserializeObject(inputString, clazz, null);
     }
-    
+    private static final String graphResponseHeadersKey = "graphResponseHeaders";
     @SuppressWarnings("unchecked")
     @Override
     public <T> T deserializeObject(final String inputString, final Class<T> clazz, Map<String, java.util.List<String>> responseHeaders) {
@@ -97,7 +97,7 @@ public class DefaultSerializer implements ISerializer {
 
             if (responseHeaders != null) {
 	            JsonElement convertedHeaders = gson.toJsonTree(responseHeaders);
-	            jsonBackedObject.additionalDataManager().put("graphResponseHeaders", convertedHeaders);
+	            jsonBackedObject.additionalDataManager().put(graphResponseHeadersKey, convertedHeaders);
             }
             
             jsonBackedObject.additionalDataManager().setAdditionalData(rawObject);
@@ -271,7 +271,9 @@ public class DefaultSerializer implements ISerializer {
      */
     private void addAdditionalDataToJson(AdditionalDataManager additionalDataManager, JsonObject jsonNode) {
     	for (Map.Entry<String, JsonElement> entry : additionalDataManager.entrySet()) {
+            if(!entry.getKey().equals(graphResponseHeadersKey)) {
                 jsonNode.add(entry.getKey(), entry.getValue());
+            }
         }
     }
Repository: microsoftgraph/msgraph-sdk-java
Issue: The condition at line 188 of ChunkedUploadProvider.java is never satisfied so the success callback is never called.

The condition at line 188 of ChunkedUploadProvider.java is never satisfied so the success callback is never called.
 ```Java
          if (result.uploadCompleted()) {
                callback.progress(this.streamSize, this.streamSize);
                callback.success((UploadType) result.getItem());
                break;
            } 
```

_Originally posted by @RegisStGelais in https://github.com/microsoftgraph/msgraph-sdk-java/issues/472#issuecomment-696696095_

Changed files:
src/main/java/com/microsoft/graph/concurrency/ChunkedUploadResponseHandler.java

diff --git a/src/main/java/com/microsoft/graph/concurrency/ChunkedUploadResponseHandler.java b/src/main/java/com/microsoft/graph/concurrency/ChunkedUploadResponseHandler.java
index eaee8434f0..3f4a210634 100644
--- a/src/main/java/com/microsoft/graph/concurrency/ChunkedUploadResponseHandler.java
+++ b/src/main/java/com/microsoft/graph/concurrency/ChunkedUploadResponseHandler.java
@@ -176,7 +176,7 @@ public class ChunkedUploadResponseHandler<UploadType>
 					in = new BufferedInputStream(response.body().byteStream());
 					final String rawJson = DefaultHttpProvider.streamToString(in);
 					final UploadSession session = serializer.deserializeObject(rawJson, UploadSession.class);
-					if(session == null) {
+					if(session == null || session.nextExpectedRanges == null) {
 						logger.logDebug("Upload session is completed (ODSP), uploaded item returned.");
 						final UploadType uploadedItem = serializer.deserializeObject(rawJson, this.deserializeTypeClass);
 						return new ChunkedUploadResult<UploadType>(uploadedItem);
Repository: microsoftgraph/msgraph-sdk-java
Issue: Calling setMaxRetries on BaseCollectionRequest sets maxRedirects on baseRequest

### Expected behavior

maxRetries is set correctly


### Actual behavior

maxRedirects is set when calling setMaxRetries on BaseCollectionRequest


There seems to be a typo at https://github.com/microsoftgraph/msgraph-sdk-java/blob/ee1678b0dd2a96ade4844833626f51edaa8af992/src/main/java/com/microsoft/graph/http/BaseCollectionRequest.java#L274



 
[AB#8085](https://microsoftgraph.visualstudio.com/0985d294-5762-4bc2-a565-161ef349ca3e/_workitems/edit/8085)

Changed files:
src/main/java/com/microsoft/graph/http/BaseCollectionRequest.java

diff --git a/src/main/java/com/microsoft/graph/http/BaseCollectionRequest.java b/src/main/java/com/microsoft/graph/http/BaseCollectionRequest.java
index 9e648e6019..916241200e 100644
--- a/src/main/java/com/microsoft/graph/http/BaseCollectionRequest.java
+++ b/src/main/java/com/microsoft/graph/http/BaseCollectionRequest.java
@@ -271,7 +271,7 @@ public abstract class BaseCollectionRequest<T1, T2> implements IHttpRequest {
      * @param maxRetries Max retries for a request
      */
     public void setMaxRetries(int maxRetries) {
-    	baseRequest.setMaxRedirects(maxRetries);
+    	baseRequest.setMaxRetries(maxRetries);
     }
     
     /**
Repository: refinedmods/refinedstorage
Issue: Server Crash after inserting disk into Disk Manipulator when output slots full

#### Issue description:

Server crashed immediately after a disk drive was inserted into the disk manipulator when it was already full in the output slots.  To note, the disk drive was already empty with 0 bytes in it.
#### What happens:

Server crashes horribly.
#### What you expected to happen:

No crash, and it wouldn't move to output.
#### Steps to reproduce:
1. Disk manipulator with 6 drives in the output
2. Insert empty disk
3. Crash
   ...
#### Version (Make sure you are on the latest version before reporting):
- Minecraft: 1.10.2
- Forge: 2094
- Refined Storage:  refinedstorage{1.0.5} [Refined Storage](refinedstorage-1.0.5.jar) 

Does this issue occur on a server? yes, and SP
#### If a (crash)log is relevant for this issue, link it here:

Server pastebin: http://pastebin.com/CRpday1c
Single player pastebin: http://pastebin.com/FpZADr19


Changed files:
src/main/java/refinedstorage/tile/TileDiskManipulator.java

diff --git a/src/main/java/refinedstorage/tile/TileDiskManipulator.java b/src/main/java/refinedstorage/tile/TileDiskManipulator.java
index 610f54ea1..db2187b8d 100755
--- a/src/main/java/refinedstorage/tile/TileDiskManipulator.java
+++ b/src/main/java/refinedstorage/tile/TileDiskManipulator.java
@@ -379,7 +379,7 @@ public class TileDiskManipulator extends TileNode implements IComparable, IFilte
         if (disk != null) {
             int i = 6;
 
-            while (disks.getStackInSlot(i) != null && i < 12) {
+            while (i < 12 && disks.getStackInSlot(i) != null) {
                 i++;
             }