auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void testWithGroovyTemplate() throws Exception { args.put(ScriptContent.SCRIPT_TEMPLATE_ARG, "groovy-sample.template"); args.put(ScriptContent.SCRIPT_INIT_ARG, false); AbstractBuild build = mock(AbstractBuild.class); when(build.getResult()).thenReturn(Result.SUCCESS); when(build.getUrl()).thenReturn("email-test/34"); ExtendedEmailPublisher emailPublisher = new ExtendedEmailPublisher(); when(emailPublisher.DESCRIPTOR.getHudsonUrl()).thenReturn("http://localhost/"); mockChangeSet(build); String content = scriptContent.getContent(build, emailPublisher, null, args); String expected = "build result is SUCCESS" + "build url is http://localhost/email-test/34" + "Revision: (Kohsuke Kawaguchi) COMMIT MESSAGE" + "edit,path1" + "add,path2"; assertEquals(expected, content.replace("\r\n", "").replace("\n","")); <START> } <END></code><technical_language>whitespace setting is off. OS's tested this on</technical_language>

Target:
public void testWithGroovyTemplate() throws Exception { args.put(ScriptContent.SCRIPT_TEMPLATE_ARG, "groovy-sample.template"); args.put(ScriptContent.SCRIPT_INIT_ARG, false); AbstractBuild build = mock(AbstractBuild.class); when(build.getResult()).thenReturn(Result.SUCCESS); when(build.getUrl()).thenReturn("email-test/34"); ExtendedEmailPublisher emailPublisher = new ExtendedEmailPublisher(); when(emailPublisher.DESCRIPTOR.getHudsonUrl()).thenReturn("http://localhost/"); mockChangeSet(build); String content = scriptContent.getContent(build, emailPublisher, null, args); String expectedFile = "hudson/plugins/emailext/templates/" + "groovy-sample.result"; InputStream in = getClass().getClassLoader().getResourceAsStream(expectedFile); String expected = new Scanner(in).useDelimiter("\\Z").next(); assertEquals(expected.trim(), content.trim()); }
Source:
<code>protected String generateReplyAddress() { <START> return EventbusAddresses.generateInternal("reply"); <END> }</code><technical_language>sequence, prefix "__vertx.reply."</technical_language>

Target:
protected String generateReplyAddress() { return "__vertx.reply." + Long.toString(replySequence.incrementAndGet()); }
Source:
<code>protected void performRuntime(final OperationContext context, final ModelNode operation, final ModelNode model) throws OperationFailedException { final PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR)); final String outboundSocketName = address.getLastElement().getValue(); context.addStep(new OperationStepHandler() { @Override public void execute(OperationContext context, ModelNode operation) throws OperationFailedException { final String currentSocketBindingGroupName = address.getParent().getLastElement().getValue(); final Set<ResourceEntry> children = context.readResourceFromRoot(PathAddress.EMPTY_ADDRESS) .getChildren(ModelDescriptionConstants.SOCKET_BINDING_GROUP); for (Resource.ResourceEntry re : children) { if (re.getName().equalsIgnoreCase(currentSocketBindingGroupName)) { for (Resource.ResourceEntry entry : re.getChildren(ModelDescriptionConstants.SOCKET_BINDING)) { String name = entry.getName(); if (name.equalsIgnoreCase(outboundSocketName)) throw ControllerLogger.ROOT_LOGGER.socketBindingalreadyDeclared( Element.SOCKET_BINDING.getLocalName(), Element.OUTBOUND_SOCKET_BINDING.getLocalName(), name, Element.SOCKET_BINDING_GROUP.getLocalName(), currentSocketBindingGroupName); } break; } } } <START> }, Stage.RUNTIME); <END> try { installOutboundSocketBindingService(context, model, outboundSocketName); } catch (UnknownHostException e) { throw new OperationFailedException(e.toString()); } }</code><technical_language>This is model validation needs in Stage.MODEL. needs moved out of performRuntime()</technical_language>

Target:
protected void performRuntime(final OperationContext context, final ModelNode operation, final ModelNode model) throws OperationFailedException { final PathAddress address = PathAddress.pathAddress(operation.get(OP_ADDR)); final String outboundSocketName = address.getLastElement().getValue(); try { installOutboundSocketBindingService(context, model, outboundSocketName); } catch (UnknownHostException e) { throw new OperationFailedException(e.toString()); } }
Source:
<code>public void testRunTimedCmd_WithOutputRedirect() throws IOException { File outputRedirect = FileUtil.createTempFile("output_redirect", ".txt"); try { CommandResult result = RunUtil.getDefault() .runTimedCmd( SHORT_TIMEOUT_MS, new <START> FileOutputStream(outputRedirect), <END> null, "echo", "TEST_OUTPUT"); assertTrue(CommandStatus.SUCCESS.equals(result.getStatus())); assertEquals("TEST_OUTPUT\n", FileUtil.readStringFromFile(outputRedirect)); } finally { FileUtil.deleteFile(outputRedirect); } }</code><technical_language>nit: close stream</technical_language>

Target:
public void testRunTimedCmd_WithOutputRedirect() throws IOException { File outputRedirect = FileUtil.createTempFile("output_redirect", ".txt"); FileOutputStream outputStream = new FileOutputStream(outputRedirect); try { CommandResult result = RunUtil.getDefault() .runTimedCmd( SHORT_TIMEOUT_MS, outputStream, null, "echo", "TEST_OUTPUT"); assertTrue(CommandStatus.SUCCESS.equals(result.getStatus())); assertEquals("TEST_OUTPUT\n", FileUtil.readStringFromFile(outputRedirect)); } finally { FileUtil.deleteFile(outputRedirect); outputStream.close(); } }
Source:
<code>protected void executeQueryCommand() { List<OvfEntityData> entityList = unregisteredOVFDataDao.getByEntityIdAndStorageDomain(getParameters().getEntityId(), getParameters().getStorageDomainId()); VmTemplate vmTemplate = null; if (!entityList.isEmpty()) { OvfEntityData ovfEntityData = entityList.get(0); try { vmTemplate = ovfHelper.readVmTemplateFromOvf(ovfEntityData.getOvfData()).getVmTemplate(); } catch (OvfReaderException e) { <START> log.debug("failed <END> to parse a given ovf configuration: \n" + ovfEntityData.getOvfData(), e); getQueryReturnValue().setExceptionString("failed to parse a given ovf configuration " + e.getMessage()); } } getQueryReturnValue().setSucceeded(true); getQueryReturnValue().setReturnValue(vmTemplate); }</code><technical_language>F</technical_language>

