auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private void setConflictsWith(GerritClient gerritClient, ChangeInfo element) { ChangeInfo[] conflictsWithChangeInfo = null; if (!("MERGED".equals(element.getStatus())) && !("ABANDONED".equals(element.getStatus()))) { try { conflictsWithChangeInfo = queryConflictsWith(gerritClient, element.getChange_id(), new NullProgressMonitor()); } catch (MalformedURLException e) { EGerritCorePlugin.logError(gerritClient.getRepository().formatGerritVersion() + e.getMessage()); } <START> List<ChangeInfo> conflictsWithChangeInfolist = Arrays.asList(conflictsWithChangeInfo); <END> List<ChangeInfo> conflictsWithChangeInfolistNew = new ArrayList<ChangeInfo>(); for (int i = 0; i < conflictsWithChangeInfolist.size(); i++) { if (conflictsWithChangeInfolist.get(i).getChange_id().compareTo(fChangeInfo.getChange_id()) != 0 && conflictsWithChangeInfolist.get(i).getStatus().compareTo("NEW") == 0 && conflictsWithChangeInfolist.get(i).isMergeable()) { conflictsWithChangeInfolistNew.add(conflictsWithChangeInfolist.remove(i)); } } fChangeInfo.getConflictsWith().clear(); for (ChangeInfo changeInfo : conflictsWithChangeInfolistNew) { fChangeInfo.getConflictsWith().add(changeInfo); } } }</code><technical_language>If for conflictsWithChangeInfo is null, conversion fail: Arrays.asList()</technical_language>

Target:
private void setConflictsWith(GerritClient gerritClient, ChangeInfo element) { ChangeInfo[] conflictsWithChangeInfo = null; if (!("MERGED".equals(element.getStatus())) && !("ABANDONED".equals(element.getStatus()))) { try { conflictsWithChangeInfo = queryConflictsWith(gerritClient, element.getChange_id(), new NullProgressMonitor()); } catch (MalformedURLException e) { EGerritCorePlugin.logError(gerritClient.getRepository().formatGerritVersion() + e.getMessage()); } List<ChangeInfo> conflictsWithChangeInfolist = null; List<ChangeInfo> conflictsWithChangeInfolistNew = new ArrayList<ChangeInfo>(); if (conflictsWithChangeInfo != null) { conflictsWithChangeInfolist = Arrays.asList(conflictsWithChangeInfo); for (int i = 0; i < conflictsWithChangeInfolist.size(); i++) { if (conflictsWithChangeInfolist.get(i).getChange_id().compareTo(fChangeInfo.getChange_id()) != 0 && conflictsWithChangeInfolist.get(i).getStatus().compareTo("NEW") == 0 && conflictsWithChangeInfolist.get(i).isMergeable()) { conflictsWithChangeInfolistNew.add(conflictsWithChangeInfolist.remove(i)); } } } fChangeInfo.getConflictsWith().clear(); fChangeInfo.getConflictsWith().addAll(conflictsWithChangeInfolistNew); } }
Source:
<code>public synchronized EndpointContext getConnectionWriteContext() { if (null == connectionWriteContext) { connectionWriteContext = new DtlsEndpointContext(peer, peerIdentity, sessionIdentifier.toString(), String.valueOf(writeEpoch), cipherSuite.name()); } <START> return connectionWriteContext; <END> }</code><technical_language>recreate dynamically</technical_language>

Target:
public DtlsEndpointContext getConnectionWriteContext() { return new DtlsEndpointContext(peer, peerIdentity, sessionIdentifier.toString(), String.valueOf(writeEpoch), cipherSuite.name()); }
Source:
<code>private void setMultipleValuedReference(Object value) { if (!table.isDisposed()) { final ISelection selection = new StructuredSelection(value); tableViewer.setSelection(selection); <START> if (value instanceof List) { <END> tableViewer.setInput(((List) value).toArray()); if (!table.isEnabled()) { table.setEnabled(true); } } } }</code><technical_language>If instanceof Iterable<?> -> create array put values else put in array</technical_language>

Target:
private void setMultipleValuedReference(Object value) { if (!table.isDisposed()) { final ISelection selection = new StructuredSelection(value); tableViewer.setSelection(selection); List<Object> values = new ArrayList<Object>(); if (value instanceof Iterable<?>) { for (Object val : (Iterable<?>) value) { values.add(val); } } else { values.add(value); } tableViewer.setInput(values.toArray()); if (!table.isEnabled()) { table.setEnabled(true); } } }
Source:
<code>public void init() { getMapAsync(new OnMapReadyCallback() { @Override public void onMapReady(GoogleMap googleMap) { if (googleMap != null && getActivity() != null) { NativeGoogleMapFragment.this.googleMap = googleMap; <START> NativeGoogleMapFragment.this.markers = new HashMap<>(); <END> UiSettings settings = NativeGoogleMapFragment.this.googleMap.getUiSettings(); settings.setZoomControlsEnabled(false); settings.setMyLocationButtonEnabled(false); setMyLocationEnabled(true); if (onMapLoadedListener != null) { onMapLoadedListener.onMapLoaded(); } } } }); }</code><technical_language>initialize inline in line 38 final</technical_language>

Target:
public void init() { getMapAsync(new OnMapReadyCallback() { @Override public void onMapReady(GoogleMap googleMap) { if (googleMap != null && getActivity() != null) { NativeGoogleMapFragment.this.googleMap = googleMap; UiSettings settings = NativeGoogleMapFragment.this.googleMap.getUiSettings(); settings.setZoomControlsEnabled(false); settings.setMyLocationButtonEnabled(false); setMyLocationEnabled(true); if (onMapLoadedListener != null) { onMapLoadedListener.onMapLoaded(); } } } }); }
Source:
<code>private Geometry readGeometry() throws IOException, ParseException { TWKBMetadata metadata = readMetadata(); switch (metadata.getType()) { case twkbPoint: return readPoint(metadata); case twkbLineString: return readLineString(metadata); case twkbPolygon: return readPolygon(metadata); case twkbMultiPoint: return readMultiPoint(metadata); case twkbMultiLineString: return readMultiLineString(metadata); case twkbMultiPolygon: return readMultiPolygon(metadata); case twkbGeometryCollection: return readGeometryCollection(metadata); } <START> return null; <END> }</code><technical_language>good log error - get reading invalid object</technical_language>

