auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void testWriteAttributeWithCredentialReferenceWithClearTextOnly() throws Exception { try { String newPassword = "newPassword"; getNonEmptyCredentialStore(); addKeyStoreWithCredentialReference(KS_NAME, NON_EMPTY_CS_NAME, EXISTING_ALIAS, null, true); testWriteCredentialReferenceAttribute("key-store", KS_NAME, null, null, newPassword, false); assertEquals(newPassword, readAttribute(KS_NAME, CLEAR_TEXT_ATTRIBUTE_NAME)); assertEquals(null, readAttribute(KS_NAME, ALIAS_ATTRIBUTE_NAME)); <START> assertEquals(null, readAttribute(KS_NAME, STORE_ATTRIBUTE_NAME)); <END> } finally { removeKeyStore(KS_NAME); } }</code><technical_language>simplified assertNull</technical_language>

Target:
public void testWriteAttributeWithCredentialReferenceWithClearTextOnly() throws Exception { try { String newPassword = "newPassword"; getNonEmptyCredentialStore(); addKeyStoreWithCredentialReference(KS_NAME, NON_EMPTY_CS_NAME, EXISTING_ALIAS, null, true); testWriteCredentialReferenceAttribute("key-store", KS_NAME, null, null, newPassword, false); assertEquals(newPassword, readAttribute(KS_NAME, CLEAR_TEXT_ATTRIBUTE_NAME)); assertNull(readAttribute(KS_NAME, ALIAS_ATTRIBUTE_NAME)); assertNull(readAttribute(KS_NAME, STORE_ATTRIBUTE_NAME)); } finally { removeKeyStore(KS_NAME); } }
Source:
<code>protected void updateStorageDomainFromIrs() { final StorageDomainDynamic sdDynamicFromIrs = executeGetStorageDomainStats(); final StorageDomainStatic sdStaticFromIrs = executeHSMGetStorageDomainInfo(); TransactionSupport.executeInNewTransaction(() -> { getCompensationContext().snapshotEntity(getStorageDomain().getStorageDynamicData()); storageDomainDynamicDao.update(sdDynamicFromIrs); StorageDomainStatic sdStatic = storageDomainStaticDao.get(getStorageDomain().getId()); <START> sdStatic.setBlockSize(sdStaticFromIrs.getBlockSize()); <END> storageDomainStaticDao.update(sdStatic); getCompensationContext().stateChanged(); return null; }); }</code><technical_language>This correct, database updated tested this. Do debug logs showing vdsm? I some log like: Updating domain xxx block size 4096</technical_language>

Target:
protected void updateStorageDomainFromIrs() { final StorageDomainDynamic sdDynamicFromIrs = getStorageDomainDynamic(); final StorageDomainStatic sdStaticFromIrs = getStorageDomainStatic(); TransactionSupport.executeInNewTransaction(() -> { getCompensationContext().snapshotEntity(getStorageDomain().getStorageDynamicData()); storageDomainDynamicDao.update(sdDynamicFromIrs); StorageDomainStatic sdStatic = storageDomainStaticDao.get(getStorageDomain().getId()); sdStatic.setBlockSize(sdStaticFromIrs.getBlockSize()); storageDomainStaticDao.update(sdStatic); getCompensationContext().stateChanged(); return null; }); }
Source:
<code>protected void onBind() { Brand brand = Brand.getDefaultValue(); ProductDto shirt = new ProductDto(); shirt.setBrand(brand); <START> shirt.setPrice(55); <END> shirt.setProduct(Product.SHIRT); ProductDto bag = new ProductDto(); bag.setBrand(brand); bag.setPrice(55); bag.setProduct(Product.BAG); addToSlot(SLOT_MAIN_PRODUCTS, productFactory.create(Side.LEFT, shirt)); addToSlot(SLOT_MAIN_PRODUCTS, productFactory.create(Side.RIGHT, bag)); ProductDto cup = new ProductDto(); cup.setBrand(brand); cup.setPrice(55); cup.setProduct(Product.THERMOS); ProductDto phoneCase = new ProductDto(); phoneCase.setBrand(brand); phoneCase.setPrice(55); phoneCase.setProduct(Product.PHONE_CASE); ProductDto key = new ProductDto(); key.setBrand(brand); key.setPrice(55); key.setProduct(Product.USB_KEY); ProductDto mug = new ProductDto(); mug.setBrand(brand); mug.setPrice(55); mug.setProduct(Product.MUG); SecondaryProductPresenter cupPresenter = productFactory.create(cup); SecondaryProductPresenter keyPresenter = productFactory.create(key); SecondaryProductPresenter mugPresenter = productFactory.create(mug); SecondaryProductPresenter phoneCasePresenter = productFactory.create(phoneCase); addToSlot(SLOT_SECONDARY_PRODUCTS, cupPresenter); addToSlot(SLOT_SECONDARY_PRODUCTS, phoneCasePresenter); addToSlot(SLOT_SECONDARY_PRODUCTS, keyPresenter); addToSlot(SLOT_SECONDARY_PRODUCTS, mugPresenter); }</code><technical_language>add price in Product enum</technical_language>

Target:
protected void onBind() { Brand brand = currentBrand.get(); ProductDto shirt = new ProductDto(); shirt.setBrand(brand); shirt.setProduct(Product.SHIRT); ProductDto bag = new ProductDto(); bag.setBrand(brand); bag.setProduct(Product.BAG); addToSlot(SLOT_MAIN_PRODUCTS, productFactory.create(Side.LEFT, shirt)); addToSlot(SLOT_MAIN_PRODUCTS, productFactory.create(Side.RIGHT, bag)); ProductDto cup = new ProductDto(); cup.setBrand(brand); cup.setProduct(Product.THERMOS); ProductDto phoneCase = new ProductDto(); phoneCase.setBrand(brand); phoneCase.setProduct(Product.PHONE_CASE); ProductDto key = new ProductDto(); key.setBrand(brand); key.setProduct(Product.USB_KEY); ProductDto mug = new ProductDto(); mug.setBrand(brand); mug.setProduct(Product.MUG); SecondaryProductPresenter cupPresenter = productFactory.create(cup); SecondaryProductPresenter keyPresenter = productFactory.create(key); SecondaryProductPresenter mugPresenter = productFactory.create(mug); SecondaryProductPresenter phoneCasePresenter = productFactory.create(phoneCase); addToSlot(SLOT_SECONDARY_PRODUCTS, cupPresenter); addToSlot(SLOT_SECONDARY_PRODUCTS, phoneCasePresenter); addToSlot(SLOT_SECONDARY_PRODUCTS, keyPresenter); addToSlot(SLOT_SECONDARY_PRODUCTS, mugPresenter); }
Source:
<code>public Method getOnPongMessageMethod(Object webSocketEndpoint) { Method[] methods = webSocketEndpoint.getClass().getMethods(); <START> for (Method method : methods) { <END> if (method.isAnnotationPresent(OnMessage.class)) { Class<?>[] paraTypes = method.getParameterTypes(); List<Class<?>> paraList = Arrays.asList(paraTypes); if (paraList.contains(PongMessage.class)) { return method; } } } return null; }</code><technical_language>above, for loop throw a NPE if methods variable null</technical_language>

