auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public YouViewResult upload(Payload payload) { final String queryUrl = urlBase + TRANSACTION_URL_STEM; final String payloadString = payload.payload(); log.trace("POSTing YouView output xml to {}", queryUrl); Retryer<HttpResponse> retryer = getHttpRequestRetryer(); Callable<HttpResponse> uploadCall = new Callable<HttpResponse>() { @Override public HttpResponse call() throws Exception { uploadRetryCount++; <START> log.trace("YouView upload retry count - {}", uploadRetryCount); <END> return httpClient.post(queryUrl, new StringPayload(payloadString)); } }; try { HttpResponse response = retryer.call(uploadCall); uploadRetryCount = 0; if (response.statusCode() == HttpServletResponse.SC_ACCEPTED) { String transactionUrl = parseIdFrom(response.header("Location")); log.trace("Upload successful. Transaction url: " + transactionUrl); return success(transactionUrl, clock.now(), response.statusCode()); } else { return failure(response.body(), clock.now(), response.statusCode()); } } catch (ExecutionException e) { throw new YouViewClientException("Error uploading " + payload, e); } catch (RetryException e) { throw new YouViewClientException("Error uploading " + payload, e); } }</code><technical_language>again, WARN if retrying</technical_language>

Target:
public YouViewResult upload(Payload payload) { final String queryUrl = urlBase + TRANSACTION_URL_STEM; final String payloadString = payload.payload(); log.trace("POSTing YouView output xml to {}", queryUrl); Retryer<HttpResponse> retryer = getHttpRequestRetryer(); Callable<HttpResponse> uploadCall = new Callable<HttpResponse>() { @Override public HttpResponse call() throws Exception { uploadRetryCount++; if (uploadRetryCount > 1) { log.warn("YouView upload retry count - {}", uploadRetryCount); } return httpClient.post(queryUrl, new StringPayload(payloadString)); } }; try { HttpResponse response = retryer.call(uploadCall); uploadRetryCount = 0; if (response.statusCode() == HttpServletResponse.SC_ACCEPTED) { String transactionUrl = parseIdFrom(response.header("Location")); log.trace("Upload successful. Transaction url: " + transactionUrl); return success(transactionUrl, clock.now(), response.statusCode()); } else { return failure(response.body(), clock.now(), response.statusCode()); } } catch (ExecutionException e) { throw new YouViewClientException("Error uploading " + payload, e); } catch (RetryException e) { throw new YouViewClientException("Error uploading " + payload, e); } }
Source:
<code>public static BatchSizeRecorder create(String safeLoggerIdentifier) { Histogram meter = SharedTaggedMetricRegistries.getSingleton().histogram(MetricName.builder() .safeName(AUTOBATCHER_METER) <START> .putSafeTags("safeIdentifier", safeLoggerIdentifier) <END> .build()); return new BatchSizeRecorder(meter); }</code><technical_language>nit: safeTags required safe definition, identifier, safeIdentifier key is</technical_language>

Target:
public static BatchSizeRecorder create(String safeLoggerIdentifier) { Histogram histogram = SharedTaggedMetricRegistries.getSingleton().histogram(MetricName.builder() .safeName(AUTOBATCHER_METER) .putSafeTags("identifier", safeLoggerIdentifier) .build()); return new BatchSizeRecorder(histogram); }
Source:
<code>public ComparisonExecutor(AliasResolver aliasResolver) { <START> asyncComparisonExecutor = newAsyncComparisonExecutor(); <END> this.aliasResolver = aliasResolver; }</code><technical_language>I argument constructor (keep default visibility) provide a factory method creates ComparisonExecutor "production" executor service</technical_language>

Target:
public ComparisonExecutor(AliasResolver aliasResolver) { this(newAsyncComparisonExecutor(), aliasResolver); }
Source:
<code>public SortField customType() { <START> BytesRef byteRefMissingValue = new BytesRef( missingValue.toString() ); <END> return new SortField( absoluteFieldPath, new LuceneMissingValueComparatorSource( byteRefMissingValue ), order == SortOrder.DESC ); }</code><technical_language>(String) missingValue missingValue.toString(). way, if end else a String here, fail is wrong. more point... org.hibernate.search.backend.lucene.types.sort.impl.LuceneTextFieldSortBuilder#encodeMissingAs return BytesRef directly. Right encodeMissingAs method converts BytesRef a String, customType converts a BytesRef. I tell, customType value, call setEffectiveMissingValue happen if missingValue is null SortMissingValue.MISSING_FIRST SortMissingValue.MISSING_LAST</technical_language>

Target:
public SortField customType() { return new SortField( absoluteFieldPath, new LuceneMissingValueComparatorSource( (BytesRef) missingValue ), order == SortOrder.DESC ); }
Source:
<code>public void testPercentilesWithRandomNumbersAndLinearBucketing() { long seed = new Random().nextLong(); int sizeInBytes = 1000 * 1000; long maximumValue = 1000 * 24 * 60 * 60 * 1000L; try { Random prng = new Random(seed); int numberOfValues = 5000 + prng.nextInt(10_000); Percentiles percs = new Percentiles(sizeInBytes, maximumValue, BucketSizing.LINEAR, new Percentile(metrics.metricName("test.p90", "grp1"), 90), new Percentile(metrics.metricName("test.p99", "grp1"), 99)); MetricConfig config = new MetricConfig().eventWindow(50).samples(2); Sensor sensor = metrics.sensor("test", config); sensor.add(percs); Metric p90 = this.metrics.metrics().get(metrics.metricName("test.p90", "grp1")); Metric p99 = this.metrics.metrics().get(metrics.metricName("test.p99", "grp1")); final List<Long> values = new ArrayList<>(numberOfValues); for (int i = 0; i < numberOfValues; ++i) { long value = Math.abs(prng.nextLong()) % maximumValue; values.add(value); sensor.record(value); } Collections.sort(values); int p90Index = (int)Math.ceil(((double)(90 * numberOfValues)) / 100); int p99Index = (int)Math.ceil(((double)(99 * numberOfValues)) / 100); double expectedP90 = values.get(p90Index - 1); double expectedP99 = values.get(p99Index - 1); <START> assertEquals(expectedP90, (Double) p90.metricValue(), expectedP90 / 10); <END> assertEquals(expectedP99, (Double) p99.metricValue(), expectedP99 / 10); } catch (AssertionError e) { throw new AssertionError("Assertion failed in randomized test. Reproduce with seed = " + seed + " .", e); } }</code><technical_language>see..</technical_language>