Target:
protected void executeQueryCommand() { List<OvfEntityData> entityList = unregisteredOVFDataDao.getByEntityIdAndStorageDomain(getParameters().getEntityId(), getParameters().getStorageDomainId()); VmTemplate vmTemplate = null; if (!entityList.isEmpty()) { OvfEntityData ovfEntityData = entityList.get(0); try { vmTemplate = ovfHelper.readVmTemplateFromOvf(ovfEntityData.getOvfData()).getVmTemplate(); } catch (OvfReaderException e) { log.debug("Failed to parse a given ovf configuration: \n" + ovfEntityData.getOvfData(), e); getQueryReturnValue().setExceptionString("Failed to parse a given ovf configuration: " + e.getMessage()); } } getQueryReturnValue().setSucceeded(true); getQueryReturnValue().setReturnValue(vmTemplate); }
Source:
<code>public void testAlterColumns() { String tableName = randomUUID().toString().toUpperCase(Locale.getDefault()); SchemaTableName schemaTableName = new SchemaTableName("exa_ple", tableName); List<ColumnMetadata> expectedColumns = ImmutableList.of( new ColumnMetadata("columnA", BigintType.BIGINT, null, null, false)); jdbcClient.createTable(new ConnectorTableMetadata(schemaTableName, expectedColumns)); JdbcTableHandle tableHandle = jdbcClient.getTableHandle(schemaTableName); assertEquals(tableHandle.getTableName(), tableName); assertEquals(jdbcClient.getColumns(session, tableHandle), ImmutableList.of( new JdbcColumnHandle(CONNECTOR_ID, "COLUMNA", JDBC_BIGINT, BigintType.BIGINT))); jdbcClient.addColumn(tableHandle, new ColumnMetadata("columnB", BigintType.BIGINT, null, null, false)); assertEquals(jdbcClient.getColumns(session, tableHandle), ImmutableList.of( new JdbcColumnHandle(CONNECTOR_ID, "COLUMNA", JDBC_BIGINT, BigintType.BIGINT), new JdbcColumnHandle(CONNECTOR_ID, "COLUMNB", JDBC_BIGINT, BigintType.BIGINT))); jdbcClient.dropColumn(tableHandle, new JdbcColumnHandle(CONNECTOR_ID, "COLUMNB", JDBC_BIGINT, BigintType.BIGINT)); assertEquals(jdbcClient.getColumns(session, tableHandle), ImmutableList.of( new JdbcColumnHandle(CONNECTOR_ID, "COLUMNA", JDBC_BIGINT, BigintType.BIGINT))); <START> } <END></code><technical_language>lowercase for column name, ColumnMetadata lowercase (and reader is uppercase)</technical_language>

Target:
public void testAlterColumns() { String tableName = randomUUID().toString().toUpperCase(ENGLISH); SchemaTableName schemaTableName = new SchemaTableName("example", tableName); List<ColumnMetadata> expectedColumns = ImmutableList.of( new ColumnMetadata("columnA", BigintType.BIGINT, null, null, false)); jdbcClient.createTable(new ConnectorTableMetadata(schemaTableName, expectedColumns)); JdbcTableHandle tableHandle = jdbcClient.getTableHandle(schemaTableName); try { assertEquals(tableHandle.getTableName(), tableName); assertEquals(jdbcClient.getColumns(session, tableHandle), ImmutableList.of( new JdbcColumnHandle(CONNECTOR_ID, "COLUMNA", JDBC_BIGINT, BigintType.BIGINT, true))); jdbcClient.addColumn(tableHandle, new ColumnMetadata("columnB", DoubleType.DOUBLE, null, null, false)); assertEquals(jdbcClient.getColumns(session, tableHandle), ImmutableList.of( new JdbcColumnHandle(CONNECTOR_ID, "COLUMNA", JDBC_BIGINT, BigintType.BIGINT, true), new JdbcColumnHandle(CONNECTOR_ID, "COLUMNB", JDBC_DOUBLE, DoubleType.DOUBLE, true))); jdbcClient.dropColumn(tableHandle, new JdbcColumnHandle(CONNECTOR_ID, "COLUMNB", JDBC_BIGINT, BigintType.BIGINT, true)); assertEquals(jdbcClient.getColumns(session, tableHandle), ImmutableList.of( new JdbcColumnHandle(CONNECTOR_ID, "COLUMNA", JDBC_BIGINT, BigintType.BIGINT, true))); } finally { jdbcClient.dropTable(tableHandle); } }
Source:
<code>public String getIconFileName() { <START> return Jenkins.getInstance().hasPermission(Jenkins.ADMINISTER) ? <END> "/plugin/selenium/24x24/selenium.png" : null; }</code><technical_language>getRequiredPermission, for ease of change if a specific permission is added</technical_language>

Target:
public String getIconFileName() { return Jenkins.getInstance().hasPermission(getRequiredPermission()) ? "/plugin/selenium/24x24/selenium.png" : null; }
Source:
<code>public void testSecondInputCheckAllWithFileMapping() throws IOException { <START> File metrics = File.createTempFile("Fingerprinting", "test.crosscheck_metrics"); <END> metrics.deleteOnExit(); final List<String> args = new ArrayList<>(); args.add("INPUT=" + NA12891_named_NA12892_r1.getAbsolutePath()); args.add("SECOND_INPUT=" + NA12891_r2.getAbsolutePath()); final File map = File.createTempFile("map", ".txt"); map.deleteOnExit(); tabbedWrite(map, Arrays.asList(Collections.singletonList("NA12891"), Collections.singletonList(NA12891_named_NA12892_r1.getAbsolutePath()))); args.add("OUTPUT=" + metrics.getAbsolutePath()); args.add("HAPLOTYPE_MAP=" + HAPLOTYPE_MAP); args.add("LOD_THRESHOLD=" + -1.0); args.add("CROSSCHECK_BY=SAMPLE"); args.add("CROSSCHECK_MODE=CHECK_ALL_OTHERS"); args.add("INPUT_SAMPLE_FILE_MAP=" + map); final int expectedRetVal = 0; final int numberOfSamples1 = 1; final int numberOfSamples2 = 1; boolean ExpectAllMatch = false; doTest(args.toArray(new String[0]), metrics, expectedRetVal, numberOfSamples1 * numberOfSamples2, CrosscheckMetric.DataType.SAMPLE, ExpectAllMatch); }</code><technical_language>Path for new code, if calling code awkward</technical_language>