Target:
public Method getOnPongMessageMethod(Object webSocketEndpoint) { Method[] methods = webSocketEndpoint.getClass().getMethods(); if (methods == null) { return null; } for (Method method : methods) { if (method.isAnnotationPresent(OnMessage.class)) { Class<?>[] paraTypes = method.getParameterTypes(); List<Class<?>> paraList = Arrays.asList(paraTypes); if (paraList.contains(PongMessage.class)) { return method; } } } return null; }
Source:
<code>public ParameterizedTypeImpl(Type rawType, Type[] actualTypeArguments, Type ownerType) { <START> this.actualTypeArguments = actualTypeArguments.clone(); <END> this.rawType = rawType; this.ownerType = ownerType; }</code><technical_language>This is necessary control, suppress</technical_language>

Target:
public ParameterizedTypeImpl(Type rawType, Type[] actualTypeArguments, Type ownerType) { this.actualTypeArguments = actualTypeArguments; this.rawType = rawType; this.ownerType = ownerType; }
Source:
<code>public void testRequiredOnlySetWhenVisible() throws JSONException { NestedProperties props = new NestedProperties("foo"); props.init(); JsonSchemaGenerator generator = new JsonSchemaGenerator(); ObjectNode genSchema = generator.genSchema(props, Form.MAIN); String expectedComplete = "{\"title\":\"\",\"type\":\"object\",\"properties\":{\"myNestedStr\":{\"title\":\"property.myNestedStr.displayName\",\"type\":\"string\"},\"myNestedMultiValueStr\":{\"title\":\"property.myNestedMultiValueStr.displayName\",\"type\":\"string\",\"enum\":[\"a\",\"b\"],\"enumNames\":[\"Ai18n\",\"Bi18n\"]}}}"; <START> System.out.println(genSchema.toString()); <END> assertEquals(expectedComplete, genSchema.toString(), true); }</code><technical_language>please, remove System.out</technical_language>

Target:
public void testRequiredOnlySetWhenVisible() throws JSONException { NestedProperties props = new NestedProperties("foo"); props.init(); JsonSchemaGenerator generator = new JsonSchemaGenerator(); ObjectNode genSchema = generator.generateJsonSchema(props, Form.MAIN); String expectedComplete = "{\"title\":\"\",\"type\":\"object\",\"properties\":{\"myNestedStr\":{\"title\":\"property.myNestedStr.displayName\",\"type\":\"string\"},\"myNestedMultiValueStr\":{\"title\":\"property.myNestedMultiValueStr.displayName\",\"type\":\"string\",\"enum\":[\"a\",\"b\"],\"enumNames\":[\"Ai18n\",\"Bi18n\"]}}}"; assertEquals(expectedComplete, genSchema.toString(), true); }
Source:
<code>private Function<PollingContext<KeyVaultCertificateWithPolicy>, Mono<PollResponse<KeyVaultCertificateWithPolicy>>> createRecoverPollOperation(String keyName) { return pollingContext -> withContext(context -> service.getCertificatePoller(vaultUrl, keyName, "", API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) .flatMap(certificateResponse -> { if (certificateResponse.getStatusCode() == HttpURLConnection.HTTP_NOT_FOUND) { return Mono.defer(() -> Mono.just(new PollResponse<>(LongRunningOperationStatus.IN_PROGRESS, pollingContext.getLatestResponse().getValue()))); } if (certificateResponse.getStatusCode() == HttpURLConnection.HTTP_FORBIDDEN) { return Mono.defer(() -> Mono.just(new PollResponse<>(LongRunningOperationStatus.fromString("FORBIDDEN", true), <START> pollingContext.getLatestResponse().getValue()))); <END> } return Mono.defer(() -> Mono.just(new PollResponse<>(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, certificateResponse.getValue()))); })) .onErrorReturn(new PollResponse<>(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, pollingContext.getLatestResponse().getValue())); }</code><technical_language>Based feedback API review. this is supposed here. This logic is supposed in poll operation of beginCreateCertificate</technical_language>

Target:
private Function<PollingContext<KeyVaultCertificateWithPolicy>, Mono<PollResponse<KeyVaultCertificateWithPolicy>>> createRecoverPollOperation(String keyName) { return pollingContext -> withContext(context -> service.getCertificatePoller(vaultUrl, keyName, "", API_VERSION, ACCEPT_LANGUAGE, CONTENT_TYPE_HEADER_VALUE, context) .flatMap(certificateResponse -> { if (certificateResponse.getStatusCode() == HttpURLConnection.HTTP_NOT_FOUND) { return Mono.defer(() -> Mono.just(new PollResponse<>(LongRunningOperationStatus.IN_PROGRESS, pollingContext.getLatestResponse().getValue()))); } if (certificateResponse.getStatusCode() == HttpURLConnection.HTTP_FORBIDDEN) { return Mono.defer(() -> Mono.just(new PollResponse<>(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, pollingContext.getLatestResponse().getValue()))); } return Mono.defer(() -> Mono.just(new PollResponse<>(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, certificateResponse.getValue()))); })) .onErrorReturn(new PollResponse<>(LongRunningOperationStatus.SUCCESSFULLY_COMPLETED, pollingContext.getLatestResponse().getValue())); }
Source:
<code>public void showHealthForProbes(HttpServletResponse response) throws IOException { Result result = health.status(Health.FailurePolicy.ANY); response.setStatus(result.getStatus() == Status.HEALTHY ? SC_OK : SC_INTERNAL_SERVER_ERROR ); PrintWriter writer = response.getWriter(); <START> result.getProbeResults().forEach(probeResult -> { <END> writer.println( String.format( "%s: %s", probeResult.getIdentifier(), probeResult.getStatus().toString() ) ); probeResult.getMsg().ifPresent(writer::println); probeResult.getReason().ifPresent(writer::println); writer.println(); }); }</code><technical_language>serialise ProbeResults JSON print that? This more complicated need</technical_language>