Target:
public void testPercentilesWithRandomNumbersAndLinearBucketing() { long seed = new Random().nextLong(); int sizeInBytes = 1000 * 1000; long maximumValue = 1000 * 24 * 60 * 60 * 1000L; try { Random prng = new Random(seed); int numberOfValues = 5000 + prng.nextInt(10_000); Percentiles percs = new Percentiles(sizeInBytes, maximumValue, BucketSizing.LINEAR, new Percentile(metrics.metricName("test.p90", "grp1"), 90), new Percentile(metrics.metricName("test.p99", "grp1"), 99)); MetricConfig config = new MetricConfig().eventWindow(50).samples(2); Sensor sensor = metrics.sensor("test", config); sensor.add(percs); Metric p90 = this.metrics.metrics().get(metrics.metricName("test.p90", "grp1")); Metric p99 = this.metrics.metrics().get(metrics.metricName("test.p99", "grp1")); final List<Long> values = new ArrayList<>(numberOfValues); for (int i = 0; i < numberOfValues; ++i) { long value = (Math.abs(prng.nextLong()) - 1) % maximumValue; values.add(value); sensor.record(value); } Collections.sort(values); int p90Index = (int) Math.ceil(((double) (90 * numberOfValues)) / 100); int p99Index = (int) Math.ceil(((double) (99 * numberOfValues)) / 100); double expectedP90 = values.get(p90Index - 1); double expectedP99 = values.get(p99Index - 1); assertEquals(expectedP90, (Double) p90.metricValue(), expectedP90 / 10); assertEquals(expectedP99, (Double) p99.metricValue(), expectedP99 / 10); } catch (AssertionError e) { throw new AssertionError("Assertion failed in randomized test. Reproduce with seed = " + seed + " .", e); } }
Source:
<code><START> private CompletionStage<Void> closeClientResources(long quietPeriod, long timeout, TimeUnit timeUnit) { <END> List<CompletableFuture<Void>> groupCloseFutures = new ArrayList<>(); if (!sharedResources) { Future<?> groupCloseFuture = clientResources.shutdown(quietPeriod, timeout, timeUnit); groupCloseFutures.add(toCompletableFuture(groupCloseFuture)); } else { for (EventLoopGroup eventExecutors : eventLoopGroups.values()) { Future<?> groupCloseFuture = clientResources.eventLoopGroupProvider().release(eventExecutors, quietPeriod, timeout, timeUnit); groupCloseFutures.add(toCompletableFuture(groupCloseFuture)); } } return Futures.allOf(groupCloseFutures); }</code><technical_language>this return CompletableFuture instead of CompletionStage for consistency other methods</technical_language>

Target:
private CompletableFuture<Void> closeClientResources(long quietPeriod, long timeout, TimeUnit timeUnit) { List<CompletableFuture<Void>> groupCloseFutures = new ArrayList<>(); if (!sharedResources) { Future<?> groupCloseFuture = clientResources.shutdown(quietPeriod, timeout, timeUnit); groupCloseFutures.add(toCompletableFuture(groupCloseFuture)); } else { for (EventLoopGroup eventExecutors : eventLoopGroups.values()) { Future<?> groupCloseFuture = clientResources.eventLoopGroupProvider().release(eventExecutors, quietPeriod, timeout, timeUnit); groupCloseFutures.add(toCompletableFuture(groupCloseFuture)); } } return Futures.allOf(groupCloseFutures); }
Source:
<code>List<Municipality> GetMunicipalityByCourtId(@PathVariable("courtId") Long courtId) throws NotFoundException { List<Municipality> municipalities = municipalityManager.GetMunicipalitiesByCourtId(courtId); <START> return municipalities; <END> }</code><technical_language>local variable is redundant here</technical_language>

Target:
List<Municipality> GetMunicipalityByCourtId(@PathVariable("courtId") Long courtId) throws NotFoundException { return municipalityManager.GetMunicipalitiesByCourtId(courtId); }
Source:
<code>public static <T> Iterable<T> servicesOfType(Class<T> serviceType) { <START> if (SafeOsgi.inOSGi()) { <END> return OsgiServiceLoader.load(serviceType); } else { return ServiceLoader.load(serviceType, ClassLoading.class.getClassLoader()); } }</code><technical_language>is OSGi is in classpath get a NoClassDefFoundError? Do a test for that? default class loader ClassLoading instead of class loader ClassLoading</technical_language>

Target:
public static <T> Iterable<T> servicesOfType(Class<T> serviceType) { if (SafeOsgi.useOSGiServiceLoading()) { return OsgiServiceLoader.load(serviceType); } else { return ServiceLoader.load(serviceType, ClassLoading.class.getClassLoader()); } }
Source:
<code>public void repositoryUrl() throws Exception { GitHubSCMSource instance = load(); assertThat(instance.getId(), is("e4d8c11a-0d24-472f-b86b-4b017c160e9a")); <START> assertThat(instance.getApiUri(), is("<LINK_0>")); <END> assertThat(instance.getRepoOwner(), is("joseblas")); assertThat(instance.getRepository(), is("jx")); assertThat(instance.getCredentialsId(), is("abcd")); assertThat(instance.getRepositoryUrl(), is("<LINK_1>")); assertThat(instance.getTraits(), is(Collections.<SCMSourceTrait>emptyList())); assertThat(instance.getCheckoutCredentialsId(), is(GitHubSCMSource.DescriptorImpl.SAME)); assertThat(instance.getIncludes(), is("*")); assertThat(instance.getExcludes(), is("")); assertThat(instance.getBuildOriginBranch(), is(false)); assertThat(instance.getBuildOriginBranchWithPR(), is(false)); assertThat(instance.getBuildOriginPRHead(), is(false)); assertThat(instance.getBuildOriginPRMerge(), is(false)); assertThat(instance.getBuildForkPRHead(), is(false)); assertThat(instance.getBuildForkPRMerge(), is(false)); }</code><technical_language>nit: I change this GitHubSCMSource.GITHUB_URL before</technical_language>