Target:
private Geometry readGeometry() throws IOException, ParseException { TWKBMetadata metadata = readMetadata(); int geometryType = metadata.getType(); switch (geometryType) { case twkbPoint: return readPoint(metadata); case twkbLineString: return readLineString(metadata); case twkbPolygon: return readPolygon(metadata); case twkbMultiPoint: return readMultiPoint(metadata); case twkbMultiLineString: return readMultiLineString(metadata); case twkbMultiPolygon: return readMultiPolygon(metadata); case twkbGeometryCollection: return readGeometryCollection(metadata); default: throw new ParseException("Unknown TWKB type " + geometryType); } }
Source:
<code>public String translate(final With with) { <START> throw new OperationNotSupportedRuntimeException("MySQL 5.7 does not support WITH"); <END> }</code><technical_language>Please omit version, version is used. wrong, lets assume MySQL versions do support this</technical_language>

Target:
public String translate(final With with) { throw new OperationNotSupportedRuntimeException("MySQL does not support WITH."); }
Source:
<code>public HelixManagerProperty(Properties helixManagerProperties, CloudConfig cloudConfig) { _helixCloudProperty = new HelixCloudProperty(cloudConfig); setVersion(helixManagerProperties.getProperty(SystemPropertyKeys.HELIX_MANAGER_VERSION)); <START> setHealthReportLatency( <END> helixManagerProperties.getProperty(SystemPropertyKeys.PARTICIPANT_HEALTH_REPORT_LATENCY)); }</code><technical_language>fyi, reason a couple of fields "version", "latency" is give example of migrate system properties Helix manager property. A "TODO" added for completeness in future work</technical_language>

Target:
public HelixManagerProperty(Properties helixManagerProperties, CloudConfig cloudConfig) { _helixCloudProperty = new HelixCloudProperty(cloudConfig); _version = helixManagerProperties.getProperty(SystemPropertyKeys.HELIX_MANAGER_VERSION); _healthReportLatency = Long.parseLong( helixManagerProperties.getProperty(SystemPropertyKeys.PARTICIPANT_HEALTH_REPORT_LATENCY)); }
Source:
<code>public VSpan(AnnotationLayer aLayer, AnnotationFS aFS, String aType, VRange aOffsets, Map<String, String> aFeatures) { <START> this(aLayer, new VID(getAddr(aFS)), aType, Collections.singletonList(aOffsets), aFeatures); <END> }</code><technical_language>is Collections.singletonList (Collections.)asList? asList is shorter ;)</technical_language>

Target:
public VSpan(AnnotationLayer aLayer, AnnotationFS aFS, String aType, VRange aOffsets, Map<String, String> aFeatures) { this(aLayer, new VID(getAddr(aFS)), aType, asList(aOffsets), aFeatures); }
Source:
<code>private static void computeInput(final PaneBasedSelectionWizardDescription paneBasedSelectionWizardDescription, final EObject container, final IInterpreter interpreter, final TreeItemWrapper input) { final Collection<EObject> referencingENode = ImmutableSet.copyOf(RuntimeLoggerManager.INSTANCE.decorate(interpreter).evaluateCollection(container, paneBasedSelectionWizardDescription, ToolPackage.eINSTANCE.getPaneBasedSelectionWizardDescription_CandidatesExpression())); if (paneBasedSelectionWizardDescription.isTree()) { final Collection<EObject> referencingRoots = RuntimeLoggerManager.INSTANCE.decorate(interpreter).evaluateCollection(container, paneBasedSelectionWizardDescription, ToolPackage.eINSTANCE.getPaneBasedSelectionWizardDescription_RootExpression()); final Iterator<EObject> iterRoots = referencingRoots.iterator(); while (iterRoots.hasNext()) { final EObject refRoot = iterRoots.next(); if (referencingENode.contains(refRoot)) { final TreeItemWrapper treeItem = new TreeItemWrapper(refRoot, input); input.getChildren().add(treeItem); PaneBasedSelectionWizardCommand.computeChildren(paneBasedSelectionWizardDescription, referencingENode, interpreter, treeItem, refRoot); } } } else { final Iterator<EObject> iterRoots = referencingENode.iterator(); while (iterRoots.hasNext()) { <START> final EObject refRoot = iterRoots.next(); <END> if (referencingENode.contains(refRoot)) { final TreeItemWrapper treeItem = new TreeItemWrapper(refRoot, input); input.getChildren().add(treeItem); } } } }</code><technical_language>This test return true: refRoot iterator referencingENode</technical_language>

Target:
private static void computeInput(final PaneBasedSelectionWizardDescription paneBasedSelectionWizardDescription, final EObject container, final IInterpreter interpreter, final TreeItemWrapper input) { final Collection<EObject> referencingENode = ImmutableSet.copyOf(RuntimeLoggerManager.INSTANCE.decorate(interpreter).evaluateCollection(container, paneBasedSelectionWizardDescription, ToolPackage.eINSTANCE.getPaneBasedSelectionWizardDescription_CandidatesExpression())); if (paneBasedSelectionWizardDescription.isTree()) { final Collection<EObject> referencingRoots = RuntimeLoggerManager.INSTANCE.decorate(interpreter).evaluateCollection(container, paneBasedSelectionWizardDescription, ToolPackage.eINSTANCE.getPaneBasedSelectionWizardDescription_RootExpression()); final Iterator<EObject> iterRoots = referencingRoots.iterator(); while (iterRoots.hasNext()) { final EObject refRoot = iterRoots.next(); if (referencingENode.contains(refRoot)) { final TreeItemWrapper treeItem = new TreeItemWrapper(refRoot, input); input.getChildren().add(treeItem); PaneBasedSelectionWizardCommand.computeChildren(paneBasedSelectionWizardDescription, referencingENode, interpreter, treeItem, refRoot); } } } else { final Iterator<EObject> iterRoots = referencingENode.iterator(); while (iterRoots.hasNext()) { final EObject refRoot = iterRoots.next(); final TreeItemWrapper treeItem = new TreeItemWrapper(refRoot, input); input.getChildren().add(treeItem); } } }
Source:
<code>public StepExecution getLastStepExecution(JobInstance jobInstance, String stepName) { List<JobExecution> jobExecutions = jobExecutionDao.findJobExecutions(jobInstance); List<StepExecution> stepExecutions = new ArrayList<StepExecution>(jobExecutions.size()); for (JobExecution jobExecution : jobExecutions) { stepExecutionDao.addStepExecutions(jobExecution); for (StepExecution stepExecution : jobExecution.getStepExecutions()) { if (stepName.equals(stepExecution.getStepName())) { stepExecutions.add(stepExecution); } } } StepExecution latest = null; for (StepExecution stepExecution : stepExecutions) { if (latest == null) { latest = stepExecution; } <START> if (latest.getStartTime().getTime() <= stepExecution.getStartTime().getTime()) { <END> latest = stepExecution; } } if (latest != null) { ExecutionContext stepExecutionContext = ecDao.getExecutionContext(latest); latest.setExecutionContext(stepExecutionContext); ExecutionContext jobExecutionContext = ecDao.getExecutionContext(latest.getJobExecution()); latest.getJobExecution().setExecutionContext(jobExecutionContext); } return latest; }</code><technical_language>This guarantee need. StepExecutionDao interface guarantee order re-implemented for another reason, leaving order by. This check id safe</technical_language>