Target:
public void showHealthForProbes(HttpServletResponse response) throws IOException { Result result = health.status(Health.FailurePolicy.ALL); response.setContentType("application/json"); response.setStatus(result.getStatus() == Status.HEALTHY ? SC_OK : SC_INTERNAL_SERVER_ERROR ); mapper.writeValue(response.getWriter(), result.getProbeResults()); }
Source:
<code>private boolean stopmodule(DashboardModule module) { IViewPart ivp = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(ActiveModuleBrowserView.ID); ActiveModuleBrowserView ambv = (ActiveModuleBrowserView)ivp; GraphTreeNode graphNode; DashboardGraphData graphData; boolean stop = false; if(ambv.isActive(module)) { ActiveModuleTreeNode node = ambv.remove(module); ActiveModuleData amd = (ActiveModuleData)node.getData(); ivp = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(DashboardView.ID); DashboardView dv = (DashboardView)ivp; for(int i=0; i<node.getChildCount(); i++) { graphNode = (GraphTreeNode)node.getChildAt(i); graphData = (DashboardGraphData)graphNode.getData(); if(null != graphData.adapter) { dv.removeGraph(graphData.adapter, module.getcategory()); graphData.adapter = null; } } if(!amd.paused) { if (amd.cmd.isRunning()) amd.cmd.stop(); amd.data = null; } dv.closeComposite(amd.module.category); amd = null; fireActionEvent(); } setEnablement(false); <START> buildEnablementChecks(); <END> return stop; }</code><technical_language>This is logical change. exception return is set true. exceptions catched individually stop set true some other set return value. If method returns false (as is this change) void return all</technical_language>

Target:
private void stopmodule(DashboardModule module) { IViewPart ivp = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(ActiveModuleBrowserView.ID); ActiveModuleBrowserView ambv = (ActiveModuleBrowserView)ivp; GraphTreeNode graphNode; DashboardGraphData graphData; if(ambv.isActive(module)) { ActiveModuleTreeNode node = ambv.remove(module); ActiveModuleData amd = (ActiveModuleData)node.getData(); ivp = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().findView(DashboardView.ID); DashboardView dv = (DashboardView)ivp; for(int i=0; i<node.getChildCount(); i++) { graphNode = (GraphTreeNode)node.getChildAt(i); graphData = (DashboardGraphData)graphNode.getData(); if(null != graphData.adapter) { dv.removeGraph(graphData.adapter, module.getcategory()); graphData.adapter = null; } } if(!amd.paused) { if (amd.cmd.isRunning()) amd.cmd.stop(); amd.data = null; } dv.closeComposite(amd.module.category); amd = null; fireActionEvent(); } setEnablement(false); buildEnablementChecks(); }
Source:
<code>private String toDenonValue(BigDecimal percent) { <START> BigDecimal round = new BigDecimal("0.5"); <END> percent = percent.divide(round).setScale(0, RoundingMode.UP).multiply(round).min(connection.getMainVolumeMax()).max(BigDecimal.ZERO); String dbString = String.valueOf(percent.intValue()); if (percent.compareTo(new BigDecimal("10")) == -1) { dbString = "0" + dbString; } if (percent.remainder(BigDecimal.ONE).equals(new BigDecimal("0.5"))) { dbString = dbString + "5"; } return dbString; }</code><technical_language>extract 0.5 a final static member constant</technical_language>

Target:
private String toDenonValue(BigDecimal percent) { percent = percent.divide(POINTFIVE).setScale(0, RoundingMode.UP) .multiply(POINTFIVE) .min(connection.getMainVolumeMax()) .max(BigDecimal.ZERO); String dbString = String.valueOf(percent.intValue()); if (percent.compareTo(BigDecimal.TEN) == -1) { dbString = "0" + dbString; } if (percent.remainder(BigDecimal.ONE).equals(POINTFIVE)) { dbString = dbString + "5"; } return dbString; }
Source:
<code>public Parameters clearEmpiLinks(@OperationParam(name=ProviderConstants.EMPI_CLEAR_TARGET_TYPE, min = 0, max = 1) StringType theTargetType) { <START> if (theTargetType == null) { <END> myEmpiExpungeSvc.expungeEmpiLinks(); } else { myEmpiExpungeSvc.expungeEmpiLinks(theTargetType.getValueNotNull()); } return new Parameters(); }</code><technical_language>Safer check theTargetType blank</technical_language>

Target:
public Parameters clearEmpiLinks(@OperationParam(name=ProviderConstants.EMPI_CLEAR_TARGET_TYPE, min = 0, max = 1) StringType theTargetType) { long resetCount; if (theTargetType == null || StringUtils.isBlank(theTargetType.getValue())) { resetCount = myEmpiExpungeSvc.removeAllEmpiLinks(); } else { resetCount = myEmpiExpungeSvc.expungeAllEmpiLinksOfTargetType(theTargetType.getValueNotNull()); } Parameters parameters = new Parameters(); parameters.addParameter().setName(ProviderConstants.OPERATION_EMPI_CLEAR_OUT_PARAM_DELETED_COUNT) .setValue(new DecimalType(resetCount)); return parameters; }
Source:
<code>public void checkBubbles() { Iterator<Bubble> i = bubbles.iterator(); while (i.hasNext()) { Bubble bubble = i.next(); if (bubble.checkPop() && !bubble.getIsPrisonBubble()) { i.remove(); levelController.getScreenController().removeSprite(bubble); <START> Logger.log(String.format("Bubble is popped")); <END> } } }</code><technical_language>This String.format(...) is needed String is formatted. Logger.log("Bubble is popped"); suffice</technical_language>