Target:
public void repositoryUrl() throws Exception { GitHubSCMSource instance = load(); assertThat(instance.getId(), is("e4d8c11a-0d24-472f-b86b-4b017c160e9a")); assertThat(instance.getApiUri(), is(GitHubSCMSource.GITHUB_URL)); assertThat(instance.getRepoOwner(), is("joseblas")); assertThat(instance.getRepository(), is("jx")); assertThat(instance.getCredentialsId(), is("abcd")); assertThat(instance.getRepositoryUrl(), is("<LINK_1>")); assertThat(instance.getTraits(), is(Collections.<SCMSourceTrait>emptyList())); assertThat(instance.getCheckoutCredentialsId(), is(GitHubSCMSource.DescriptorImpl.SAME)); assertThat(instance.getIncludes(), is("*")); assertThat(instance.getExcludes(), is("")); assertThat(instance.getBuildOriginBranch(), is(false)); assertThat(instance.getBuildOriginBranchWithPR(), is(false)); assertThat(instance.getBuildOriginPRHead(), is(false)); assertThat(instance.getBuildOriginPRMerge(), is(false)); assertThat(instance.getBuildForkPRHead(), is(false)); assertThat(instance.getBuildForkPRMerge(), is(false)); }
Source:
<code>public BikeFlagEncoder() { <START> this(new PMap()); <END> }</code><technical_language>previously defaults (e.g. 4,2,0 for bike 5,5,0 for car). is this necessary anymore? I curious</technical_language>

Target:
public BikeFlagEncoder() { this(4, 2, 0); }
Source:
<code><START> private Module[] getModules(Guice guice, Injector parentInjector, Class<?> testClass) { <END> List<Module> result = Lists.newArrayList(); for (Class<? extends Module> moduleClass : guice.modules()) { List<Module> modules = context.getGuiceModules(moduleClass); if (modules != null && !modules.isEmpty()) { result.addAll(modules); } else { Module instance = parentInjector.getInstance(moduleClass); result.add(instance); context.getGuiceModules(moduleClass).add(instance); } } Class<? extends IModuleFactory> factory = guice.moduleFactory(); if (factory != IModuleFactory.class) { IModuleFactory factoryInstance = parentInjector.getInstance(factory); Module moduleClass = factoryInstance.createModule(context, testClass); if (moduleClass != null) { result.add(moduleClass); } } return result.toArray(new Module[result.size()]); }</code><technical_language>Return a list instead of array</technical_language>

Target:
private List<Module> getModules(Guice guice, Injector parentInjector, Class<?> testClass) { List<Module> result = Lists.newArrayList(); for (Class<? extends Module> moduleClass : guice.modules()) { List<Module> modules = context.getGuiceModules(moduleClass); if (modules != null && !modules.isEmpty()) { result.addAll(modules); } else { Module instance = parentInjector.getInstance(moduleClass); result.add(instance); context.getGuiceModules(moduleClass).add(instance); } } Class<? extends IModuleFactory> factory = guice.moduleFactory(); if (factory != IModuleFactory.class) { IModuleFactory factoryInstance = parentInjector.getInstance(factory); Module moduleClass = factoryInstance.createModule(context, testClass); if (moduleClass != null) { result.add(moduleClass); } } return result; }
Source:
<code>public String getPeerUserAgent() { return <START> UserAgent.getAgent(currentRequest.getOptions(), userAgent); <END> }</code><technical_language>existing code works null options (as inspecting UserAgent#getAgent), this throw NPE if is currentRequest. pass null if currentRequest is null preserve existing behavior</technical_language>

Target:
public String getPeerUserAgent() { Set<String> clientCapabilities = currentRequest == null ? null : currentRequest.getClientCapabilities(); return UserAgent.getAgent(clientCapabilities, userAgent); }
Source:
<code>protected String[] getDisallowedNameExpressions() { <START> return new String[] { "^(?!private-encrypted).*" }; <END> }</code><technical_language>suggestion return new String[] { "^(?!private-encrypted-).*" }; I final - is a compulsory part of prefix</technical_language>

Target:
protected String[] getDisallowedNameExpressions() { return new String[] { "^(?!private-encrypted-).*" }; }
Source:
<code>public void testGetMediaBytes() { byte[] testBytes = {}; when(urlService.fetchUrlConnection(any(String.class))).thenReturn(urlConnection); when(urlService.fetchInputStreamFromConnection(urlConnection)).thenReturn(inputStream); <START> when(urlService.inputStreamToByteArray(any(InputStream.class))).thenReturn(testBytes); <END> Response response = resource.getMediaBytes(key, "Test"); byte[] userResponse = (byte[]) response.getEntity(); assertEquals(response.getStatusInfo(), Response.Status.OK); assertEquals(userResponse, testBytes); }</code><technical_language>inputStream, want when() actual object instead of any(InputStream.class)</technical_language>

Target:
public void testGetMediaBytes() { byte[] testBytes = {}; when(urlService.fetchUrlConnection(any(String.class))).thenReturn(urlConnection); when(urlService.fetchInputStreamFromConnection(urlConnection)).thenReturn(inputStream); when(urlService.inputStreamToByteArray(inputStream)).thenReturn(testBytes); Response response = resource.getMediaBytes(key, "Test"); byte[] userResponse = (byte[]) response.getEntity(); assertEquals(response.getStatusInfo(), Response.Status.OK); assertEquals(userResponse, testBytes); }
Source:
<code>protected void onCreate(@Nullable Bundle savedInstanceState) { <START> super.onCreate(savedInstanceState); <END> if (ContextCompat.checkSelfPermission(this, WRITE_EXTERNAL_STORAGE) != PERMISSION_GRANTED) { ActivityCompat.requestPermissions(this, new String[]{WRITE_EXTERNAL_STORAGE}, PERMISSIONS_REQUEST_WRITE_EXTERNAL_STORAGE); } else { writePermission= true; asked = true; } embedCode = getIntent().getExtras().getString("embed_code"); }</code><technical_language>configure IDE space for indentation, I adding 8 spaces. standard is 2 4</technical_language>

Target:
protected void onCreate(@Nullable Bundle savedInstanceState) { super.onCreate(savedInstanceState); if (ContextCompat.checkSelfPermission(this, WRITE_EXTERNAL_STORAGE) != PERMISSION_GRANTED) { ActivityCompat.requestPermissions(this, new String[]{WRITE_EXTERNAL_STORAGE}, PERMISSIONS_REQUEST_WRITE_EXTERNAL_STORAGE); } else { writePermission= true; asked = true; } }
Source:
<code>private Map<String, Object> generateJsonDiskDescription(Map<String, Object> descriptionFields, String... descriptionFieldsPriority) { <START> String diskAlias = descriptionFields.get(DISK_ALIAS).toString(); <END> Map<String, Object> descriptionMap = new TreeMap<>(); int descriptionAvailableLength = METADATA_DESCRIPTION_MAX_LENGTH; for (int priority = 0; priority < descriptionFieldsPriority.length; ++priority) { if (descriptionAvailableLength == 0) { String[] descriptionFieldsLeft = Arrays.copyOfRange(descriptionFieldsPriority, priority, descriptionFieldsPriority.length); auditLogNoSpaceToStoreDiskFields(diskAlias, StringUtils.join(descriptionFieldsLeft, ", ", 0, descriptionFieldsLeft.length)); break; } descriptionAvailableLength = addFieldToDescriptionMap(descriptionMap, diskAlias, descriptionFieldsPriority[priority], descriptionFields.get(descriptionFieldsPriority[priority]).toString(), descriptionAvailableLength); } return descriptionMap; }</code><technical_language>huh</technical_language>

Target:
private Map<String, Object> generateJsonDiskDescription(Map<String, Object> descriptionFields, String... descriptionFieldsPriority) { String diskAlias = descriptionFields.get(DISK_ALIAS).toString(); Map<String, Object> descriptionMap = new TreeMap<>(); int descriptionAvailableLength = METADATA_DESCRIPTION_MAX_LENGTH; for (int priority = 0; priority < descriptionFieldsPriority.length; ++priority) { String fieldName = descriptionFieldsPriority[priority]; String fieldValue = descriptionFields.get(fieldName).toString(); descriptionAvailableLength = addFieldToDescriptionMap(descriptionMap, diskAlias, fieldName, fieldValue, descriptionAvailableLength); if (descriptionAvailableLength <= 0) { String storedFieldValue = (String) descriptionMap.get(fieldName); String[] descriptionFieldsLeft = Arrays.copyOfRange(descriptionFieldsPriority, priority, descriptionFieldsPriority.length); String diskFieldsNames = StringUtils.join(descriptionFieldsLeft, ", ", 0, descriptionFieldsLeft.length); if (storedFieldValue == null) { auditLogFailedToStoreDiskFields(diskAlias, diskFieldsNames); } else if (storedFieldValue.length() < fieldValue.length()) { auditLogFailedToStoreEntireDiskField(diskAlias, fieldName, storedFieldValue, diskFieldsNames); } break; } } return descriptionMap; }
Source:
<code>protected boolean canDoAction() { initializeObjectState(); <START> getVmDAO().get(getVmId()); <END> if (!validateVmNotDuringSnapshot()) { handleCanDoActionFailure(); return false; } if (!validateSnapshotExists()) { handleCanDoActionFailure(); return false; } if (!validateImages()) { handleCanDoActionFailure(); return false; } if (!validateImageNotInTemplate()) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_CANNOT_REMOVE_IMAGE_TEMPLATE); handleCanDoActionFailure(); return false; } if (!validateImageNotActive()) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_CANNOT_REMOVE_ACTIVE_IMAGE); handleCanDoActionFailure(); return false; } getReturnValue().setCanDoAction(true); return true; }</code><technical_language>I code line removed</technical_language>