Target:
public StepExecution getLastStepExecution(JobInstance jobInstance, String stepName) { List<JobExecution> jobExecutions = jobExecutionDao.findJobExecutions(jobInstance); List<StepExecution> stepExecutions = new ArrayList<StepExecution>(jobExecutions.size()); for (JobExecution jobExecution : jobExecutions) { stepExecutionDao.addStepExecutions(jobExecution); for (StepExecution stepExecution : jobExecution.getStepExecutions()) { if (stepName.equals(stepExecution.getStepName())) { stepExecutions.add(stepExecution); } } } StepExecution latest = null; for (StepExecution stepExecution : stepExecutions) { if (latest == null) { latest = stepExecution; } if (latest.getStartTime().getTime() < stepExecution.getStartTime().getTime()) { latest = stepExecution; } if (latest.getStartTime().getTime() == stepExecution.getStartTime().getTime() && latest.getId() < stepExecution.getId()) { latest = stepExecution; } } if (latest != null) { ExecutionContext stepExecutionContext = ecDao.getExecutionContext(latest); latest.setExecutionContext(stepExecutionContext); ExecutionContext jobExecutionContext = ecDao.getExecutionContext(latest.getJobExecution()); latest.getJobExecution().setExecutionContext(jobExecutionContext); } return latest; }
Source:
<code>public void blockManualGoldenResourceManipulationOnUpdate(IBaseResource theOldResource, IBaseResource theUpdatedResource, RequestDetails theRequestDetails, ServletRequestDetails theServletRequestDetails) { if (myMdmSettings.isPreventMultipleEids()) { forbidIfHasMultipleEids(theUpdatedResource); } <START> if (myGoldenResourceHelper.isDeactivated(theUpdatedResource)) { <END> ourLog.debug("Deleting MDM links to deactivated Golden resource {}", theUpdatedResource.getIdElement().toUnqualifiedVersionless()); int deleted = myMdmLinkDeleteSvc.deleteNonRedirectWithWithAnyReferenceTo(theUpdatedResource); if (deleted > 0) { ourLog.debug("Deleted MDM links", deleted); } } if (isInternalRequest(theRequestDetails)) { return; } forbidIfMdmManagedTagIsPresent(theOldResource); forbidModifyingMdmTag(theUpdatedResource, theOldResource); if (myMdmSettings.isPreventEidUpdates()) { forbidIfModifyingExternalEidOnTarget(theUpdatedResource, theOldResource); } }</code><technical_language>I initially thrown term "deactivated" I a good term here. if a one. do other mdm systems call this...</technical_language>

Target:
public void blockManualGoldenResourceManipulationOnUpdate(IBaseResource theOldResource, IBaseResource theUpdatedResource, RequestDetails theRequestDetails, ServletRequestDetails theServletRequestDetails) { if (myMdmSettings.isPreventMultipleEids()) { forbidIfHasMultipleEids(theUpdatedResource); } if (MdmResourceUtil.isGoldenRecordRedirected(theUpdatedResource)) { ourLog.debug("Deleting MDM links to deactivated Golden resource {}", theUpdatedResource.getIdElement().toUnqualifiedVersionless()); int deleted = myMdmLinkDeleteSvc.deleteNonRedirectWithAnyReferenceTo(theUpdatedResource); if (deleted > 0) { ourLog.debug("Deleted MDM links", deleted); } } if (isInternalRequest(theRequestDetails)) { return; } forbidIfMdmManagedTagIsPresent(theOldResource); forbidModifyingMdmTag(theUpdatedResource, theOldResource); if (myMdmSettings.isPreventEidUpdates()) { forbidIfModifyingExternalEidOnTarget(theUpdatedResource, theOldResource); } }
Source:
<code>public void download(List<DownloadFile> downloadFiles, DownloadBatchStatusCallback statusCallback, DownloadFile.Callback fileCallback) { List<Callable<Object>> callables = new ArrayList<>(downloadFiles.size()); for (DownloadFile downloadFile : downloadFiles) { callables.add(Executors.callable(() -> { if (DownloadBatch.batchCannotContinue(downloadBatchStatus, connectionChecker, downloadsBatchPersistence, statusCallback)) { throw new RuntimeException("Ignored interrupt download exception"); } downloadFile.download(fileCallback); })); } try { CONCURRENT_EXECUTOR_SERVICE.invokeAll(callables); } catch (InterruptedException e) { <START> CONCURRENT_EXECUTOR_SERVICE.shutdown(); <END> } }</code><technical_language>If arrive statusCallback is notified in DownloadBatch.batchCannotContinue method, right</technical_language>