Target:
public void testSecondInputCheckAllWithFileMapping() throws IOException { File metrics = File.createTempFile("Fingerprinting", "test.crosscheck_metrics"); metrics.deleteOnExit(); final List<String> args = new ArrayList<>(); args.add("INPUT=" + NA12891_named_NA12892_r1.getAbsolutePath()); args.add("SECOND_INPUT=" + NA12891_r2.getAbsolutePath()); final Path map = File.createTempFile("map", ".txt").toPath(); IOUtil.deleteOnExit(map); tabbedWrite(map, Arrays.asList(Collections.singletonList("NA12891"), Collections.singletonList(NA12891_named_NA12892_r1.getAbsolutePath()))); args.add("OUTPUT=" + metrics.getAbsolutePath()); args.add("HAPLOTYPE_MAP=" + HAPLOTYPE_MAP); args.add("LOD_THRESHOLD=" + -1.0); args.add("CROSSCHECK_BY=SAMPLE"); args.add("CROSSCHECK_MODE=CHECK_ALL_OTHERS"); args.add("INPUT_SAMPLE_FILE_MAP=" + map); final int expectedRetVal = 0; final int numberOfSamples1 = 1; final int numberOfSamples2 = 1; boolean ExpectAllMatch = false; doTest(args.toArray(new String[0]), metrics, expectedRetVal, numberOfSamples1 * numberOfSamples2, CrosscheckMetric.DataType.SAMPLE, ExpectAllMatch); }
Source:
<code>private synchronized PackIndex idx() throws IOException { if (loadedIdx == null) { if (invalid) throw new <START> PackInvalidException(getPackFile()); <END> try { final PackIndex idx = PackIndex.open(packFile.create(INDEX)); if (packChecksum == null) { packChecksum = idx.packChecksum; } else if (!Arrays.equals(packChecksum, idx.packChecksum)) { throw new PackMismatchException(MessageFormat.format( JGitText.get().packChecksumMismatch, packFile.getPath())); } loadedIdx = idx; } catch (InterruptedIOException e) { throw e; } catch (IOException e) { invalid = true; throw e; } } return loadedIdx; }</code><technical_language>field</technical_language>

Target:
private synchronized PackIndex idx() throws IOException { if (loadedIdx == null) { if (invalid) throw new PackInvalidException(packFileName); try { final PackIndex idx = PackIndex.open(packFileName.create(INDEX)); if (packChecksum == null) { packChecksum = idx.packChecksum; } else if (!Arrays.equals(packChecksum, idx.packChecksum)) { throw new PackMismatchException(MessageFormat.format( JGitText.get().packChecksumMismatch, packFileName.getPath())); } loadedIdx = idx; } catch (InterruptedIOException e) { throw e; } catch (IOException e) { invalid = true; throw e; } } return loadedIdx; }
Source:
<code>public String showAddDialogue() { if (addDialog == null) { addDialog = new DialogAddRegex(owner, this.getRegexes()); addDialog.pack(); <START> } <END> addDialog.setVisible(true); String regex = addDialog.getRegex(); addDialog.clear(); return regex; }</code><technical_language>set list time (same for modify), change constructing dialogue</technical_language>

Target:
public String showAddDialogue() { if (addDialog == null) { addDialog = new DialogAddRegex(owner); addDialog.pack(); } addDialog.setRegexes(this.getRegexes()); addDialog.setVisible(true); String regex = addDialog.getRegex(); addDialog.clear(); return regex; }
Source:
<code>public void safeExecute(Shell shell) { ConfigHelper helper; String titleText; if (canWrite) { helper = new EditComponentHelper(shell, SERVER); titleText = EDIT_TITLE; } else { helper = new ViewComponentHelper(shell); titleText = VIEW_TITLE; } ConfigSelectionDialog selectionDialog = <START> new ConfigSelectionDialog(shell, titleText, SERVER.componentsInfo().getValue(), false, true); <END> if (selectionDialog.open() == Window.OK) { String configName = selectionDialog.selectedConfig(); helper.createDialog(configName, false); } }</code><technical_language>false is surprising, I breaks in particular. reason for change</technical_language>

Target:
public void safeExecute(Shell shell) { ConfigHelper helper; String titleText; if (canWrite) { helper = new EditComponentHelper(shell, SERVER); titleText = editTitle; } else { helper = new ViewComponentHelper(shell); titleText = viewTitle; } ConfigSelectionDialog selectionDialog = new ConfigSelectionDialog(shell, titleText, SERVER.componentsInfo().getValue(), true, true); if (selectionDialog.open() == Window.OK) { String configName = selectionDialog.selectedConfig(); helper.createDialog(configName, false); } }
Source:
<code>public void testListVolumesInDetail() { Set<? extends Volume> volumes = volumeApi.listInDetail().toSet(); assertNotNull(volumes); boolean foundIt = false; for (Volume vol : volumes) { Volume details = volumeApi.get(vol.getId()); assertNotNull(details); assertNotNull(details.getId()); assertNotNull(details.getCreated()); assertTrue(details.getSize() > -1); assertEquals(details.getId(), vol.getId()); assertEquals(details.getSize(), vol.getSize()); assertEquals(details.getName(), vol.getName()); assertEquals(details.getDescription(), vol.getDescription()); assertEquals(details.getCreated(), vol.getCreated()); assertEquals(details.getTenantId(), vol.getTenantId()); if (Objects.equal(details.getId(), testVolume.getId())) { <START> foundIt = true; <END> } } assertTrue(foundIt, "Failed to find the volume we previously created in listInDetail() response"); }</code><technical_language>this need a break</technical_language>