Target:
public void checkBubbles() { Iterator<Bubble> i = bubbles.iterator(); while (i.hasNext()) { Bubble bubble = i.next(); if (bubble.checkPop() && !bubble.getIsPrisonBubble()) { i.remove(); levelController.getScreenController().removeSprite(bubble); Logger.log("Bubble is popped"); } } }
Source:
<code>public boolean equals(Object o) { if (o instanceof CaseManagementSet) { CaseManagementSet other = (CaseManagementSet) o; <START> return caseRoles.equals(other.caseRoles) && <END> caseFileVariables.equals(other.caseFileVariables); } return false; }</code><technical_language>suggestion return Objects.equals(caseRoles, other.caseRoles) && Objects.equals(caseFileVariables, other.caseFileVariables);</technical_language>

Target:
public boolean equals(Object o) { if (o instanceof CaseManagementSet) { CaseManagementSet other = (CaseManagementSet) o; return Objects.equals(caseRoles, other.caseRoles) && Objects.equals(caseFileVariables, other.caseFileVariables); } return false; }
Source:
<code>public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { final View v = inflater.inflate(R.layout.sf__fingerprint_dialog, container, false); final Button cancelButton = v.findViewById(R.id.sf__use_password_button); cancelButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { dismiss(); mContext.biometricDeclined(); } }); mStatusText = v.findViewById(R.id.sf__fingerprint_status); ApplicationInfo applicationInfo = mContext.getApplicationInfo(); <START> int resId = applicationInfo.labelRes; <END> String appName = resId == 0 ? "" : getString(resId); TextView textView = v.findViewById(R.id.sf__fingerprint_description); textView.setText(getString(R.string.sf__fingerprint_description, appName)); getDialog().setCanceledOnTouchOutside(false); return v; }</code><technical_language>Call provideAppName() SalesforceSDKManager instead for appName</technical_language>

Target:
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { final View v = inflater.inflate(R.layout.sf__fingerprint_dialog, container, false); final Button cancelButton = v.findViewById(R.id.sf__use_password_button); cancelButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { dismiss(); mContext.biometricDeclined(); } }); mStatusText = v.findViewById(R.id.sf__fingerprint_status); TextView textView = v.findViewById(R.id.sf__fingerprint_description); textView.setText(getString(R.string.sf__fingerprint_description, SalesforceSDKManager.getInstance().provideAppName())); getDialog().setCanceledOnTouchOutside(false); return v; }
Source:
<code>public void testEventProgress() { EventApi eventApi = EasyMock.createMock(EventApi.class); DigitalOceanApi api = EasyMock.createMock(DigitalOceanApi.class); expect(eventApi.get(1)).andReturn(event(Status.DONE)); expect(eventApi.get(2)).andReturn(event(Status.PENDING)); expect(api.getEventApi()).andReturn(eventApi).times(2); replay(eventApi); <START> replay(api); <END> EventDonePredicate predicate = new EventDonePredicate(api); assertTrue(predicate.apply(1)); assertFalse(predicate.apply(2)); verify(eventApi); verify(api); }</code><technical_language>[minor] written replay(eventApi, api)</technical_language>

Target:
public void testEventProgress() { EventApi eventApi = EasyMock.createMock(EventApi.class); DigitalOceanApi api = EasyMock.createMock(DigitalOceanApi.class); expect(eventApi.get(1)).andReturn(event(Status.DONE)); expect(eventApi.get(2)).andReturn(event(Status.PENDING)); expect(api.getEventApi()).andReturn(eventApi).times(2); replay(eventApi, api); EventDonePredicate predicate = new EventDonePredicate(api); assertTrue(predicate.apply(1)); assertFalse(predicate.apply(2)); }
Source:
<code>private ResourcePageSource createPageSource(String poolName, ServerSideConfiguration.Pool pool) throws ResourceConfigurationException { ResourcePageSource pageSource; OffHeapResource source = services.getService(OffHeapResourceIdentifier.identifier(pool.getServerResource())); if (source == null) { throw new ResourceConfigurationException("Non-existent server side resource '" + pool.getServerResource() + "'. Available resources are: " + offHeapResourceIdentifiers); } else if (source.reserve(pool.getSize())) { try { pageSource = new ResourcePageSource(pool); registerStatistic(pageSource, poolName, "allocatedMemory" ,new Callable<Number>() { @Override public Number call() throws Exception { <START> return pageSource.delegatePageSource.getAllocatedSize(); <END> } }); } catch (RuntimeException t) { source.release(pool.getSize()); throw new ResourceConfigurationException("Failure allocating pool " + pool, t); } LOGGER.info("Reserved bytes from resource '{}' for pool '{}'", pool.getSize(), pool.getServerResource(), poolName); } else { throw new ResourceConfigurationException("Insufficient defined resources to allocate pool " + poolName + "=" + pool); } return pageSource; }</code><technical_language>getAllocatedSizeUnsync avoid blocking</technical_language>

Target:
private ResourcePageSource createPageSource(String poolName, ServerSideConfiguration.Pool pool) throws ResourceConfigurationException { ResourcePageSource pageSource; OffHeapResource source = services.getService(OffHeapResourceIdentifier.identifier(pool.getServerResource())); if (source == null) { throw new ResourceConfigurationException("Non-existent server side resource '" + pool.getServerResource() + "'. Available resources are: " + offHeapResourceIdentifiers); } else if (source.reserve(pool.getSize())) { try { pageSource = new ResourcePageSource(pool); registerPoolStatistics(poolName, pageSource); } catch (RuntimeException t) { source.release(pool.getSize()); throw new ResourceConfigurationException("Failure allocating pool " + pool, t); } LOGGER.info("Reserved bytes from resource '{}' for pool '{}'", pool.getSize(), pool.getServerResource(), poolName); } else { throw new ResourceConfigurationException("Insufficient defined resources to allocate pool " + poolName + "=" + pool); } return pageSource; }
Source:
<code>public void newTerminal() { workspaceAgent.setActivePart(this); final ProcessTreeNode selectedTreeNode = view.getSelectedTreeNode(); final MachineEntity devMachine = appContext.getDevMachine(); if (selectedTreeNode == null && devMachine != null) { onAddTerminal(devMachine); return; } if (selectedTreeNode == null) { <START> notificationManager.notify(localizationConstant.failedToConnectTheTerminal(), <END> localizationConstant.machineNotFound(""), FAIL, FLOAT_MODE); return; } if (selectedTreeNode.getType() == MACHINE_NODE) { MachineEntity machine = (MachineEntity)selectedTreeNode.getData(); onAddTerminal(machine); return; } ProcessTreeNode parent = selectedTreeNode.getParent(); if (parent != null && parent.getType() == MACHINE_NODE) { MachineEntity machine = (MachineEntity)selectedTreeNode.getData(); onAddTerminal(machine); } }</code><technical_language>complex construct</technical_language>