Target:
public void download(List<DownloadFile> downloadFiles, DownloadBatchStatusCallback statusCallback, DownloadFile.Callback fileCallback) { List<Callable<Object>> callables = new ArrayList<>(downloadFiles.size()); for (DownloadFile downloadFile : downloadFiles) { callables.add(Executors.callable(() -> { if (DownloadBatch.batchCannotContinue(downloadBatchStatus, connectionChecker, downloadsBatchPersistence, statusCallback)) { throw new CancellationException("Ignored interrupt download exception"); } downloadFile.download(fileCallback); })); } try { CONCURRENT_EXECUTOR_SERVICE.invokeAll(callables); } catch (InterruptedException e) { CONCURRENT_EXECUTOR_SERVICE.shutdown(); } }
Source:
<code>public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { super.handle(target, baseRequest, request, response); if (baseRequest.isHandled()) return; String jsonp = request.getParameter(HTTPClientInterface.JSONP); AuthenticationResult authResult = null; try { response.setContentType(jsonContentType); if (!HTTPClientInterface.validateJSONP(jsonp, baseRequest, response)) { return; } response.setStatus(HttpServletResponse.SC_OK); authResult = authenticate(baseRequest); if (!authResult.isAuthenticated()) { response.getWriter().print(buildClientResponse(jsonp, ClientResponse.UNEXPECTED_FAILURE, authResult.m_message)); response.setStatus(HttpServletResponse.SC_UNAUTHORIZED); baseRequest.setHandled(true); return; } if (!target.equals("/")) { response.getWriter().print(buildClientResponse(jsonp, ClientResponse.UNEXPECTED_FAILURE, "Resource not found")); response.setStatus(HttpServletResponse.SC_UNAUTHORIZED); <START> return; <END> } if (jsonp != null) { response.getWriter().write(jsonp + "("); } m_mapper.writeValue(response.getWriter(), new Profile(authResult.m_user, authResult.m_perms)); if (jsonp != null) { response.getWriter().write(")"); } baseRequest.setHandled(true); } catch (Exception ex) { logger.info("Not servicing url: " + baseRequest.getRequestURI() + " Details: "+ ex.getMessage(), ex); } }</code><technical_language>I baseRequest.setHandled(true) is needed this return. doc "It is important a handler completed handling request request passed other handlers" a single handler handling a request, passing all, a good idea setHandled(true) in a finally block for handlers</technical_language>