Target:
public void testListVolumesInDetail() { Set<? extends Volume> volumes = volumeApi.listInDetail().toSet(); assertNotNull(volumes); boolean foundIt = false; for (Volume vol : volumes) { Volume details = volumeApi.get(vol.getId()); assertNotNull(details); assertNotNull(details.getId()); assertNotNull(details.getCreated()); assertTrue(details.getSize() > -1); assertEquals(details.getId(), vol.getId()); assertEquals(details.getSize(), vol.getSize()); assertEquals(details.getName(), vol.getName()); assertEquals(details.getDescription(), vol.getDescription()); assertEquals(details.getCreated(), vol.getCreated()); assertEquals(details.getTenantId(), vol.getTenantId()); if (Objects.equal(details.getId(), testVolume.getId())) { foundIt = true; break; } } assertTrue(foundIt, "Failed to find the volume we previously created in listInDetail() response"); }
Source:
<code>private ArrayList<Comment> fetchAllComments(ArticleTable article) { <START> return (ArrayList<Comment>) hibernateTemplate.find("FROM Comment WHERE articleId = ?", article.getArticleId()); <END> }</code><technical_language>Casting ArrayList is brittle. return List<> instead</technical_language>

Target:
private List<Comment> fetchAllComments(ArticleTable article) { return (ArrayList<Comment>) hibernateTemplate.find("FROM Comment WHERE articleId = ?", article.getArticleId()); }
Source:
<code>public void onFeedShareImage(final FeaturedImageCard card) { <START> new ImagePipelineBitmapGetter(this, card.baseImage().thumbnail().source().toString()){ <END> @Override public void onSuccess(@Nullable Bitmap bitmap) { if (bitmap != null) { ShareUtil.shareImage(MainActivity.this, bitmap, new java.io.File(card.baseImage().thumbnail().source().toString()).getName(), getString(R.string.feed_featured_image_share_subject) + " | " + DateUtil.getFeedCardDateString(card.date().baseCalendar()), card.baseImage().image().source().toString()); } else { FeedbackUtil.showMessage(MainActivity.this, getString(R.string.gallery_share_error, card.baseImage().title())); } } }.get(); }</code><technical_language>this URL is in a places. Consider making a local</technical_language>

Target:
public void onFeedShareImage(final FeaturedImageCard card) { final String thumbUrl = card.baseImage().thumbnail().source().toString(); final String fullSizeUrl = card.baseImage().image().source().toString(); new ImagePipelineBitmapGetter(this, thumbUrl){ @Override public void onSuccess(@Nullable Bitmap bitmap) { if (bitmap != null) { ShareUtil.shareImage(MainActivity.this, bitmap, new File(thumbUrl).getName(), getString(R.string.feed_featured_image_share_subject) + " | " + DateUtil.getFeedCardDateString(card.date().baseCalendar()), fullSizeUrl); } else { FeedbackUtil.showMessage(MainActivity.this, getString(R.string.gallery_share_error, card.baseImage().title())); } } }.get(); }
Source:
<code>private void sendWebhookAlert(AbstractJobAlert jobAlert, String alertLink, String reason, Map<String, String> errors) { try { byte[] body = objectMapper.writeValueAsBytes(getWebhookObject(spawn, jobAlert, alertLink, reason, errors)); HttpResponse response = HttpUtil.httpPost(jobAlert.webhookURL, ContentType.APPLICATION_JSON.getMimeType(), body, 5_000); <START> if (response.getStatus() / 100 != 2) { <END> log.error("bad status code received for webhook alert for alert {}", jobAlert.alertId); } } catch (IOException ex) { log.error("unable to send webhook alert for alert {}", jobAlert.alertId, ex); } }</code><technical_language>This is equivalent but, I checking status >= 300 is slightly easier read. if HttpUtil.httpPost() auto redirect, check >=400</technical_language>

Target:
private void sendWebhookAlert(AbstractJobAlert jobAlert, String alertLink, String reason, Map<String, String> errors) { try { byte[] body = objectMapper.writeValueAsBytes(getWebhookObject(spawn, jobAlert, alertLink, reason, errors)); HttpResponse response = HttpUtil.httpPost(jobAlert.webhookURL, ContentType.APPLICATION_JSON.getMimeType(), body, 5_000); if (response.getStatus() >= 300) { log.error("non-200 status code received for webhook alert for alert {}", jobAlert.alertId); } } catch (IOException ex) { log.error("unable to send webhook alert for alert {}", jobAlert.alertId, ex); } }
Source:
<code>public ThingUID getThingUID(ServiceInfo service) { if (service.getApplication().contains("dssweb")) { hostAdress = service.getName() + "." + service.getDomain() + "."; DsAPI digitalSTROMClient = new DsAPIImpl(hostAdress, Config.DEFAULT_CONNECTION_TIMEOUT, Config.DEFAULT_READ_TIMEOUT); dsid = digitalSTROMClient.getDSID("123"); if (dsid != null) { return new ThingUID(DigitalSTROMBindingConstants.THING_TYPE_DSS_BRIDGE, dsid); } else { <START> return new ThingUID(DigitalSTROMBindingConstants.THING_TYPE_DSS_BRIDGE, "1"); <END> } } return null; }</code><technical_language>??? end ThingUID for discovered dSS - this simply work. ServiceInfo provide unique information used</technical_language>

Target:
public ThingUID getThingUID(ServiceInfo service) { if (service.getApplication().contains("dssweb")) { String hostAddress = service.getName() + "." + service.getDomain() + "."; DsAPI digitalSTROMClient = new DsAPIImpl(hostAddress, Config.DEFAULT_CONNECTION_TIMEOUT, Config.DEFAULT_READ_TIMEOUT, true); String dsid = digitalSTROMClient.getDSID("123"); if (dsid != null) { return new ThingUID(DigitalSTROMBindingConstants.THING_TYPE_DSS_BRIDGE, dsid); } else { logger.error("Can't get server dSID to generate thing UID. Please add the server manually."); } } return null; }
Source:
<code>protected StripeRequest(GatewayAccountEntity gatewayAccount, String idempotencyKey, StripeGatewayConfig stripeGatewayConfig) { if (gatewayAccount == null) { throw new IllegalArgumentException("Cannot create StripeRequest without a gateway account"); } <START> String stripeConnectAccountId = gatewayAccount.getCredentials().get("stripe_account_id"); <END> if (stripeConnectAccountId == null) { throw new IllegalArgumentException("Cannot create StripeRequest with a gateway account with out a stripe account id set"); } this.gatewayAccount = gatewayAccount; this.idempotencyKey = idempotencyKey; this.stripeGatewayConfig = stripeGatewayConfig; this.stripeConnectAccountId = stripeConnectAccountId; }</code><technical_language>please rename this field? is shadowing class fields reduces code readability</technical_language>