Target:
public void newTerminal() { workspaceAgent.setActivePart(this); final ProcessTreeNode selectedTreeNode = view.getSelectedTreeNode(); final MachineEntity devMachine = appContext.getDevMachine(); if (selectedTreeNode == null && devMachine != null) { onAddTerminal(devMachine.getId()); return; } if (selectedTreeNode == null) { String notificationTitle = localizationConstant.failedToConnectTheTerminal(); String notificationContent = localizationConstant.machineNotFound(""); notificationManager.notify(notificationTitle, notificationContent, FAIL, FLOAT_MODE); return; } if (selectedTreeNode.getType() == MACHINE_NODE) { MachineEntity machine = (MachineEntity)selectedTreeNode.getData(); onAddTerminal(machine.getId()); return; } ProcessTreeNode parent = selectedTreeNode.getParent(); if (parent != null && parent.getType() == MACHINE_NODE) { MachineEntity machine = (MachineEntity)selectedTreeNode.getData(); onAddTerminal(machine.getId()); } }
Source:
<code>public void testSmudgeFilter_modifyExisting() throws IOException, GitAPIException { File script = writeTempFile("sed <START> s/o/e/ -"); <END> StoredConfig config = git.getRepository().getConfig(); config.setString("filter", "tstFilter", "smudge", "sh " + script.getPath()); config.save(); writeTrashFile(".gitattributes", "*.txt filter=tstFilter"); git.add().addFilepattern(".gitattributes").call(); git.commit().setMessage("add filter").call(); writeTrashFile("src/a.tmp", "x"); writeTrashFile("src/a.txt", "x"); git.add().addFilepattern("src/a.tmp").addFilepattern("src/a.txt") .call(); RevCommit content1 = git.commit().setMessage("add content").call(); writeTrashFile("src/a.tmp", "foo"); writeTrashFile("src/a.txt", "foo"); git.add().addFilepattern("src/a.tmp").addFilepattern("src/a.txt") .call(); RevCommit content2 = git.commit().setMessage("changed content").call(); git.checkout().setName(content1.getName()).call(); git.checkout().setName(content2.getName()).call(); assertEquals( "[.gitattributes, mode:100644, content:*.txt filter=tstFilter][Test.txt, mode:100644, content:Some change][src/a.tmp, mode:100644, content:foo][src/a.txt, mode:100644, content:foo]", indexState(CONTENT)); assertEquals("foo", read("src/a.tmp")); assertEquals("feo", read("src/a.txt")); }</code><technical_language>setting input '-' supported Mac tests fail error message "sed: -: file directory". AFAIK if input is sed defaults read standard input Mac Linux more occurrences</technical_language>

Target:
public void testSmudgeFilter_modifyExisting() throws IOException, GitAPIException { File script = writeTempFile("tr o e"); StoredConfig config = git.getRepository().getConfig(); config.setString("filter", "tstFilter", "smudge", "sh " + script.getPath()); config.save(); writeTrashFile(".gitattributes", "*.txt filter=tstFilter"); git.add().addFilepattern(".gitattributes").call(); git.commit().setMessage("add filter").call(); writeTrashFile("src/a.tmp", "x"); writeTrashFile("src/a.txt", "x"); git.add().addFilepattern("src/a.tmp").addFilepattern("src/a.txt") .call(); RevCommit content1 = git.commit().setMessage("add content").call(); writeTrashFile("src/a.tmp", "foo"); writeTrashFile("src/a.txt", "foo"); git.add().addFilepattern("src/a.tmp").addFilepattern("src/a.txt") .call(); RevCommit content2 = git.commit().setMessage("changed content").call(); git.checkout().setName(content1.getName()).call(); git.checkout().setName(content2.getName()).call(); assertEquals( "[.gitattributes, mode:100644, content:*.txt filter=tstFilter][Test.txt, mode:100644, content:Some change][src/a.tmp, mode:100644, content:foo][src/a.txt, mode:100644, content:foo]", indexState(CONTENT)); assertEquals("foo", read("src/a.tmp")); assertEquals("fee", read("src/a.txt")); }
Source:
<code>private void onDataChanged(Object data) { ODKView odkView = getCurrentViewIfODKView(); if (odkView != null) { QuestionWidget widgetGettingNewValue = getWidgetWaitingForBinaryData(); <START> setBinaryWidgetData(data); <END> widgetValueChanged(widgetGettingNewValue); } }</code><technical_language>Please rename this method setWidgetData() in this case binary files</technical_language>

Target:
private void onDataChanged(Object data) { ODKView odkView = getCurrentViewIfODKView(); if (odkView != null) { QuestionWidget widgetGettingNewValue = getWidgetWaitingForBinaryData(); setWidgetData(data); widgetValueChanged(widgetGettingNewValue); } }
Source:
<code>private void validateClientID(ClientSession validateSession, String clientID) throws InvalidClientIDException { try { validateSession.addUniqueMetaData(ClientSession.JMS_SESSION_CLIENT_ID_PROPERTY, clientID); } catch (ActiveMQException e) { if (e.getType() == ActiveMQExceptionType.DUPLICATE_METADATA) { throw new InvalidClientIDException("clientID=" + clientID + " was already set into another connection"); } else { <START> throw new InvalidClientIDException("Error setting clientID=" + clientID + ": " + e.getMessage()); <END> } } }</code><technical_language>original exception related InvalidClientId, a bit dangerous catchall throw this. bubble convert exception, link exception add intial cause</technical_language>

Target:
private void validateClientID(ClientSession validateSession, String clientID) throws InvalidClientIDException, ActiveMQException { try { validateSession.addUniqueMetaData(ClientSession.JMS_SESSION_CLIENT_ID_PROPERTY, clientID); } catch (ActiveMQException e) { if (e.getType() == ActiveMQExceptionType.DUPLICATE_METADATA) { throw new InvalidClientIDException("clientID=" + clientID + " was already set into another connection"); } else { throw e; } } }
Source:
<code>public void onLoadMore() { if (TextUtils.isEmpty(mSearchTerm)) { if (mCanLoadMorePosts && !mIsFetchingPosts) { requestPosts(true); } } else if (mCanSearchMore && !mIsSearching) { <START> showLoadMoreProgress(); <END> mSearchOffset = mSearchResults.size(); mHandler.post(mSearchRunnable); } }</code><technical_language>I need this call mSearchRunnable</technical_language>