Target:
public void handle(String target, Request baseRequest, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException { super.handle(target, baseRequest, request, response); if (baseRequest.isHandled()) return; String jsonp = request.getParameter(HTTPClientInterface.JSONP); AuthenticationResult authResult = null; try { response.setContentType(jsonContentType); if (!HTTPClientInterface.validateJSONP(jsonp, baseRequest, response)) { return; } response.setStatus(HttpServletResponse.SC_OK); authResult = authenticate(baseRequest); if (!authResult.isAuthenticated()) { response.getWriter().print(buildClientResponse(jsonp, ClientResponse.UNEXPECTED_FAILURE, authResult.m_message)); response.setStatus(HttpServletResponse.SC_UNAUTHORIZED); baseRequest.setHandled(true); return; } if (!target.equals("/")) { response.getWriter().print(buildClientResponse(jsonp, ClientResponse.UNEXPECTED_FAILURE, "Resource not found")); response.setStatus(HttpServletResponse.SC_NOT_FOUND); baseRequest.setHandled(true); return; } if (jsonp != null) { response.getWriter().write(jsonp + "("); } m_mapper.writeValue(response.getWriter(), new Profile(authResult.m_user, authResult.m_perms)); if (jsonp != null) { response.getWriter().write(")"); } baseRequest.setHandled(true); } catch (Exception ex) { logger.info("Not servicing url: " + baseRequest.getRequestURI() + " Details: "+ ex.getMessage(), ex); } }
Source:
<code><START> public <M> IntermediateMessageStreamImpl<M> getIntermediateStream(String streamId, Serde<M> serde, boolean isBroadcast) { <END> Preconditions.checkState(!inputOperators.containsKey(streamId) && !outputStreams.containsKey(streamId), "getIntermediateStream must not be called multiple times with the same streamId: " + streamId); Serde streamSerde; if (serde != null) { streamSerde = serde; } else { if (defaultSystemDescriptor != null) { LOGGER.info("Using default system's serde for intermediate stream: " + streamId); streamSerde = (Serde) defaultSystemDescriptor.getSystemSerde().orElse(null); } else { LOGGER.warn("No serde defined for intermediate stream: " + streamId + ". Key and message serdes specified for the job.default.system will be used."); streamSerde = null; } } if (isBroadcast) broadcastStreams.add(streamId); boolean isKeyed; KV<Serde, Serde> kvSerdes; if (streamSerde == null) { isKeyed = true; kvSerdes = new KV<>(null, null); } else { isKeyed = streamSerde instanceof KVSerde; kvSerdes = getKVSerdes(streamId, streamSerde); } InputTransformer<?> transformer = null; if (defaultSystemDescriptor instanceof TransformingSystemDescriptor) { transformer = ((TransformingSystemDescriptor) defaultSystemDescriptor).getTransformer(); } InputOperatorSpec inputOperatorSpec = OperatorSpecs.createInputOperatorSpec(streamId, kvSerdes.getKey(), kvSerdes.getValue(), transformer, isKeyed, this.getNextOpId(OpCode.INPUT, null)); inputOperators.put(streamId, inputOperatorSpec); outputStreams.put(streamId, new OutputStreamImpl(streamId, kvSerdes.getKey(), kvSerdes.getValue(), isKeyed)); return new IntermediateMessageStreamImpl<>(this, inputOperators.get(streamId), outputStreams.get(streamId)); }</code><technical_language>this need public</technical_language>

Target:
public <M> IntermediateMessageStreamImpl<M> getIntermediateStream(String streamId, Serde<M> serde, boolean isBroadcast) { Preconditions.checkState(!inputOperators.containsKey(streamId) && !outputStreams.containsKey(streamId), "getIntermediateStream must not be called multiple times with the same streamId: " + streamId); if (serde == null) { LOGGER.info("No serde provided for intermediate stream: " + streamId + ". Key and message serdes configured for the job.default.system will be used."); } if (isBroadcast) broadcastStreams.add(streamId); boolean isKeyed; KV<Serde, Serde> kvSerdes; if (serde == null) { isKeyed = true; kvSerdes = new KV<>(null, null); } else { isKeyed = serde instanceof KVSerde; kvSerdes = getKVSerdes(streamId, serde); } InputTransformer transformer = (InputTransformer) defaultSystemDescriptorOptional .flatMap(SystemDescriptor::getTransformer).orElse(null); InputOperatorSpec inputOperatorSpec = OperatorSpecs.createInputOperatorSpec(streamId, kvSerdes.getKey(), kvSerdes.getValue(), transformer, isKeyed, this.getNextOpId(OpCode.INPUT, null)); inputOperators.put(streamId, inputOperatorSpec); outputStreams.put(streamId, new OutputStreamImpl(streamId, kvSerdes.getKey(), kvSerdes.getValue(), isKeyed)); return new IntermediateMessageStreamImpl<>(this, inputOperators.get(streamId), outputStreams.get(streamId)); }
Source:
<code>public String mapUser(String user) { log.info( "Profile='{}' authn='{}' authz='{}' mapping='{}'", getProfile(), getAuthnName(), getAuthzName(), getMappingName() <START> ); <END> if(getMappingExtension()!= null) { log.info("API: -->Mapping.InvokeCommands.MAP_USER user='{}'", user); user = getMappingExtension().invoke( new ExtMap().mput( Base.InvokeKeys.COMMAND, Mapping.InvokeCommands.MAP_USER ).mput( Mapping.InvokeKeys.USER, user ), true ).<String>get(Mapping.InvokeKeys.USER, user); log.info("API: <--Mapping.InvokeCommands.MAP_USER user='{}'", user); } return user; }</code><technical_language>this debug in constructor it</technical_language>

Target:
public String mapUser(String user) { if(getMappingExtension()!= null) { log.info("API: -->Mapping.InvokeCommands.MAP_USER profile='{}' user='{}'", getProfile(), user); user = getMappingExtension().invoke( new ExtMap().mput( Base.InvokeKeys.COMMAND, Mapping.InvokeCommands.MAP_USER ).mput( Mapping.InvokeKeys.USER, user ), true ).<String>get(Mapping.InvokeKeys.USER, user); log.info("API: <--Mapping.InvokeCommands.MAP_USER profile='{}' user='{}'", getProfile(), user); } return user; }
Source:
<code>private static int chunkedRead(InflaterInputStream inflaterInputStream, byte[] buffer, int offset, int length) throws IOException { int position = offset; int bytesRead = 0; <START> while (((position - offset) < length) && bytesRead != -1) { <END> bytesRead = inflaterInputStream.read(buffer, position, offset + length - position); if (bytesRead > 0) { position += bytesRead; } } return position - offset; }</code><technical_language>nit: while (position - offset < length && bytesRead != -1) {</technical_language>

Target:
private static int chunkedRead(InflaterInputStream inflaterInputStream, byte[] buffer, int offset, int length) throws IOException { int position = offset; int bytesRead = 0; while (position - offset < length && bytesRead != -1) { bytesRead = inflaterInputStream.read(buffer, position, offset + length - position); if (bytesRead > 0) { position += bytesRead; } } return position - offset; }
Source:
<code>public KubernetesController( String kubernetesURI, String kubernetesNamespace, String topologyName, boolean isVerbose <START> ) { <END> this.kubernetesURI = kubernetesURI; if (kubernetesNamespace == null) { LOG.log(Level.INFO, "Namespace not provided in configuration. Using default."); this.kubernetesNamespace = "default"; } else { this.kubernetesNamespace = kubernetesNamespace; } this.topologyName = topologyName; this.isVerbose = isVerbose; }</code><technical_language>close parens open curly get line in styles</technical_language>

Target:
public KubernetesController(String kubernetesURI, String kubernetesNamespace, String topologyName, boolean isVerbose) { if (kubernetesNamespace == null) { this.baseUriPath = String.format("%s/api/v1/namespaces/default/pods", kubernetesURI); } else { this.baseUriPath = String.format("%s/api/v1/namespaces/%s/pods", kubernetesURI, kubernetesNamespace); } this.topologyName = topologyName; this.isVerbose = isVerbose; }
Source:
<code>public void getUserInfo(Context context, SocialFactory.SOCIAL_SOURCE_TYPE socialType, String accessToken, final SocialLoginDelegate.SocialUserInfoCallback userInfoCallback) { <START> final String url = "<LINK_0>" + accessToken; <END> final OkHttpClientProvider okHttpClientProvider = RoboGuice.getInjector(context).getInstance(OkHttpClientProvider.class); okHttpClientProvider.get().newCall(new Request.Builder() .url(url) .get() .build()) .enqueue(new ErrorHandlingOkCallback<GoogleUserProfile>(context, GoogleUserProfile.class, CallTrigger.LOADING_UNCACHED) { @Override protected void onResponse(@NonNull GoogleUserProfile userProfile) { String name = userProfile.name; if (TextUtils.isEmpty(name)) { if (!TextUtils.isEmpty(userProfile.given_name)) { name = userProfile.given_name + " "; } if (!TextUtils.isEmpty(userProfile.family_name)) { name += userProfile.given_name; } } userInfoCallback.setSocialUserInfo(google.getEmail(), name); } }); }</code><technical_language>This url moved ApiConstants file</technical_language>

Target:
public void getUserInfo(Context context, SocialFactory.SOCIAL_SOURCE_TYPE socialType, String accessToken, final SocialLoginDelegate.SocialUserInfoCallback userInfoCallback) { final OkHttpClientProvider okHttpClientProvider = RoboGuice.getInjector(context).getInstance(OkHttpClientProvider.class); okHttpClientProvider.get().newCall(new Request.Builder() .url(String.format(USER_INFO_URL, accessToken)) .get() .build()) .enqueue(new ErrorHandlingOkCallback<GoogleUserProfile>(context, GoogleUserProfile.class, CallTrigger.LOADING_UNCACHED) { @Override protected void onResponse(@NonNull GoogleUserProfile userProfile) { String name = userProfile.name; if (TextUtils.isEmpty(name)) { if (!TextUtils.isEmpty(userProfile.given_name)) { name = userProfile.given_name + " "; } if (!TextUtils.isEmpty(userProfile.family_name)) { if (TextUtils.isEmpty(name)) { name = userProfile.family_name; } else { name += userProfile.family_name; } } } userInfoCallback.setSocialUserInfo(google.getEmail(), name); } }); }
Source:
<code>public void initializeFrom(ILaunchConfiguration config) { isInitializing = true; String remoteConnection = null; try { remoteConnection = config .getAttribute( IRemoteConnectionConfigurationConstants.ATTR_REMOTE_CONNECTION, ""); } catch (CoreException ce) { } String[] items = connectionCombo.getItems(); int i = 0; for (i = 0; i < items.length; i++) if (items[i].equals(remoteConnection)) break; if (i < items.length) connectionCombo.select(i); else if (items.length > 0) connectionCombo.select(0); super.initializeFrom(config); updateTargetProgFromConfig(config); updateSkipDownloadFromConfig(config); <START> updateConnectionPulldown(); <END> isInitializing = false; }</code><technical_language>call resets selection of pulldown entry. This means time select existing LC, reset selection. do need do update pullDown instead of buttons</technical_language>

Target:
public void initializeFrom(ILaunchConfiguration config) { isInitializing = true; String remoteConnection = null; try { remoteConnection = config .getAttribute( IRemoteConnectionConfigurationConstants.ATTR_REMOTE_CONNECTION, ""); } catch (CoreException ce) { } String[] items = connectionCombo.getItems(); int i = 0; for (i = 0; i < items.length; i++) if (items[i].equals(remoteConnection)) break; if (i < items.length) connectionCombo.select(i); else if (items.length > 0) connectionCombo.select(0); super.initializeFrom(config); updateTargetProgFromConfig(config); updateSkipDownloadFromConfig(config); updateConnectionButtons(); isInitializing = false; }
Source:
<code>public void inputObjectIsTransformedBeforeJdbcBindingWhenTransformerSpecifierTest() throws Exception { <START> <END> when(inputTransformer.transform(inputValue)).thenReturn(outputValue); when(inputTransformerFactory.getTransformer(inputValue.getClass())).thenReturn(inputTransformer); dbpa.set(inputValue); verify(statement).setObject(position, outputValue, sqlType, userDefinedTypeName); }</code><technical_language>do removing blank lines</technical_language>

Target:
public void inputObjectIsTransformedBeforeJdbcBindingWhenTransformerSpecifierTest() throws Exception { TypeTransformer inputTransformer = mock(TypeTransformer.class); Integer outputValue = 5; when(inputTransformer.transform(inputValue)).thenReturn(outputValue); when(inputTransformerFactory.getTransformer(inputValue.getClass())).thenReturn(inputTransformer); dbpa.set(inputValue); verify(statement).setObject(position, outputValue, sqlType, userDefinedTypeName); }
Source:
<code>private TypedResource getAndResolve(int resId, String qualifiers, boolean resolveRefs) { TypedResource value = resourceLoader.getValue(resId, qualifiers); if (resolveRefs) { value = resolve(value, qualifiers, resId); } <START> if (value == null && "layout".equals(getResourceTypeName(resId))) { <END> throw new UnsupportedOperationException("ugh, this doesn't work still?"); } return value; }</code><technical_language>Do need this conditional check more</technical_language>

Target:
private TypedResource getAndResolve(int resId, String qualifiers, boolean resolveRefs) { TypedResource value = resourceTable.getValue(resId, qualifiers); if (resolveRefs) { value = resolve(value, qualifiers, resId); } return value; }
Source:
<code>public static void sortSummarizedCoursesByCourseName(List<CourseSummaryBundle> courses) { Collections.sort(courses, new Comparator<CourseSummaryBundle>() { @Override public int compare(CourseSummaryBundle obj1, CourseSummaryBundle obj2) { return SanitizationHelper.desanitizeIfHtmlSanitized(obj1.course.getName()) <START> .compareTo(SanitizationHelper.desanitizeIfHtmlSanitized(obj2.course.getName())); <END> } }); }</code><technical_language>java String desanitizedCourseName1 = SanitizationHelper.desanitizeIfHtmlSanitized(obj1.course.getName()); String desanitizedCourseName2 = SanitizationHelper.desanitizeIfHtmlSanitized(obj2.course.getName()); return desanitizedCourseName1.compareTo(desanitizedCourseName2);</technical_language>

Target:
public static void sortSummarizedCoursesByCourseName(List<CourseSummaryBundle> courses) { Collections.sort(courses, new Comparator<CourseSummaryBundle>() { @Override public int compare(CourseSummaryBundle obj1, CourseSummaryBundle obj2) { String courseName1 = obj1.course.getName(); String courseName2 = obj2.course.getName(); courseName1 = SanitizationHelper.desanitizeIfHtmlSanitized(courseName1); courseName2 = SanitizationHelper.desanitizeFromHtml(courseName2); return courseName1.compareTo(courseName2); } }); }
Source:
<code>private void modifyDataTable(Admin admin, String tableName) throws IOException { TableDescriptorBuilder dataTableDescBuilder = TableDescriptorBuilder .newBuilder(admin.getDescriptor(TableName.valueOf(tableName))); if (upgrade) { if (admin.getDescriptor(TableName.valueOf(tableName)).hasCoprocessor(Indexer.class.getName())) { <START> if (!dryRun) { <END> dataTableDescBuilder.removeCoprocessor(Indexer.class.getName()); } LOGGER.info("Unloaded Indexer coprocessor on data table " + tableName); } else { LOGGER.info("Indexer coprocessor on data table " + tableName + " is already unloaded"); } if (!admin.getDescriptor(TableName.valueOf(tableName)).hasCoprocessor(IndexRegionObserver.class.getName())) { if (!dryRun) { dataTableDescBuilder.addCoprocessor(IndexRegionObserver.class.getName(), null, QueryServicesOptions.DEFAULT_COPROCESSOR_PRIORITY, prop); } LOGGER.info("Loaded IndexRegionObserver coprocessor on data table " + tableName); } else { LOGGER.info("IndexRegionObserver coprocessor on data table " + tableName + "is already loaded"); } } else { if (admin.getDescriptor(TableName.valueOf(tableName)) .hasCoprocessor(IndexRegionObserver.class.getName())) { if (!dryRun) { dataTableDescBuilder.removeCoprocessor(IndexRegionObserver.class.getName()); } LOGGER.info("Unloaded IndexRegionObserver coprocessor on data table " + tableName); } else { LOGGER.info("IndexRegionObserver coprocessor on data table " + tableName + " is already unloaded"); } if (!admin.getDescriptor(TableName.valueOf(tableName)).hasCoprocessor(Indexer.class.getName())) { if (!dryRun) { dataTableDescBuilder.addCoprocessor(Indexer.class.getName(), null, QueryServicesOptions.DEFAULT_COPROCESSOR_PRIORITY, prop); } LOGGER.info("Loaded Indexer coprocessor on data table " + tableName); } else { LOGGER.info("Indexer coprocessor on data table " + tableName + " is already loaded"); } } if (!dryRun) { admin.modifyTable(dataTableDescBuilder.build()); } }</code><technical_language>simplify helper methods for addCoprocessor(Class coprocessor) removeCoprocessor(Class coprocessor) lines for upgrade lines for rollback</technical_language>

Target:
private void modifyDataTable(Admin admin, String tableName) throws IOException { TableDescriptorBuilder tableDescBuilder = TableDescriptorBuilder .newBuilder(admin.getDescriptor(TableName.valueOf(tableName))); if (upgrade) { removeCoprocessor(admin, tableName, tableDescBuilder, Indexer.class.getName()); addCoprocessor(admin, tableName, tableDescBuilder, IndexRegionObserver.class.getName()); } else { removeCoprocessor(admin, tableName, tableDescBuilder, IndexRegionObserver.class.getName()); addCoprocessor(admin, tableName, tableDescBuilder, Indexer.class.getName()); } if (!dryRun) { admin.modifyTable(tableDescBuilder.build()); } }
Source:
<code><START> public void maxRecordSize(int size) { <END> Arguments.require(size > 0, "Size must be > 0"); maxRecordSize = size; }</code><technical_language>fluent</technical_language>

Target:
public RecordParser maxRecordSize(int size) { Arguments.require(size > 0, "Size must be > 0"); maxRecordSize = size; return this; }
Source:
<code>private void restoreKeyGroupsInStateHandle() throws IOException, StateMigrationException, RocksDBException { try { <START> logger.info("Start to restore from state handle: {}.", currentKeyGroupsStateHandle); <END> currentStateHandleInStream = currentKeyGroupsStateHandle.openInputStream(); cancelStreamRegistry.registerCloseable(currentStateHandleInStream); currentStateHandleInView = new DataInputViewStreamWrapper(currentStateHandleInStream); restoreKVStateMetaData(); restoreKVStateData(); logger.info("Finish to restore from state handle: {}.", currentKeyGroupsStateHandle); } finally { if (cancelStreamRegistry.unregisterCloseable(currentStateHandleInStream)) { IOUtils.closeQuietly(currentStateHandleInStream); } } }</code><technical_language>suggestion logger.info("Starting restore state handle: {}.", currentKeyGroupsStateHandle);</technical_language>

Target:
private void restoreKeyGroupsInStateHandle() throws IOException, StateMigrationException, RocksDBException { try { logger.info("Starting to restore from state handle: {}.", currentKeyGroupsStateHandle); currentStateHandleInStream = currentKeyGroupsStateHandle.openInputStream(); cancelStreamRegistry.registerCloseable(currentStateHandleInStream); currentStateHandleInView = new DataInputViewStreamWrapper(currentStateHandleInStream); restoreKVStateMetaData(); restoreKVStateData(); logger.info("Finished restoring from state handle: {}.", currentKeyGroupsStateHandle); } finally { if (cancelStreamRegistry.unregisterCloseable(currentStateHandleInStream)) { IOUtils.closeQuietly(currentStateHandleInStream); } } }
Source:
<code>public static void sinkToBottom(Entity entity) { <START> IHex fallHex = entity.getGame().getBoard().getHex(entity.getPosition()); <END> int waterDepth = 0; if (fallHex.containsTerrain(Terrains.WATER)) { waterDepth = fallHex.terrainLevel(Terrains.WATER); } entity.setElevation(-waterDepth); }</code><technical_language>Based historical bug reports return early if entity fallHex is null</technical_language>

Target:
public static void sinkToBottom(Entity entity) { if((entity == null) || !entity.getGame().getBoard().contains(entity.getPosition())) { return; } IHex fallHex = entity.getGame().getBoard().getHex(entity.getPosition()); int waterDepth = 0; if (fallHex.containsTerrain(Terrains.WATER)) { boolean hexHasBridge = fallHex.containsTerrain(Terrains.BRIDGE_CF); boolean entityOnTopOfBridge = hexHasBridge && (entity.getElevation() == fallHex.ceiling()); if (!entityOnTopOfBridge) { waterDepth = fallHex.terrainLevel(Terrains.WATER); entity.setElevation(-waterDepth); } } }
Source:
<code>public void testBuild() throws Exception { StdoutUploadStep step = new StdoutUploadStep(CREDENTIALS_ID, BUCKET_URI, new MockUploadModule(executor), LOG_NAME); FreeStyleProject project = jenkins.createFreeStyleProject("testBuild"); <START> Bucket bucket = new Bucket(); <END> bucket.setName(BUCKET_NAME); executor.throwWhen(Storage.Buckets.Get.class, notFoundException); executor.passThruWhen( Storage.Buckets.Insert.class, MockUploadModule.checkBucketName(BUCKET_NAME)); executor.passThruWhen(Storage.Objects.Insert.class, MockUploadModule.checkObjectName(LOG_NAME)); executor.throwWhen(Storage.Buckets.Get.class, notFoundException); executor.passThruWhen( Storage.Buckets.Insert.class, MockUploadModule.checkBucketName(BUCKET_NAME)); executor.passThruWhen(Storage.Objects.Insert.class, MockUploadModule.checkObjectName(LOG_NAME)); project.getBuildersList().add(step); FreeStyleBuild build = project.scheduleBuild2(0).get(); step.perform( build, build.getWorkspace(), build.getWorkspace().createLauncher(TaskListener.NULL), TaskListener.NULL); }</code><technical_language>This for setting name, tests pass it, safe remove this</technical_language>

Target:
public void testBuild() throws Exception { StdoutUploadStep step = new StdoutUploadStep( CREDENTIALS_ID, BUCKET_URI, Optional.of(new MockUploadModule(executor)), LOG_NAME); FreeStyleProject project = jenkins.createFreeStyleProject("testBuild"); executor.throwWhen(Storage.Buckets.Get.class, notFoundException); executor.passThruWhen( Storage.Buckets.Insert.class, MockUploadModule.checkBucketName(BUCKET_NAME)); executor.passThruWhen(Storage.Objects.Insert.class, MockUploadModule.checkObjectName(LOG_NAME)); executor.throwWhen(Storage.Buckets.Get.class, notFoundException); executor.passThruWhen( Storage.Buckets.Insert.class, MockUploadModule.checkBucketName(BUCKET_NAME)); executor.passThruWhen(Storage.Objects.Insert.class, MockUploadModule.checkObjectName(LOG_NAME)); project.getPublishersList().add(step); FreeStyleBuild build = project.scheduleBuild2(0).get(); step.perform( build, build.getWorkspace(), build.getWorkspace().createLauncher(TaskListener.NULL), TaskListener.NULL); }
Source:
<code><START> public Iterable<Chunk> getLoadedChunks() { <END> IChunkProvider provider = this.getChunkProvider(); if (provider instanceof ChunkProviderServer) { return ((ChunkProviderServer) provider).loadedChunks; } return Collections.EMPTY_LIST; }</code><technical_language>issue below, this method needs return loaded chunks of ChunkProviderServer</technical_language>

Target:
public Iterable<Chunk> getLoadedChunks() { return ((ChunkProviderServer) this.getChunkProvider()).loadedChunks; }
Source:
<code>Mono<Response<TopicDescription>> updateTopicWithResponse(TopicDescription topic, Context context) { if (topic == null) { return monoError(logger, new NullPointerException("'topic' cannot be null")); } else if (topic.getName() == null || topic.getName().isEmpty()) { <START> return monoError(logger, new IllegalArgumentException("'topic.getName' cannot be null or empty.")); <END> } else if (context == null) { return monoError(logger, new NullPointerException("'context' cannot be null.")); } final CreateTopicBodyContent content = new CreateTopicBodyContent() .setType(CONTENT_TYPE) .setTopicDescription(topic); final CreateTopicBody createEntity = new CreateTopicBody() .setContent(content); final Context withTracing = context.addData(AZ_TRACING_NAMESPACE_KEY, SERVICE_BUS_TRACING_NAMESPACE_VALUE); try { return entityClient.putWithResponseAsync(topic.getName(), createEntity, "*", withTracing) .onErrorMap(ServiceBusManagementAsyncClient::mapException) .map(response -> deserializeTopic(response)); } catch (RuntimeException ex) { return monoError(logger, ex); } }</code><technical_language>topic.getName() == null : NullPointerException</technical_language>

Target:
Mono<Response<TopicDescription>> updateTopicWithResponse(TopicDescription topic, Context context) { if (topic == null) { return monoError(logger, new NullPointerException("'topic' cannot be null")); } else if (context == null) { return monoError(logger, new NullPointerException("'context' cannot be null.")); } final CreateTopicBodyContent content = new CreateTopicBodyContent() .setType(CONTENT_TYPE) .setTopicDescription(topic); final CreateTopicBody createEntity = new CreateTopicBody() .setContent(content); final Context withTracing = context.addData(AZ_TRACING_NAMESPACE_KEY, SERVICE_BUS_TRACING_NAMESPACE_VALUE); try { return entityClient.putWithResponseAsync(topic.getName(), createEntity, "*", withTracing) .onErrorMap(ServiceBusManagementAsyncClient::mapException) .map(response -> deserializeTopic(response)); } catch (RuntimeException ex) { return monoError(logger, ex); } }
Source:
<code><START> public Map<String, String> getError() { <END> Map<String, String> error = new HashMap<String, String>(); if(row.has("key") && row.has("error")) { error.put(getKey().toString(), row.get("error").getAsString()); } return error; }</code><technical_language>this simplified if error string</technical_language>

Target:
public String getError() { String error = null; if(row.has("key") && row.has("error")) { error = row.get("error").getAsString(); } return error; }
Source:
<code>private void compactMoveChunks(Iterable<Chunk> move) { assert storeLock.isHeldByCurrentThread(); if (move != null) { long leftmostBlock = Long.MAX_VALUE; for (Chunk chunk : move) { leftmostBlock = Math.min(leftmostBlock, chunk.block); } writeStoreHeader(); sync(); long reservedAreaSize = getFileLengthInUse(); for (Iterator<Chunk> iter = move.iterator(); iter.hasNext(); ) { Chunk chunk = iter.next(); if (fileStore.predictAllocation(chunk.len) >= leftmostBlock) { break; } moveChunk(chunk, 0); iter.remove(); } for (Chunk chunk : move) { moveChunk(chunk, reservedAreaSize); } <START> <END> reuseSpace = false; commit(); sync(); Chunk chunk = lastChunk; reuseSpace = true; for (Chunk c : move) { moveChunk(c, 0); } commit(); sync(); if (moveChunk(chunk, 0)) { commit(); } shrinkFileIfPossible(0); sync(); } }</code><technical_language>Here, is good. A part moved left of file, another moved right of file</technical_language>

Target:
private void compactMoveChunks(Iterable<Chunk> move) { assert storeLock.isHeldByCurrentThread(); if (move != null) { assert lastChunk != null; writeStoreHeader(); sync(); Iterator<Chunk> iterator = move.iterator(); assert iterator.hasNext(); long leftmostBlock = iterator.next().block; long originalBlokCount = getAfterLastBlock(); for (Chunk chunk : move) { moveChunk(chunk, leftmostBlock, originalBlokCount); } store(leftmostBlock, originalBlokCount); sync(); Chunk chunkToMove = lastChunk; long postEvacuationBlockCount = getAfterLastBlock(); boolean chunkToMoveIsAlreadyInside = chunkToMove.block < leftmostBlock; boolean movedToEOF = !chunkToMoveIsAlreadyInside; for (Chunk c : move) { if (c.block >= originalBlokCount) { moveChunk(c, originalBlokCount, postEvacuationBlockCount); assert c.block < originalBlokCount; movedToEOF = true; } } assert postEvacuationBlockCount >= getAfterLastBlock(); if (movedToEOF) { boolean moved = moveChunkInside(chunkToMove, originalBlokCount); store(originalBlokCount, postEvacuationBlockCount); sync(); long lastBoundary = moved || chunkToMoveIsAlreadyInside ? postEvacuationBlockCount : chunkToMove.block; moved = !moved && moveChunkInside(chunkToMove, lastBoundary); if (moveChunkInside(lastChunk, lastBoundary) || moved) { store(lastBoundary, -1); } } shrinkFileIfPossible(0); sync(); } }
Source:
<code>GHTreeBuilder(GHRepository repo) { this.repo = repo; <START> req = repo.root.retrieve().method("POST"); <END> }</code><technical_language>remove method("POST") set HTTP method create</technical_language>

Target:
GHTreeBuilder(GHRepository repo) { this.repo = repo; req = repo.root.createRequest(); }
Source:
<code><START> public List<Biome.SpawnListEntry> getSpawns(List<Biome.SpawnListEntry> defaults, World world, EnumCreatureType creatureType, BlockPos pos) <END> { if (spawn) { logger.info("Getting spawns {}", generator); spawn = false; } return defaults; }</code><technical_language>need return a list more; modification done list provided</technical_language>

Target:
public List<Biome.SpawnListEntry> getSpawns(List<Biome.SpawnListEntry> defaults, World world, EnumCreatureType creatureType, BlockPos pos) { if (spawn) { logger.info("Getting spawns {}", generator); spawn = false; } if(creatureType == EnumCreatureType.MONSTER){ return spawnList; } return defaults; }