Target:
protected boolean canDoAction() { initializeObjectState(); if (!validateVmNotDuringSnapshot()) { handleCanDoActionFailure(); return false; } if (!validateSnapshotExists()) { handleCanDoActionFailure(); return false; } if (!validateImages()) { handleCanDoActionFailure(); return false; } if (!validateImageNotInTemplate()) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_CANNOT_REMOVE_IMAGE_TEMPLATE); handleCanDoActionFailure(); return false; } if (!validateImageNotActive()) { addCanDoActionMessage(VdcBllMessages.ACTION_TYPE_FAILED_CANNOT_REMOVE_ACTIVE_IMAGE); handleCanDoActionFailure(); return false; } getReturnValue().setCanDoAction(true); return true; }
Source:
<code>void mapActionItemsToSelection(ISelection selection) { setMoveItemsEnabled(false); if (selection == null || selection.isEmpty()) return; if (selection instanceof IStructuredSelection) { IStructuredSelection structured = (IStructuredSelection) selection; Object obj = structured.getFirstElement(); if (!(obj instanceof PlanElement)) return; PlanElement firstSelectedEntry = (PlanElement) obj; PlanElement lastSelectedEntry = firstSelectedEntry; ElementAction type = firstSelectedEntry.getPlanElementAction(); boolean singleTypeSelected = true; if (structured.size() > 1) { for (Iterator iterator = structured.iterator(); iterator .hasNext();) { <START> Object selectedObj = iterator.next(); <END> if (!(selectedObj instanceof PlanElement)) continue; PlanElement entry = lastSelectedEntry = (PlanElement) selectedObj; if (type != entry.getPlanElementAction()) { singleTypeSelected = false; break; } } } if (singleTypeSelected) unselectAllActionItemsExecpt(getItemFor(type)); else unselectAllActionItemsExecpt(null); enableMoveButtons(firstSelectedEntry, lastSelectedEntry); } }</code><technical_language>While in here, replace this: for (Object selectedObj : structured.toList()) {</technical_language>

Target:
void mapActionItemsToSelection(ISelection selection) { setMoveItemsEnabled(false); if (selection == null || selection.isEmpty()) return; if (selection instanceof IStructuredSelection) { IStructuredSelection structured = (IStructuredSelection) selection; Object obj = structured.getFirstElement(); if (!(obj instanceof PlanElement)) return; PlanElement firstSelectedEntry = (PlanElement) obj; PlanElement lastSelectedEntry = firstSelectedEntry; ElementAction type = firstSelectedEntry.getPlanElementAction(); boolean singleTypeSelected = true; if (structured.size() > 1) { for (Object selectedObj : structured.toList()) { if (!(selectedObj instanceof PlanElement)) continue; PlanElement entry = (PlanElement) selectedObj; lastSelectedEntry = entry; if (type != entry.getPlanElementAction()) { singleTypeSelected = false; } } } if (singleTypeSelected) unselectAllActionItemsExecpt(getItemFor(type)); else unselectAllActionItemsExecpt(null); enableMoveButtons(firstSelectedEntry, lastSelectedEntry); } }
Source:
<code><START> public Image loadPreview(String mapName, PreviewSize previewSize) { <END> if (mapGeneratorService.isGeneratedMap(mapName)) { try { BufferedImage image = ImageIO.read(forgedAlliancePreferences.getCustomMapsDirectory().resolve(mapName).resolve(mapName + "_preview.png").toFile()); return SwingFXUtils.toFXImage(image, null); } catch (IOException e) { return mapGeneratorService.getGeneratedMapPreviewImage(); } } return loadPreview(getPreviewUrl(mapName, mapPreviewUrlFormat, previewSize), previewSize); }</code><technical_language>I random icon a feature done guys wrote fetch preview... maintainer of map gen I leave u, mystery map join interesting</technical_language>

Target:
public Image loadPreview(String mapName, PreviewSize previewSize) { if (mapGeneratorService.isGeneratedMap(mapName)) { Path previewPath = forgedAlliancePreferences.getCustomMapsDirectory().resolve(mapName).resolve(mapName + "_preview.png"); if (Files.exists(previewPath)) { return new Image(Files.newInputStream(previewPath)); } else { return mapGeneratorService.getGeneratedMapPreviewImage(); } } return loadPreview(getPreviewUrl(mapName, mapPreviewUrlFormat, previewSize), previewSize); }
Source:
<code>public void fillMenu() { if (descriptionFileChanged || dRepresentationChanged) { descriptionFileChanged = false; dRepresentationChanged = false; final Map<TableMapping, DeleteTargetColumnAction> mappingToDeleteActions = Maps.newHashMap(); final Map<TableMapping, List<AbstractToolAction>> mappingToCreateActions = Maps.newHashMap(); final List<AbstractToolAction> createActionsForTable = Lists.newArrayList(); calculateAvailableMenus(mappingToDeleteActions, mappingToCreateActions, createActionsForTable); mgr.setRemoveAllWhenShown(true); if <START> (dRepresentationChanged || <END> actualMenuListener == null) { if (dRepresentationChanged) { mgr.removeMenuListener(actualMenuListener); } actualMenuListener = new DTableMenuListener((DTable) dRepresentation, this, mappingToCreateActions, mappingToDeleteActions, createActionsForTable); mgr.addMenuListener(actualMenuListener); final Menu menu = mgr.createContextMenu(treeViewer.getControl()); treeViewer.getControl().setMenu(menu); treeEditor.getSite().registerContextMenu(mgr, treeViewer); } else { mgr.removeAll(); actualMenuListener.setMappingToCreateActions(mappingToCreateActions); actualMenuListener.setMappingToDeleteActions(mappingToDeleteActions); actualMenuListener.setCreateActionsForTable(createActionsForTable); } getCreateLineMenu().update(createActionsForTable); getCreateTargetColumnMenu().update(createActionsForTable); } }</code><technical_language>testing dRepresentationChanged is set false "if" statement</technical_language>

Target:
public void fillMenu() { if (descriptionFileChanged || dRepresentationReplaced) { descriptionFileChanged = false; final Map<TableMapping, DeleteTargetColumnAction> mappingToDeleteActions = Maps.newHashMap(); final Map<TableMapping, List<AbstractToolAction>> mappingToCreateActions = Maps.newHashMap(); final List<AbstractToolAction> createActionsForTable = Lists.newArrayList(); calculateAvailableMenus(mappingToDeleteActions, mappingToCreateActions, createActionsForTable); mgr.setRemoveAllWhenShown(true); if (dRepresentationReplaced || actualMenuListener == null) { if (dRepresentationReplaced) { mgr.removeMenuListener(actualMenuListener); } actualMenuListener = new DTableMenuListener((DTable) dRepresentation, this, mappingToCreateActions, mappingToDeleteActions, createActionsForTable); mgr.addMenuListener(actualMenuListener); final Menu menu = mgr.createContextMenu(treeViewer.getControl()); treeViewer.getControl().setMenu(menu); treeEditor.getSite().registerContextMenu(mgr, treeViewer); } else { mgr.removeAll(); actualMenuListener.setMappingToCreateActions(mappingToCreateActions); actualMenuListener.setMappingToDeleteActions(mappingToDeleteActions); actualMenuListener.setCreateActionsForTable(createActionsForTable); } getCreateLineMenu().update(createActionsForTable); getCreateTargetColumnMenu().update(createActionsForTable); dRepresentationReplaced = false; } }
Source:
<code>public PMML4Result evaluate(String modelName, PMMLContext context) { <START> logger.debug("evaluate {}", modelName, context); <END> KiePMMLModel toEvaluate = getModel(modelName).orElseThrow(() -> new KiePMMLException("Failed to retrieve model with name " + modelName)); return evaluate(toEvaluate, context); }</code><technical_language>please add isDebugEnabled check</technical_language>

Target:
public PMML4Result evaluate(String modelName, PMMLContext context) { if (logger.isDebugEnabled()) { logger.debug("evaluate {}", modelName, context); } KiePMMLModel toEvaluate = getModel(modelName).orElseThrow(() -> new KiePMMLException("Failed to retrieve model with name " + modelName)); return evaluate(toEvaluate, context); }
Source:
<code>private static <T> List<T> loadFixtures(List<FixtureConfiguration> configurations, Class<T> clazz, String fixtureType, boolean defaultOnly) { List<T> result = new ArrayList<T>(); <START> String defaultOverwrite = System.getProperty("defaultOverwrite", ""); <END> for (FixtureConfiguration configuration : configurations) { if (configuration != null && fixtureType.equals(configuration.getType()) && (!defaultOnly || (defaultOverwrite.equals("") && (configuration.isDefault())) || (configuration.url.equals(defaultOverwrite)))) { try { Constructor<T> constructor = clazz.getConstructor(FixtureConfiguration.class); result.add(constructor.newInstance(configuration)); } catch (Exception e) { throw new RuntimeException("Unexpected error creating test fixture", e); } } } return result; }</code><technical_language>System properties meaningful names mylyn.tests.configuration.url</technical_language>

Target:
private static <T> List<T> loadFixtures(List<FixtureConfiguration> configurations, Class<T> clazz, String fixtureType, boolean defaultOnly) { List<T> result = new ArrayList<T>(); String defaultOverwriteUrl = System.getProperty("mylyn.tests.configuration.url", ""); for (FixtureConfiguration configuration : configurations) { if (configuration != null && fixtureType.equals(configuration.getType()) && (!defaultOnly || (defaultOverwriteUrl.equals("") && configuration.isDefault()) || (configuration.url.equals(defaultOverwriteUrl)))) { try { Constructor<T> constructor = clazz.getConstructor(FixtureConfiguration.class); result.add(constructor.newInstance(configuration)); } catch (Exception e) { throw new RuntimeException("Unexpected error creating test fixture", e); } } } return result; }
Source:
<code>public void close() throws IOException { try { <START> super.close(); <END> } finally { is.close(); } }</code><technical_language>is need call super.close() InputStream. is a no-op method. Instead need do is.close();</technical_language>

Target:
public void close() throws IOException { is.close(); }
Source:
<code>public RntbdRequestRecord request(final RntbdRequestArgs args) { this.throwIfClosed(); int concurrentRequestSnapshot = this.concurrentRequests.incrementAndGet(); if (concurrentRequestSnapshot > this.maxConcurrentRequests) { <START> return FailFastRntbdRequestRecord.createAndFailFast( <END> args, concurrentRequestSnapshot, concurrentRequests, metrics, remoteAddress); } this.lastRequestNanoTime.set(args.nanoTimeCreated()); final RntbdRequestRecord record = this.write(args); record.whenComplete((response, error) -> { this.concurrentRequests.decrementAndGet(); this.metrics.markComplete(record); }); return record; }</code><technical_language>Do upstream retries fail retry? (not a blocker now)</technical_language>

Target:
public RntbdRequestRecord request(final RntbdRequestArgs args) { this.throwIfClosed(); int concurrentRequestSnapshot = this.concurrentRequests.incrementAndGet(); if (concurrentRequestSnapshot > this.maxConcurrentRequests) { try { return FailFastRntbdRequestRecord.createAndFailFast( args, concurrentRequestSnapshot, metrics, remoteAddress); } finally { concurrentRequests.decrementAndGet(); } } this.lastRequestNanoTime.set(args.nanoTimeCreated()); final RntbdRequestRecord record = this.write(args); record.whenComplete((response, error) -> { this.concurrentRequests.decrementAndGet(); this.metrics.markComplete(record); }); return record; }
Source:
<code>public synchronized void checkWorkersTobeReadyForServerDelete(final String serverId, final EventHandler<Void> callback) { if (activeWorkerIds.isEmpty()) { LOG.log(Level.SEVERE, "No existing workers"); callback.onNext(null); return; } if (ongoingSyncs.containsKey(serverId)) { LOG.log(Level.WARNING, "Sync for {0} is already ongoing", serverId); return; } <START> final Set<String> workersToCheck = (Set<String>) activeWorkerIds.clone(); <END> ongoingSyncs.put(serverId, new Tuple<>(workersToCheck, callback)); LOG.log(Level.INFO, "Send sync msg for {0} to workers: {1}", new Object[]{serverId, workersToCheck}); broadcastSyncMsg(serverId, workersToCheck); }</code><technical_language>new HashSet<>(activeWorkerIds) activeWorkerIds.clone()</technical_language>

Target:
public synchronized void checkWorkersTobeReadyForServerDelete(final String serverId, final EventHandler<Void> callback) { if (activeWorkerIds.isEmpty()) { LOG.log(Level.SEVERE, "No existing workers"); callback.onNext(null); return; } if (ongoingSyncs.containsKey(serverId)) { LOG.log(Level.WARNING, "Sync for {0} is already ongoing", serverId); return; } final Set<String> workersToCheck = new HashSet<>(activeWorkerIds); ongoingSyncs.put(serverId, new Tuple<>(workersToCheck, callback)); LOG.log(Level.INFO, "Send sync msg for {0} to workers: {1}", new Object[]{serverId, workersToCheck}); broadcastSyncMsg(serverId, workersToCheck); }
Source:
<code>public void onInstall() { final VDS host = getSelectedItem(); InstallModel model = (InstallModel) getWindow(); final UpdateVdsActionParameters param = new UpdateVdsActionParameters(); param.setvds(host); param.setVdsId(host.getId()); param.setPassword(model.getUserPassword().getEntity()); param.setReinstallOrUpgrade(true); param.setInstallHost(true); param.setoVirtIsoFile(null); param.setOverrideFirewall(model.getOverrideIpTables().getEntity()); param.setActivateHost(model.getActivateHostAfterInstall().getEntity()); <START> param.setReconfigureGluster(model.getActivateHostAfterInstall().getEntity()); <END> param.setAuthMethod(model.getAuthenticationMethod()); param.setFenceAgents(null); param.setHostedEngineDeployConfiguration( new HostedEngineDeployConfiguration(model.getHostedEngineHostModel().getSelectedItem())); AsyncDataProvider.getInstance().getClusterById(new AsyncQuery<>(returnValue -> Frontend.getInstance().runAction( ActionType.InstallVds, param, result -> { ActionReturnValue returnValue1 = result.getReturnValue(); if (returnValue1 != null && returnValue1.getSucceeded()) { cancel(); } } )), host.getClusterId()); }</code><technical_language>of this param based model.getReconfigureGluster</technical_language>

Target:
public void onInstall() { final VDS host = getSelectedItem(); InstallModel model = (InstallModel) getWindow(); final UpdateVdsActionParameters param = new UpdateVdsActionParameters(); param.setvds(host); param.setVdsId(host.getId()); param.setPassword(model.getUserPassword().getEntity()); param.setReinstallOrUpgrade(true); param.setInstallHost(true); param.setoVirtIsoFile(null); param.setOverrideFirewall(model.getOverrideIpTables().getEntity()); param.setActivateHost(model.getActivateHostAfterInstall().getEntity()); param.setReconfigureGluster(model.getReconfigureGluster().getEntity()); param.setAuthMethod(model.getAuthenticationMethod()); param.setFenceAgents(null); param.setHostedEngineDeployConfiguration( new HostedEngineDeployConfiguration(model.getHostedEngineHostModel().getSelectedItem())); AsyncDataProvider.getInstance().getClusterById(new AsyncQuery<>(returnValue -> Frontend.getInstance().runAction( ActionType.InstallVds, param, result -> { ActionReturnValue returnValue1 = result.getReturnValue(); if (returnValue1 != null && returnValue1.getSucceeded()) { cancel(); } } )), host.getClusterId()); }
Source:
<code>ConcurrentHashMap<List<StackTraceElement>, MissingClassEvent> getEventsAndClean() { ConcurrentHashMap<List<StackTraceElement>, MissingClassEvent> currentEvents = events; <START> events = new ConcurrentHashMap<>(MAX_EVENTS_PER_SEND); <END> return currentEvents; }</code><technical_language>This is threadsafe, minor. suggest <LINK_0> similar</technical_language>

Target:
synchronized @Nonnull ConcurrentHashMap<List<StackTraceElement>, MissingClassEvent> getEventsAndClean() { ConcurrentHashMap<List<StackTraceElement>, MissingClassEvent> currentEvents = events; events = new ConcurrentHashMap<>(MAX_EVENTS_PER_SEND); return currentEvents; }
Source:
<code>private CreateInfo parseAttachment(Part contentPart) { CreateInfo createInfo = new CreateInfo(); InputStream stream; String filename; String contentType = null; try { stream = contentPart.getInputStream(); if (stream != null && stream.available() == 0) { stream.reset(); } createInfo.setStream(stream); } catch (IOException e) { LOGGER.info("IOException reading stream from file attachment in multipart body", e); } if (contentPart.getContentType() != null) { contentType = contentPart.getContentType(); } filename = contentPart.getSubmittedFileName(); if (StringUtils.isEmpty(filename)) { LOGGER.debug("No filename parameter provided - generating default filename"); String fileExtension = DEFAULT_FILE_EXTENSION; try { fileExtension = mimeTypeMapper.getFileExtensionForMimeType(contentType); if (StringUtils.isEmpty(fileExtension)) { fileExtension = DEFAULT_FILE_EXTENSION; } <START> } catch (MimeTypeResolutionException e) { <END> LOGGER.debug("Exception getting file extension for contentType = {}", contentType); } filename = DEFAULT_FILE_NAME + "." + fileExtension; LOGGER.debug("No filename parameter provided - default to {}", filename); } else { filename = FilenameUtils.getName(filename); if (StringUtils.isEmpty(contentType) || REFINEABLE_MIME_TYPES.contains(contentType)) { contentType = contentTypeFromFilename(filename); } } createInfo.setContentType(contentType); createInfo.setFilename(filename); return createInfo; }</code><technical_language>Consider adding a logging statement if size is 1</technical_language>

Target:
private AttachmentInfo parseAttachment(Part contentPart) { InputStream stream = null; try { stream = contentPart.getInputStream(); } catch (IOException e) { LOGGER.info("IOException reading stream from file attachment in multipart body", e); } return attachmentParser.generateAttachmentInfo( stream, contentPart.getContentType(), contentPart.getSubmittedFileName()); }
Source:
<code>public void activate(final Map<Object, Object> config) { runtimeConfiguration = new ISYActiveBindingConfig(config); <START> setProperlyConfigured(true); <END> this.insteonClient = new InsteonClient(runtimeConfiguration.getUser(), runtimeConfiguration.getPassword(), this); Errors.addErrorListener(new ErrorHandler()); if (runtimeConfiguration.isUseUpnp()) { this.logger.info("ISY: using UPNP to communicate with ISY"); this.insteonClient.start(); } else { this.logger.info("ISY: using URL to communicate with ISY"); try { this.insteonClient.start(runtimeConfiguration.getUuid(), String.format("http://%s:%s", runtimeConfiguration.getIpAddress(), runtimeConfiguration.getPort())); } catch (Exception e) { throw new RuntimeException(e); } } }</code><technical_language>This end of method</technical_language>

Target:
public void activate(final Map<Object, Object> config) { runtimeConfiguration = new ISYActiveBindingConfig(config); this.insteonClient = new InsteonClient(runtimeConfiguration.getUser(), runtimeConfiguration.getPassword(), this); Errors.addErrorListener(new ErrorHandler()); if (runtimeConfiguration.isUseUpnp()) { this.logger.info("ISY: using UPNP to communicate with ISY"); this.insteonClient.start(); } else { this.logger.info("ISY: using URL to communicate with ISY"); try { this.insteonClient.start(runtimeConfiguration.getUuid(), String.format("http://%s:%s", runtimeConfiguration.getIpAddress(), runtimeConfiguration.getPort())); } catch (Exception e) { throw new RuntimeException(e); } } setProperlyConfigured(true); }
Source:
<code>public int hashCode() { <START> return id; <END> }</code><technical_language>This line throw NullPointerException id type is Integer, int. NPE is expected thrownfrom hashCode. Please, fix this method deal null IDs correctly</technical_language>

Target:
public int hashCode() { return id != null ? id.hashCode() : 0; }
Source:
<code>private Set<IProjectAdapter> getOrCreateEntry(String key) { <START> Set<IProjectAdapter> adapters = cache.get(key); <END> if (adapters == null) { adapters = createEntry(key); } return adapters; }</code><technical_language>Do need synchronize cache dont 2 threads map a key time</technical_language>

Target:
private Set<IProjectAdapter> getOrCreateEntry(String key) { synchronized (cache) { Set<IProjectAdapter> adapters = getEntry(key); if (adapters == null) { adapters = createEntry(key); } return adapters; } }
Source:
<code>public boolean isSubtypeOf(ValueType t, TypeContext ctx) { t = t.getCanonicalType(ctx); if (t instanceof DynamicType) return true; if (t instanceof NominalType) { StructuralType st = ((NominalType) t).getStructuralType(ctx, null); if (st == null) <START> return true; END> else return isSubtypeOf(st, ctx); } if (!(t instanceof StructuralType)) return false; StructuralType st = (StructuralType) t; st = (StructuralType) st.adapt(new ReceiverView(new Variable(st.selfName), new Variable(selfName))); TypeContext extendedCtx = ctx.extend(selfName, this); for (DeclType dt : st.getDeclTypes()) { DeclType candidateDT = findDecl(dt.getName(), ctx); if (candidateDT == null || !candidateDT.isSubtypeOf(dt, extendedCtx)) { return false; } } if (isResource(GenContext.empty()) && !st.isResource(GenContext.empty())) return false; return true; }</code><technical_language>a test case fail if this is reverted? wrong for a random structural type a subtype of a nominal type is abstract</technical_language>

Target:
public boolean isSubtypeOf(ValueType t, TypeContext ctx) { t = t.getCanonicalType(ctx); if (t instanceof DynamicType) return true; if (t instanceof NominalType) { StructuralType st = ((NominalType) t).getStructuralType(ctx, null); if (st == null) return false; else return isSubtypeOf(st, ctx); } if (!(t instanceof StructuralType)) return false; StructuralType st = (StructuralType) t; st = (StructuralType) st.adapt(new ReceiverView(new Variable(st.selfName), new Variable(selfName))); TypeContext extendedCtx = ctx.extend(selfName, this); for (DeclType dt : st.getDeclTypes()) { DeclType candidateDT = findDecl(dt.getName(), ctx); if (candidateDT == null || !candidateDT.isSubtypeOf(dt, extendedCtx)) { return false; } } if (isResource(GenContext.empty()) && !st.isResource(GenContext.empty())) return false; return true; }
Source:
<code>public RubyGemParser(IFile file) throws IOException, CoreException { mSetupDefinitions = new HashMap<String, ArrayList<Object>>(); mSetupDependencies = new HashMap<String, ArrayList<Object>>(); <START> if (file.getContents().available() <= 0) <END> return; this.file = file; gemVariable = ""; parse(); }</code><technical_language>Remember put if/else/while/for etc</technical_language>

Target:
public RubyGemParser(IFile file) throws IOException, CoreException { mSetupDefinitions = new HashMap<String, ArrayList<String>>(); mSetupDependencies = new HashMap<String, ArrayList<String>>(); if (file.getContents().available() <= 0) { return; } this.file = file; gemVariable = ""; parse(); }
Source:
<code>public void setOrganizers(IBreakpointOrganizer[] organizers) { if (fOrganizers != null) { for (IBreakpointOrganizer <START> fOrganizer : <END> fOrganizers) { fOrganizer.removePropertyChangeListener(this); } } fOrganizers = organizers; if (organizers != null && organizers.length == 0) { fOrganizers = null; } if (fOrganizers != null) { for (IBreakpointOrganizer fOrganizer : fOrganizers) { fOrganizer.addPropertyChangeListener(this); } } if (!fDisposed) { fViewer.getControl().setRedraw(false); IBreakpoint[] breakpoints = null; if (isShowingGroups()) { breakpoints = fViewer.getVisibleBreakpoints(); } reorganize(); if (isShowingGroups() && breakpoints != null) { for (Object fElement : fElements) { BreakpointContainer container = (BreakpointContainer) fElement; for (IBreakpoint breakpoint : breakpoints) { if (container.contains(breakpoint)) { fViewer.expandToLevel(container, AbstractTreeViewer.ALL_LEVELS); fViewer.updateCheckedState(container); break; } } } } fViewer.getControl().setRedraw(true); } }</code><technical_language>rename organizer</technical_language>

Target:
public void setOrganizers(IBreakpointOrganizer[] organizers) { if (fOrganizers != null) { for (IBreakpointOrganizer organizer : fOrganizers) { organizer.removePropertyChangeListener(this); } } fOrganizers = organizers; if (organizers != null && organizers.length == 0) { fOrganizers = null; } if (fOrganizers != null) { for (IBreakpointOrganizer organizer : fOrganizers) { organizer.addPropertyChangeListener(this); } } if (!fDisposed) { fViewer.getControl().setRedraw(false); IBreakpoint[] breakpoints = null; if (isShowingGroups()) { breakpoints = fViewer.getVisibleBreakpoints(); } reorganize(); if (isShowingGroups() && breakpoints != null) { for (Object element : fElements) { BreakpointContainer container = (BreakpointContainer) element; for (IBreakpoint breakpoint : breakpoints) { if (container.contains(breakpoint)) { fViewer.expandToLevel(container, AbstractTreeViewer.ALL_LEVELS); fViewer.updateCheckedState(container); break; } } } } fViewer.getControl().setRedraw(true); } }
Source:
<code>public void normalDrop() { Flowable.fromAsync(source, AsyncEmitter.BackpressureMode.DROP).subscribe(ts); source.onNext(1); ts.request(1); source.onNext(2); source.onComplete(); <START> ts.assertValues(2); <END> ts.assertNoErrors(); ts.assertComplete(); }</code><technical_language>check values</technical_language>

Target:
public void normalDrop() { Flowable.fromAsync(source, AsyncEmitter.BackpressureMode.DROP).subscribe(ts); source.onNext(1); ts.request(1); ts.assertNoValues(); source.onNext(2); source.onComplete(); ts.assertValues(2); ts.assertNoErrors(); ts.assertComplete(); }
Source:
<code>public void updateBrand(HttpServletResponse resp, @RequestParam("uri") String brandUri, @RequestParam(value="platform",required=false) String platform) throws IOException { C4BrandUpdater updater; if (Strings.isNullOrEmpty(platform)) { updater = dflt; } else { Platform requestedPlatform = Platform.fromKey(platform); if (requestedPlatform == null) { resp.sendError(400, "Unknown platform " + platform); return; } else { updater = platformSpecific.get(requestedPlatform); if (updater == null) { resp.sendError(400, "No updater for platform " + platform); return; } } } if (!updater.canFetch(brandUri)) { resp.sendError(400, "Can't update URI " + brandUri); return; } <START> updater.createOrUpdateBrand(new ModelWithPayload<>(brandUri, "")); <END> }</code><technical_language>Allow payload null if is payload pass</technical_language>

Target:
public void updateBrand(HttpServletResponse resp, @RequestParam("uri") String brandUri, @RequestParam(value="platform",required=false) String platform) throws IOException { C4BrandUpdater updater; if (Strings.isNullOrEmpty(platform)) { updater = dflt; } else { Platform requestedPlatform = Platform.fromKey(platform); if (requestedPlatform == null) { resp.sendError(400, "Unknown platform " + platform); return; } else { updater = platformSpecific.get(requestedPlatform); if (updater == null) { resp.sendError(400, "No updater for platform " + platform); return; } } } if (!updater.canFetch(brandUri)) { resp.sendError(400, "Can't update URI " + brandUri); return; } updater.createOrUpdateBrand(new ModelWithPayload<>(brandUri, null)); }
Source:
<code>public MultimapAggregationStateFactory(Type keyType, Type valueType, MultimapAggGroupImplementation implementation) { <START> this.keyType = keyType; <END> this.valueType = valueType; this.implementation = implementation; }</code><technical_language>add requireNonNull for parameters</technical_language>

Target:
public MultimapAggregationStateFactory(Type keyType, Type valueType, MultimapAggGroupImplementation implementation) { this.keyType = requireNonNull(keyType); this.valueType = requireNonNull(valueType); this.implementation = requireNonNull(implementation); }
Source:
<code>private static Repos repos() { <START> return new RtGithub(RtForksITCase.key()).repos(); <END> }</code><technical_language>this method, in repo()</technical_language>

Target:
private static Repos repos() { final String key = System.getProperty("failsafe.github.key"); Assume.assumeThat(key, Matchers.notNullValue()); return new RtGithub(key).repos(); }