Target:
public void onLoadMore() { if (TextUtils.isEmpty(mSearchTerm)) { if (mCanLoadMorePosts && !mIsFetchingPosts) { requestPosts(true); } } else if (mCanSearchMore && !mIsSearching) { mSearchOffset = mSearchResults.size(); mHandler.post(mSearchRunnable); } }
Source:
<code>protected ContainerAttributesResource instantiateResource(ContainerAttributes entity) { <START> return new ContainerAttributesResource(entity.getId(), entity.getPid(), entity.getHost(), entity.getIp()); <END> }</code><technical_language>need modify ContainerAttributesResource simply a Map in constructor. simpler, attribute values (including user-provided OOTB) represented resource representation</technical_language>

Target:
protected ContainerAttributesResource instantiateResource(ContainerAttributes entity) { return new ContainerAttributesResource(entity); }
Source:
<code>public byte[] call(final byte[] memento) throws Exception { LOG.log(Level.INFO, "{0} starting...", taskId); final AsyncWorkerDataSet[] asyncWorkerDataSets = divideDataSets(); final ExecutorService executorService = Executors.newFixedThreadPool(numWorkerThreads); final Future[] futures = new Future[numWorkerThreads]; LOG.log(Level.INFO, "Initializing {0} worker threads", numWorkerThreads); for (int index = 0; index < numWorkerThreads; index++) { final Injector forkedInjector = injector.forkInjector(); forkedInjector.bindVolatileInstance(DataSet.class, asyncWorkerDataSets[index]); final Worker worker = forkedInjector.getInstance(Worker.class); <START> final ParameterWorker parameterWorker = forkedInjector.getInstance(ParameterWorker.class); <END> futures[index] = executorService.submit(new Runnable() { @Override public void run() { worker.initialize(); synchronizer.globalBarrier(); for (int iteration = 0; iteration < maxIterations; ++iteration) { if (aborted) { LOG.log(Level.INFO, "Abort a thread to completely close the task"); return; } worker.run(); parameterWorker.clock(); } synchronizer.globalBarrier(); worker.cleanup(); } }); } for (int index = 0; index < numWorkerThreads; index++) { futures[index].get(); } return null; }</code><technical_language>This instruction distinct ParameterWorkers for thread</technical_language>

Target:
public byte[] call(final byte[] memento) throws Exception { LOG.log(Level.INFO, "{0} starting...", taskId); final AsyncWorkerDataSet[] asyncWorkerDataSets = divideDataSets(); final ExecutorService executorService = Executors.newFixedThreadPool(numWorkerThreads); final Future[] futures = new Future[numWorkerThreads]; LOG.log(Level.INFO, "Initializing {0} worker threads", numWorkerThreads); for (int index = 0; index < numWorkerThreads; index++) { final Injector forkedInjector = injector.forkInjector(); forkedInjector.bindVolatileInstance(DataSet.class, asyncWorkerDataSets[index]); final Worker worker = forkedInjector.getInstance(Worker.class); futures[index] = executorService.submit(new Runnable() { @Override public void run() { worker.initialize(); synchronizer.globalBarrier(); for (int iteration = 0; iteration < maxIterations; ++iteration) { if (aborted) { LOG.log(Level.INFO, "Abort a thread to completely close the task"); return; } worker.run(); if (staleness >= 0) { parameterAccessor.clock(); } } synchronizer.globalBarrier(); worker.cleanup(); } }); } for (int index = 0; index < numWorkerThreads; index++) { futures[index].get(); } return null; }
Source:
<code>public void testEmptyBinaryArray() throws SQLException { PreparedStatement pstmt = conn.prepareStatement("SELECT '{}'::int[]"); ((org.postgresql.PGStatement)pstmt).setPrepareThreshold(-1); ResultSet rs = pstmt.executeQuery(); while (rs.next()) { Array array = rs.getArray(1); if (!rs.wasNull()) { ResultSet ars = array.getResultSet(); try { ars.getMetaData().getColumnType(1); } catch (NullPointerException ex) { <START> assertTrue("should not get here",true); <END> } } } }</code><technical_language>I prefer more descriptive error messages. for developer observe this error message: "should get here". test name puts some context, more sense throw new IllegalStateException("ars.getMetaData().getColumnType(1) failed for empty array in binary mode, return ...", ex) Note assertTrue hides original exception, making hard identify root if any</technical_language>

Target:
public void testEmptyBinaryArray() throws SQLException { PreparedStatement pstmt = conn.prepareStatement("SELECT '{}'::int[]"); ((org.postgresql.PGStatement)pstmt).setPrepareThreshold(-1); ResultSet rs = pstmt.executeQuery(); while (rs.next()) { Array array = rs.getArray(1); if (!rs.wasNull()) { ResultSet ars = array.getResultSet(); assertEquals("get columntype should return Types.INTEGER",java.sql.Types.INTEGER,ars.getMetaData().getColumnType(1)); } } }
Source:
<code>public boolean exists(String path) throws IOException { Assert.hasText(path, "'path' must not be empty"); boolean exists = false; InputStream inputStream = null; try { <START> inputStream = this.client.retrieveFileStream(path); <END> } finally { if (inputStream != null) { inputStream.close(); if (!this.client.completePendingCommand()) { inputStream = null; } } } if (inputStream == null) { String currentWorkingPath = this.client.printWorkingDirectory(); Assert.state(currentWorkingPath != null, "working directory cannot be determined; exists check can not be completed"); try { exists = this.client.changeWorkingDirectory(path); } finally { this.client.changeWorkingDirectory(currentWorkingPath); } } else { exists = true; } return exists; }</code><technical_language>I this solution - a lot of overhead server get ready for a file transfer execute. I need previous technique this PR for a file fall test if false is returned, in case test for a directory</technical_language>