Target:
protected StripeRequest(GatewayAccountEntity gatewayAccount, String idempotencyKey, StripeGatewayConfig stripeGatewayConfig) { if (gatewayAccount == null) { throw new IllegalArgumentException("Cannot create StripeRequest without a gateway account"); } String stripeAccountId = gatewayAccount.getCredentials().get("stripe_account_id"); if (stripeAccountId == null) { throw new IllegalArgumentException("Cannot create StripeRequest with a gateway account with out a stripe account id set"); } this.gatewayAccount = gatewayAccount; this.idempotencyKey = idempotencyKey; this.stripeGatewayConfig = stripeGatewayConfig; this.stripeConnectAccountId = stripeAccountId; }
Source:
<code>public long createSecretContent(long secretId, String encryptedContent, String hmac, String creator, Map<String, String> metadata, long expiry, long now) { SecretsContentRecord r = dslContext.newRecord(SECRETS_CONTENT); String jsonMetadata; try { jsonMetadata = mapper.writeValueAsString(metadata); } catch (JsonProcessingException e) { throw Throwables.propagate(e); } <START> byte[] generateIdBytes = new byte[8]; <END> random.nextBytes(generateIdBytes); ByteBuffer generateIdByteBuffer = ByteBuffer.wrap(generateIdBytes); long generatedId = generateIdByteBuffer.getLong(); String rowHmac = cryptographer.computeRowHmac( SECRETS_CONTENT.getName(), encryptedContent, generatedId); r.setId(generatedId); r.setSecretid(secretId); r.setEncryptedContent(encryptedContent); r.setContentHmac(hmac); r.setCreatedby(creator); r.setCreatedat(now); r.setUpdatedby(creator); r.setUpdatedat(now); r.setMetadata(jsonMetadata); r.setExpiry(expiry); r.setRowHmac(rowHmac); r.store(); pruneOldContents(secretId); return r.getId(); }</code><technical_language>![ ](<LINK_0></technical_language>

Target:
public long createSecretContent(long secretId, String encryptedContent, String hmac, String creator, Map<String, String> metadata, long expiry, long now) { SecretsContentRecord r = dslContext.newRecord(SECRETS_CONTENT); String jsonMetadata; try { jsonMetadata = mapper.writeValueAsString(metadata); } catch (JsonProcessingException e) { throw Throwables.propagate(e); } long generatedId = rowHmacGenerator.getNextLongSecure(); String rowHmac = rowHmacGenerator.computeRowHmac( SECRETS_CONTENT.getName(), encryptedContent, generatedId); r.setId(generatedId); r.setSecretid(secretId); r.setEncryptedContent(encryptedContent); r.setContentHmac(hmac); r.setCreatedby(creator); r.setCreatedat(now); r.setUpdatedby(creator); r.setUpdatedat(now); r.setMetadata(jsonMetadata); r.setExpiry(expiry); r.setRowHmac(rowHmac); r.store(); pruneOldContents(secretId); return r.getId(); }
Source:
<code>public void testExecuteQueryGetUnregisteredTemplate() throws OvfReaderException { setUpTemplate(); setUpQueryEntities(); getQuery().executeQueryCommand(); @SuppressWarnings("unchecked") VmTemplate result = getQuery().getQueryReturnValue().getReturnValue(); assertEquals(VmTemplateReturnForOvf, result, "Wrong Templates entity <START> in result"); <END> }</code><technical_language>in result</technical_language>

Target:
public void testExecuteQueryGetUnregisteredTemplate() throws OvfReaderException { setUpTemplate(); setUpQueryEntities(); getQuery().executeQueryCommand(); @SuppressWarnings("unchecked") VmTemplate result = getQuery().getQueryReturnValue().getReturnValue(); assertEquals(VmTemplateReturnForOvf, result, "Wrong Templates entity"); }
Source:
<code>private void writeAnswer( Sheet sheet, Row row, int startColumn, QuestionDto questionDto, String value, boolean useQuestionId) { assert value != null; <START> value = value.trim(); <END> List<String> cells = new ArrayList<>(); QuestionType questionType = questionDto.getQuestionType(); Long questionId = questionDto.getKeyId(); switch (questionType) { case DATE: cells.add(dateCellValue(value, questionId)); break; case PHOTO: cells.add(photoCellValue(value, imagePrefix)); break; case GEO: cells.addAll(geoCellValues(value)); break; case CASCADE: cells.addAll(cascadeCellValues(value, useQuestionId, questionDto.getLevelNames() .size())); break; case OPTION: cells.add(optionCellValue(value)); break; default: cells.add(sanitize(value)); break; } int col = startColumn; for (String cellValue : cells) { if (questionType == QuestionType.NUMBER) { createCell(row, col, cellValue, null, Cell.CELL_TYPE_NUMERIC); } else { createCell(row, col, cellValue); } col++; } }</code><technical_language>This necessary trim BulkDataServiceClient.parseSurveyInstanceResponse</technical_language>

Target:
private void writeAnswer( Sheet sheet, Row row, int startColumn, QuestionDto questionDto, String value, boolean useQuestionId) { assert value != null; List<String> cells = new ArrayList<>(); QuestionType questionType = questionDto.getQuestionType(); Long questionId = questionDto.getKeyId(); switch (questionType) { case DATE: cells.add(dateCellValue(value, questionId)); break; case PHOTO: cells.add(photoCellValue(value, imagePrefix)); break; case GEO: cells.addAll(geoCellValues(value)); break; case CASCADE: cells.addAll(cascadeCellValues(value, useQuestionId, questionDto.getLevelNames() .size())); break; case OPTION: cells.add(optionCellValue(value)); break; default: cells.add(sanitize(value)); break; } int col = startColumn; for (String cellValue : cells) { if (questionType == QuestionType.NUMBER) { createCell(row, col, cellValue, null, Cell.CELL_TYPE_NUMERIC); } else { createCell(row, col, cellValue); } col++; } }
Source:
<code>public void testPresent_combatDamageResolvesLethalityUsingPower() { addCard(Zone.BATTLEFIELD, playerA, "Zilortha, Strength Incarnate"); addCard(Zone.BATTLEFIELD, playerA, "Savai Sabertooth"); addCard(Zone.BATTLEFIELD, playerB, "Drannith Healer"); attack(1, playerA, "Savai Sabertooth"); block(1, playerB, "Drannith Healer", "Savai Sabertooth"); <START> execute(); <END> assertGraveyardCount(playerA, "Savai Sabertooth", 0); assertGraveyardCount(playerB, "Drannith Healer", 1); }</code><technical_language>setStrictChooseMode assertAllCommandsUsed for new tests. Example: setStrictChooseMode(true); setStopAt(3, PhaseStep.END_COMBAT); execute(); assertAllCommandsUsed();</technical_language>

Target:
public void testPresent_combatDamageResolvesLethalityUsingPower() { addCard(Zone.BATTLEFIELD, playerA, "Zilortha, Strength Incarnate"); addCard(Zone.BATTLEFIELD, playerA, "Savai Sabertooth"); addCard(Zone.BATTLEFIELD, playerB, "Drannith Healer"); attack(1, playerA, "Savai Sabertooth"); block(1, playerB, "Drannith Healer", "Savai Sabertooth"); setStrictChooseMode(true); setStopAt(1, PhaseStep.END_COMBAT); execute(); assertAllCommandsUsed(); assertGraveyardCount(playerA, "Savai Sabertooth", 0); assertGraveyardCount(playerB, "Drannith Healer", 1); }
Source:
<code>public static String machineName(Pod pod, Container container) { final Map<String, String> annotations = pod.getMetadata().getAnnotations(); String machineName; final String containerName = container.getName(); if (annotations != null && (machineName = annotations.get(format(MACHINE_NAME_ANNOTATION_FMT, containerName))) != null) { return machineName; } <START> final Map<String, String> labels = pod.getMetadata().getLabels(); <END> if (labels != null && (machineName = labels.get(CHE_ORIGINAL_NAME_LABEL)) != null) { return machineName + '/' + containerName; } return pod.getMetadata().getName() + '/' + containerName; }</code><technical_language>dont container name. leave param containerName</technical_language>

Target:
public static String machineName(Pod pod, Container container) { final Map<String, String> annotations = pod.getMetadata().getAnnotations(); final String machineName; final String containerName = container.getName(); if (annotations != null && (machineName = annotations.get(format(MACHINE_NAME_ANNOTATION_FMT, containerName))) != null) { return machineName; } final String originalPodName; final Map<String, String> labels = pod.getMetadata().getLabels(); if (labels != null && (originalPodName = labels.get(CHE_ORIGINAL_NAME_LABEL)) != null) { return originalPodName + '/' + containerName; } return pod.getMetadata().getName() + '/' + containerName; }
Source:
<code>public TestingHiveOrcAggregatedMemoryContext() { <START> this.delegate = newSimpleAggregatedMemoryContext(); <END> }</code><technical_language>this(...)</technical_language>

Target:
public TestingHiveOrcAggregatedMemoryContext() { this(newSimpleAggregatedMemoryContext()); }
Source:
<code>public List<Float> apply(Iterable<String> values) throws InvalidAttributeValueException { ImmutableList.Builder<Float> floats = ImmutableList.builder(); for (String value : values) { try { floats.add(Float.valueOf(value)); } catch (NumberFormatException nfe) { <START> throw new InvalidAttributeValueException(value); <END> } } return floats.build(); }</code><technical_language>a female dog, generally good style include in exception throw</technical_language>

Target:
public List<Float> apply(Iterable<String> values) throws InvalidAttributeValueException { ImmutableList.Builder<Float> floats = ImmutableList.builder(); for (String value : values) { try { floats.add(Float.valueOf(value)); } catch (NumberFormatException e) { throw new InvalidAttributeValueException(value, e); } } return floats.build(); }
Source:
<code>public void recordRolledUpUsage(final SubscriptionUsageRecord record, final CallContext callContext) throws UsageApiException { final InternalCallContext internalCallContext = internalCallContextFactory.createInternalCallContext(record.getSubscriptionId(), ObjectType.SUBSCRIPTION, callContext); final String trackingIds; if (Strings.isNullOrEmpty(record.getTrackingId())) { trackingIds = UUIDs.randomUUID().toString(); } else if (recordsWithTrackingIdExist(record, internalCallContext)) { throw new UsageApiException(ErrorCode.USAGE_RECORD_TRACKING_ID_ALREADY_EXISTS, record.getTrackingId()); } else { trackingIds = record.getTrackingId(); } <START> if (!Strings.isNullOrEmpty(record.getTrackingId()) && recordsWithTrackingIdExist(record, internalCallContext)) { <END> } final List<RolledUpUsageModelDao> usages = new ArrayList<RolledUpUsageModelDao>(); for (final UnitUsageRecord unitUsageRecord : record.getUnitUsageRecord()) { for (final UsageRecord usageRecord : unitUsageRecord.getDailyAmount()) { usages.add(new RolledUpUsageModelDao(record.getSubscriptionId(), unitUsageRecord.getUnitType(), usageRecord.getDate(), usageRecord.getAmount(), trackingIds)); } } rolledUpUsageDao.record(usages, internalCallContext); }</code><technical_language>Empty if block</technical_language>

Target:
public void recordRolledUpUsage(final SubscriptionUsageRecord record, final CallContext callContext) throws UsageApiException { final InternalCallContext internalCallContext = internalCallContextFactory.createInternalCallContext(record.getSubscriptionId(), ObjectType.SUBSCRIPTION, callContext); final String trackingIds; if (Strings.isNullOrEmpty(record.getTrackingId())) { trackingIds = UUIDs.randomUUID().toString(); } else if (recordsWithTrackingIdExist(record, internalCallContext)) { throw new UsageApiException(ErrorCode.USAGE_RECORD_TRACKING_ID_ALREADY_EXISTS, record.getTrackingId()); } else { trackingIds = record.getTrackingId(); } final List<RolledUpUsageModelDao> usages = new ArrayList<RolledUpUsageModelDao>(); for (final UnitUsageRecord unitUsageRecord : record.getUnitUsageRecord()) { for (final UsageRecord usageRecord : unitUsageRecord.getDailyAmount()) { usages.add(new RolledUpUsageModelDao(record.getSubscriptionId(), unitUsageRecord.getUnitType(), usageRecord.getDate(), usageRecord.getAmount(), trackingIds)); } } rolledUpUsageDao.record(usages, internalCallContext); }
Source:
<code>public static boolean isVersionMatchStorageType(Version version, boolean isLocalType) { if (isLocalType) { return version.compareTo(new Version(3, 0)) >= 0; } else { <START> return version.compareTo(new Version(3, 0)) >= 0; <END> } }</code><technical_language>I need 'if..else' here? cases</technical_language>

Target:
public static boolean isVersionMatchStorageType(Version version, boolean isLocalType) { return version.compareTo(new Version(3, 0)) >= 0; }
Source:
<code>public String[] getArray(String key) { <START> int resourceId = context.getResources().getIdentifier(key, "array", context.getPackageName()); <END> return context.getResources().getStringArray(resourceId); }</code><technical_language>Hm, I this fall in current form, throw a more explicit error if fails. a guaranteed no-error, array fetched ID resource. get removed error message incredibly vague. Especially this fail due a change in commcare-core is invisible end-user here</technical_language>

Target:
public String[] getArray(String key) { int resourceId = context.getResources().getIdentifier(key, "array", context.getPackageName()); if (resourceId == 0) { throw new RuntimeException("Localized array data for '" + key + "' not found"); } return context.getResources().getStringArray(resourceId); }
Source:
<code>public Dialog onCreateDialog(Bundle savedInstanceState) { <START> final Fragment targetFragment = getTargetFragment(); <END> if (targetFragment == null || !(targetFragment instanceof Listener)) { throw new IllegalStateException("Target fragment must implement ReceiptAttachmentDialogFragment.Listener interface"); } AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(getContext()); dialogBuilder.setTitle(receipt.getName()) .setNegativeButton(android.R.string.cancel, (dialog, which) -> dialog.cancel()); final View dialogView = getActivity().getLayoutInflater().inflate(R.layout.dialog_receipt_attachment, null); dialogBuilder.setView(dialogView); final AlertDialog dialog = dialogBuilder.create(); dialogView.findViewById(R.id.attach_photo).setOnClickListener(v -> { ((Listener) targetFragment).setImageUri(receiptAttachmentManager.attachPhoto(getTargetFragment())); dialog.cancel(); }); dialogView.findViewById(R.id.attach_picture).setOnClickListener(v -> { if (!receiptAttachmentManager.attachPicture(getTargetFragment(), false)) { Toast.makeText(getContext(), getString(R.string.error_no_file_intent_dialog_title), Toast.LENGTH_SHORT).show(); } dialog.cancel(); }); dialogView.findViewById(R.id.attach_file).setOnClickListener(v -> { if (!receiptAttachmentManager.attachFile(getTargetFragment(), false)) { Toast.makeText(getContext(), getString(R.string.error_no_file_intent_dialog_title), Toast.LENGTH_SHORT).show(); } dialog.cancel(); }); return dialog; }</code><technical_language>potentially change if getParentFragment. worries if :)</technical_language>