Target:
public boolean exists(String path) throws IOException { Assert.hasText(path, "'path' must not be empty"); String[] names = this.client.listNames(path); boolean exists = !ObjectUtils.isEmpty(names); if (!exists) { String currentWorkingPath = this.client.printWorkingDirectory(); Assert.state(currentWorkingPath != null, "working directory cannot be determined; exists check can not be completed"); try { exists = this.client.changeWorkingDirectory(path); } finally { this.client.changeWorkingDirectory(currentWorkingPath); } } return exists; }
Source:
<code>default boolean exist(@NotNull String accountId) throws ServerException { try { getById(requireNonNull(accountId, "Required non-null account id")); return true; <START> } catch (NotFoundException ignored) { <END> return false; } }</code><technical_language>is exception</technical_language>

Target:
default boolean exist(@NotNull String accountId) throws ServerException { try { getById(requireNonNull(accountId, "Required non-null account id")); return true; } catch (NotFoundException nfEx) { return false; } }
Source:
<code>public ResourceInvoker match(HttpRequest request, int start) { if (!CACHE) { return root.match(request, start).invoker; } MatchCache.Key key = new MatchCache.Key(request, start); MatchCache match = cache.get(key); if (match != null) { request.setAttribute(RESTEASY_CHOSEN_ACCEPT, match.chosen); } else { match = root.match(request, start); if (cache.size() < CACHE_SIZE && match.match != null && match.match.expression.getNumGroups() == 0 && match.invoker instanceof ResourceMethodInvoker) { match.match = null; <START> { <END> cache.putIfAbsent(key, match); } } } return match.invoker; }</code><technical_language>extra braces</technical_language>

Target:
public ResourceInvoker match(HttpRequest request, int start) { if (!CACHE || (request.getHttpHeaders().getMediaType() !=null && !request.getHttpHeaders().getMediaType().getParameters().isEmpty())) { return root.match(request, start).invoker; } MatchCache.Key key = new MatchCache.Key(request, start); MatchCache match = cache.get(key); if (match != null) { request.setAttribute(RESTEASY_CHOSEN_ACCEPT, match.chosen); } else { match = root.match(request, start); if (match.match != null && match.match.expression.getNumGroups() == 0 && match.invoker instanceof ResourceMethodInvoker) { match.match = null; if (cache.size() >= CACHE_SIZE) { cache.clear(); } cache.putIfAbsent(key, match); } } return match.invoker; }
Source:
<code>public void init(final Collection<NamedIndexDir> luceneIndexes) { if (luceneIndexes == null || luceneIndexes.isEmpty()) { LOGGER.log(Level.INFO, "No index directories found, exiting..."); return; } if (!projectsEnabled && luceneIndexes.size() > 1) { throw new IllegalArgumentException("Projects are not enabled and multiple Lucene indexes were passed"); } synchronized (lock) { <START> long startTime = System.currentTimeMillis(); <END> LOGGER.log(Level.INFO, "Initializing suggester"); ExecutorService executor = Executors.newWorkStealingPool(rebuildParallelismLevel); for (NamedIndexDir indexDir : luceneIndexes) { submitInitIfIndexExists(executor, indexDir); } shutdownAndAwaitTermination(executor, startTime, "Suggester successfully initialized"); } }</code><technical_language><LINK_0></technical_language>

Target:
public void init(final Collection<NamedIndexDir> luceneIndexes) { if (luceneIndexes == null || luceneIndexes.isEmpty()) { logger.log(Level.INFO, "No index directories found, exiting..."); return; } if (!projectsEnabled && luceneIndexes.size() > 1) { throw new IllegalArgumentException("Projects are not enabled and multiple Lucene indexes were passed"); } synchronized (lock) { Instant start = Instant.now(); logger.log(Level.INFO, "Initializing suggester"); ExecutorService executor = Executors.newWorkStealingPool(rebuildParallelismLevel); for (NamedIndexDir indexDir : luceneIndexes) { submitInitIfIndexExists(executor, indexDir); } shutdownAndAwaitTermination(executor, start, "Suggester successfully initialized"); } }
Source:
<code>private void handleWanSyncAllMaps(HttpPostCommand command) throws UnsupportedEncodingException { String res; final String[] params = decodeParams(command, 4); final String wanRepName = params[0]; final String targetGroup = params[1]; final long fromTimestamp = params.length > 2 && params[2] != null ? Long.valueOf(params[2]) : Long.MIN_VALUE; final long toTimestamp = params.length > 3 && params[3] != null ? Long.valueOf(params[3]) : Long.MAX_VALUE; final WanReplicationService service = textCommandService.getNode().getNodeEngine().getWanReplicationService(); try { <START> if (fromTimestamp == Long.MIN_VALUE && toTimestamp == Long.MAX_VALUE) { <END> service.syncAllMaps(wanRepName, targetGroup); } else { service.syncAllMaps(wanRepName, targetGroup, fromTimestamp, toTimestamp); } res = response(ResponseType.SUCCESS, "message", "Sync initiated"); } catch (Exception ex) { logger.warning("Error occurred while syncing maps", ex); res = exceptionResponse(ex); } sendResponse(command, res); }</code><technical_language>want check toTimestamp > fromTimestamp</technical_language>

Target:
private void handleWanSyncAllMaps(HttpPostCommand command) throws UnsupportedEncodingException { String res; final String[] params = decodeParams(command, 4); final String wanRepName = params[0]; final String targetGroup = params[1]; final long fromTimestamp = params.length > 2 && params[2] != null ? Long.parseLong(params[2]) : Long.MIN_VALUE; final long toTimestamp = params.length > 3 && params[3] != null ? Long.parseLong(params[3]) : Long.MAX_VALUE; final WanReplicationService service = textCommandService.getNode().getNodeEngine().getWanReplicationService(); try { if (fromTimestamp == Long.MIN_VALUE && toTimestamp == Long.MAX_VALUE) { service.syncAllMaps(wanRepName, targetGroup); } else { service.syncAllMaps(wanRepName, targetGroup, fromTimestamp, toTimestamp); } res = response(ResponseType.SUCCESS, "message", "Sync initiated"); } catch (Exception ex) { logger.warning("Error occurred while syncing maps", ex); res = exceptionResponse(ex); } sendResponse(command, res); }
Source:
<code>public static OVirtNodeInfo[] get() { <START> final String prefix[] = Config.<String> GetValue(ConfigValues.OvirtIsoPrefix).split(":"); <END> final String path[] = Config.resolveOVirtISOsRepositoryPath().split(":"); final String minimumVersion[] = Config.<String> GetValue(ConfigValues.OvirtInitialSupportedIsoVersion).split(":"); if (prefix.length != minimumVersion.length || prefix.length != path.length) { throw new IllegalArgumentException("Illegal Node Info"); } List<OVirtNodeInfo> info = new LinkedList<OVirtNodeInfo>(); for (int i=0;i<prefix.length;i++) { info.add(new OVirtNodeInfo(prefix[i], path[i], minimumVersion[i])); } return info.toArray(new OVirtNodeInfo[info.size()]); }</code><technical_language>":" -> delimiter</technical_language>

Target:
public static OVirtNodeInfo[] get() { final String delimiter = ":"; final String prefix[] = Config.<String> GetValue(ConfigValues.OvirtIsoPrefix).split(delimiter); final String path[] = Config.resolveOVirtISOsRepositoryPath().split(delimiter); final String pattern = Config.<String> GetValue(ConfigValues.OvirtPattern); final String minimumVersion[] = Config.<String> GetValue(ConfigValues.OvirtInitialSupportedIsoVersion).split(delimiter); if (prefix.length != minimumVersion.length || prefix.length != path.length) { throw new IllegalArgumentException("Illegal Node Info"); } List<OVirtNodeInfo> info = new LinkedList<OVirtNodeInfo>(); for (int i=0;i<prefix.length;i++) { info.add(new OVirtNodeInfo(prefix[i], path[i], minimumVersion[i], pattern)); } return info.toArray(new OVirtNodeInfo[info.size()]); }
Source:
<code>protected void initializeConfigParams() { String value = null; try { value = getManagedProperty(DataSourceSettings.getInstance().getProperties(), DEPLOYMENTS_INITIALIZATION_RETRIES, Long.toString(deploymentsInitializationRetries)); deploymentsInitializationRetries = Long.parseLong(value); } catch (NumberFormatException e) { <START> logger.warn("Wrong integer value: " + value + " was set for property: " + DEPLOYMENTS_INITIALIZATION_RETRIES); <END> } try { value = getManagedProperty(DataSourceSettings.getInstance().getProperties(), DEPLOYMENTS_INITIALIZATION_DELAY, Long.toString(deploymentsInitializationDelay)); deploymentsInitializationDelay = Long.parseLong(value); } catch (NumberFormatException e) { logger.warn("Wrong integer value: " + value + " was set for property: " + DEPLOYMENTS_INITIALIZATION_DELAY); } }</code><technical_language>This suspicious. I misunderstand code, this leave deploymentsInitializationRetries uninitialized in cases NumberFormatException is thrown? question for deploymentsInitializationDelay below.. EDIT: I stay default set in field initialized, fact logged well. warning like: "Failed parse &lt;BAD VALUE&gt; of property &lt;XXX&gt;. default &lt;YYY&gt;"</technical_language>

Target:
protected void initializeConfigParams() { String value = null; try { value = getManagedProperty(DataSourceSettings.getInstance().getProperties(), DEPLOYMENTS_INITIALIZATION_RETRIES, Long.toString(deploymentsInitializationRetries)); deploymentsInitializationRetries = Long.parseLong(value); } catch (NumberFormatException e) { logger.warn("Wrong integer value: " + value + " was set for property: " + DEPLOYMENTS_INITIALIZATION_RETRIES + " The by default value: " + deploymentsInitializationRetries + " will be used instead."); } try { value = getManagedProperty(DataSourceSettings.getInstance().getProperties(), DEPLOYMENTS_INITIALIZATION_DELAY, Long.toString(deploymentsInitializationDelay)); deploymentsInitializationDelay = Long.parseLong(value); } catch (NumberFormatException e) { logger.warn("Wrong integer value: " + value + " was set for property: " + DEPLOYMENTS_INITIALIZATION_DELAY + " The by default value: " + deploymentsInitializationDelay + " will be used instead."); } }
Source:
<code>public void service(HttpRequest request, HttpResponse response) throws IOException { String name; <START> String contentType = request.getContentType().get(); <END> switch (contentType) { case "application/json": JsonObject body = gson.fromJson(request.getReader(), JsonObject.class); if (body.has("name")) { name = body.get("name").getAsString(); break; } case "application/octet-stream": name = new String(Base64.getDecoder().decode(request.getInputStream().readAllBytes()), StandardCharsets.UTF_8); break; case "text/plain": name = request.getReader().readLine(); break; case "application/x-www-form-urlencoded": Optional<String> nameParam = request.getFirstQueryParameter("name"); if (nameParam.isPresent()) { name = nameParam.get(); break; } default: response.setStatusCode(HttpURLConnection.HTTP_BAD_REQUEST); return; } if (name != null) { BufferedWriter writer = response.getWriter(); writer.write(String.format("Hello %s!", name)); } }</code><technical_language>track for a future issue. getContentType returns optional, contentType present. java request.getContentType().ifPresent(contentType -> { }); java String contentType = request.getContentType().orElseThrow(() -> new RuntimeException("content type specified"));</technical_language>

Target:
public void service(HttpRequest request, HttpResponse response) throws IOException { String name; String contentType = request.getContentType().orElse(""); switch (contentType) { case "application/json": JsonObject body = gson.fromJson(request.getReader(), JsonObject.class); if (body.has("name")) { name = body.get("name").getAsString(); break; } case "application/octet-stream": name = new String(Base64.getDecoder().decode(request.getInputStream().readAllBytes()), StandardCharsets.UTF_8); break; case "text/plain": name = request.getReader().readLine(); break; case "application/x-www-form-urlencoded": Optional<String> nameParam = request.getFirstQueryParameter("name"); if (nameParam.isPresent()) { name = nameParam.get(); break; } default: response.setStatusCode(HttpURLConnection.HTTP_BAD_REQUEST); return; } if (name != null) { BufferedWriter writer = response.getWriter(); writer.write(String.format("Hello %s!", name)); } }
Source:
<code>public void dispose() { mBaseHandler.removeCallbacksAndMessages(null); <START> <END> if(this.records != null) { this.records.removeAll(this.records); } this.records = null; this.mLock = null; this.adnCache = null; this.mBaseHandler = null; this.phone = null; }</code><technical_language>done for patch3</technical_language>

Target:
public void dispose() { }