Target:
public Dialog onCreateDialog(Bundle savedInstanceState) { final Fragment parentFragment = getParentFragment(); if (parentFragment == null || !(parentFragment instanceof Listener)) { throw new IllegalStateException("Parent fragment must implement ReceiptAttachmentDialogFragment.Listener interface"); } AlertDialog.Builder dialogBuilder = new AlertDialog.Builder(getContext()); dialogBuilder.setTitle(receipt.getName()) .setNegativeButton(android.R.string.cancel, (dialog, which) -> dialog.dismiss()); final View dialogView = getActivity().getLayoutInflater().inflate(R.layout.dialog_receipt_attachment, null); dialogBuilder.setView(dialogView); final AlertDialog dialog = dialogBuilder.create(); dialogView.findViewById(R.id.attach_photo).setOnClickListener(v -> { ((Listener) parentFragment).setImageUri(receiptAttachmentManager.attachPhoto(parentFragment)); dialog.dismiss(); }); dialogView.findViewById(R.id.attach_picture).setOnClickListener(v -> { if (!receiptAttachmentManager.attachPicture(parentFragment, false)) { Toast.makeText(getContext(), getString(R.string.error_no_file_intent_dialog_title), Toast.LENGTH_SHORT).show(); } dialog.dismiss(); }); dialogView.findViewById(R.id.attach_file).setOnClickListener(v -> { if (!receiptAttachmentManager.attachFile(parentFragment, false)) { Toast.makeText(getContext(), getString(R.string.error_no_file_intent_dialog_title), Toast.LENGTH_SHORT).show(); } dialog.dismiss(); }); return dialog; }
Source:
<code>public void deleteGroup(final String groupId) { final Group group = groupMap.get(groupId); if (group == null) { LOG.log(Level.WARNING, "There is no such group {0}.", new Object[] {groupId}); return; } <START> group.getApplicationInfo().getQueryRemover().deleteAllQueries(); <END> applicationMap.remove(groupId); groupAllocationTableModifier.addEvent( new WritingEvent(WritingEvent.EventType.GROUP_REMOVE_ALL, null)); }</code><technical_language>This delete queries in application</technical_language>

Target:
public void deleteGroup(final String groupId) { final Group group = groupMap.get(groupId); if (group == null) { LOG.log(Level.WARNING, "There is no such group {0}.", new Object[] {groupId}); return; } final QueryRemover remover = group.getApplicationInfo().getQueryRemover(); for (final Query query : group.getQueries()) { remover.deleteQuery(query.getId()); } applicationMap.remove(groupId); groupAllocationTableModifier.addEvent( new WritingEvent(WritingEvent.EventType.GROUP_REMOVE_ALL, null)); }
Source:
<code>private StringConverter<Double> getLabelConverter() { return new StringConverter<>() { @Override public String toString(Double n) { if (n < 127) { return "None"; } <START> return "Lots"; <END> } @Override public Double fromString(String s) { if (s.equals("None")) { return 0d; } return 127d; } }; }</code><technical_language>I18n message keys</technical_language>

Target:
private StringConverter<Double> getLabelConverter() { return new StringConverter<>() { @Override public String toString(Double n) { if (n < 127) { return "%game.generate.none"; } return "%game.generate.lots"; } @Override public Double fromString(String s) { throw new UnsupportedOperationException(); } }; }
Source:
<code>Something getSomething() { final long valueAtCreationTime = getValue(); return new Something() { private final long creation = valueAtCreationTime; private final long creation2; <START> <END> @Override public void printCreation() { System.out.println(this.creation); } }; }</code><technical_language>ensure private final Object creationObj = 2; is non-compliant for coverage</technical_language>

Target:
Something getSomething() { final long valueAtCreationTime = getValue(); return new Something() { private final long creation = valueAtCreationTime; private final String creationStr = "" + valueAtCreationTime; private final long creation2; @Override public void printCreation() { System.out.println(this.creation); } }; }
Source:
<code>public void run() { setAutoExpandLevel(DEFAULT_AUTOEXPAND); List<@NonNull TimeGraphEntry> traceEntries = getEntryList(getTrace()); if (traceEntries == null) { return; } TimeGraphControl control = getTimeGraphViewer().getTimeGraphControl(); for (TimeGraphEntry traceEntry : traceEntries) { <START> Iterables.filter(Utils.flatten(traceEntry), AttributeEntry.class) <END> .forEach(attribute -> control.setExpandedState(attribute, false)); } redraw(); }</code><technical_language>I collapse StateSystem entries? root-level Attribute entries collapse</technical_language>

Target:
public void run() { setAutoExpandLevel(DEFAULT_AUTOEXPAND); List<@NonNull TimeGraphEntry> traceEntries = getEntryList(getTrace()); if (traceEntries == null) { return; } TimeGraphControl control = getTimeGraphViewer().getTimeGraphControl(); for (TimeGraphEntry traceEntry : traceEntries) { for (TimeGraphEntry moduleEntry : traceEntry.getChildren()) { for (TimeGraphEntry stateSystemEntry : moduleEntry.getChildren()) { Utils.flatten(stateSystemEntry).forEach(attribute -> control.setExpandedState(attribute, false)); } } } redraw(); }
Source:
<code>public static void setUpClass() throws Exception { if (!root.exists()) { skip=true; <START> return; <END> } files = new ArrayList<>(); RepositoryFactory.setIgnored(); FileUtilities.getAllFiles(root, files, false); }</code><technical_language>copyright</technical_language>

Target:
public static void setUpClass() throws Exception { if (!root.exists()) { skip=true; return; } files = new ArrayList<>(); RepositoryFactory.setIgnored(RuntimeEnvironment.getInstance()); FileUtilities.getAllFiles(root, files, false); }
Source:
<code>private void compareCaseDbState(String inputTransactions, String caseDbState) throws Exception { <START> MockDataUtils.parseIntoSandbox(this.getClass().getResourceAsStream(inputTransactions), sandbox, true); <END> EvaluationContext ec = MockDataUtils.buildContextWithInstance(this.sandbox, "casedb", CaseTestUtils.CASE_INSTANCE); Assert.assertTrue(CaseTestUtils.xpathEvalAndCompare(ec, "instance('casedb')/casedb/case[@case_id = 'case_one']/case_name", "case")); byte[] parsedDb = serializeCaseInstanceFromSandbox(sandbox); Document parsed = XmlComparator.getDocumentFromStream(new ByteArrayInputStream(parsedDb)); Document loaded = XmlComparator.getDocumentFromStream(this.getClass().getResourceAsStream(caseDbState)); try { XmlComparator.isDOMEqual(parsed, loaded); } catch(Exception e) { System.out.print(new String(parsedDb)); Assert.assertEquals("CaseDB output did not match expected structure(" + e.getMessage() + ")", new String(dumpStream(caseDbState)), new String(parsedDb)); } }</code><technical_language>parseIntoSandbox is overridden set failfast true if provided, need update existing calls it, want failfast set false</technical_language>

Target:
private void compareCaseDbState(String inputTransactions, String caseDbState) throws Exception { MockDataUtils.parseIntoSandbox(this.getClass().getResourceAsStream(inputTransactions), sandbox); EvaluationContext ec = MockDataUtils.buildContextWithInstance(this.sandbox, "casedb", CaseTestUtils.CASE_INSTANCE); Assert.assertTrue(CaseTestUtils.xpathEvalAndCompare(ec, "instance('casedb')/casedb/case[@case_id = 'case_one']/case_name", "case")); byte[] parsedDb = serializeCaseInstanceFromSandbox(sandbox); Document parsed = XmlComparator.getDocumentFromStream(new ByteArrayInputStream(parsedDb)); Document loaded = XmlComparator.getDocumentFromStream(this.getClass().getResourceAsStream(caseDbState)); try { XmlComparator.isDOMEqual(parsed, loaded); } catch(Exception e) { System.out.print(new String(parsedDb)); Assert.assertEquals("CaseDB output did not match expected structure(" + e.getMessage() + ")", new String(dumpStream(caseDbState)), new String(parsedDb)); } }
Source:
<code>public static boolean isRecoverableException(final Throwable t) { <START> if(t instanceof IOException) { <END> return true; } return false; }</code><technical_language>This simplified return t instanceof IOException</technical_language>

Target:
public static boolean isRecoverableException(final Throwable t) { return t instanceof IOException; }
Source:
<code>protected HierarchicalConfiguration getConfiguration(Function<String, InputStream> configGetter) { logger.debug("Reading blob store configuration"); try (InputStream is = configGetter.apply(configurationPath)) { if (is != null) { return configurationReader.readXmlConfiguration(is, "utf-8"); } } catch (Exception e) { <START> logger.error("Error reading blob store configuration", e); <END> } return null; }</code><technical_language>this exception thrown too</technical_language>

Target:
protected HierarchicalConfiguration getConfiguration(Function<String, InputStream> configGetter) throws IOException, ConfigurationException { logger.debug("Reading blob store configuration"); try (InputStream is = configGetter.apply(configurationPath)) { if (is != null) { return configurationReader.readXmlConfiguration(is, "utf-8"); } } catch (IOException | ConfigurationException e) { logger.error("Error reading blob store configuration", e); throw e; } return null; }
Source:
<code>public String nullableAnnotation() { for (String annotationString : annotations) { if (annotationString.equals("@Nullable") || annotationString.endsWith(".Nullable")) { return annotationString; } } <START> return ""; <END> }</code><technical_language>This return null if found, empty string</technical_language>

Target:
public String nullableAnnotation() { for (String annotationString : annotations) { if (annotationString.equals("@Nullable") || annotationString.endsWith(".Nullable")) { return annotationString; } } return null; }
Source:
<code>public void close() { try { httpClient.close(); <START> if (httpPoolingClient != null) <END> httpPoolingClient.close(); } catch (IOException e) { } }</code><technical_language>this splitted try/catch blocks httpPoolingClient touched if httpClient.close() throws exception</technical_language>

Target:
public void close() { try { httpClient.close(); } catch (IOException e) { LOG.debug(e); } if (httpPoolingClient != null) { try { httpPoolingClient.close(); } catch (IOException e) { LOG.debug(e); } } }