auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public Number getLineOpacity() { if (paint.get("line-opacity") != null) { <START> return (Number) paint.get("line-opacity"); <END> } else { return 1; } }</code><technical_language>This needs .get(number)</technical_language>

Target:
public Number getLineOpacity() { if( paint.containsKey("line-opacity")){ Object lineOpacity = paint.get("line-opacity"); if( lineOpacity == null ){ return 1; } else if (lineOpacity instanceof JSONObject){ throw new UnsupportedOperationException("Functions not supported yet"); } else if (lineOpacity instanceof Number){ return (Number) lineOpacity; } else if(lineOpacity instanceof String){ return Double.parseDouble((String)lineOpacity); } else { throw new IllegalArgumentException( "json contents invalid, line-opacity value limited to Number, String, or JSONObject (function)" + lineOpacity.getClass().getSimpleName()); } } else { return 1; } }
Source:
<code>public void handleRequestType(SAML2HandlerRequest request, SAML2HandlerResponse response) throws ProcessingException { super.handleRequestType(request, response); log.info("EngineAttributeHandler . handleRequestType"); if (request.getSAML2Object() instanceof LogoutRequestType) return; if (getType() == HANDLER_TYPE.SP) return; HTTPContext httpContext = (HTTPContext) request.getContext(); <START> HttpSession session = httpContext.getRequest().getSession(false); <END> Principal userPrincipal = (Principal) session.getAttribute(GeneralConstants.PRINCIPAL_ID); if (userPrincipal == null) userPrincipal = httpContext.getRequest().getUserPrincipal(); Map<String, Object> attribs = (Map<String, Object>) session.getAttribute(GeneralConstants.ATTRIBUTES); if (attribs != null) { log.info("EngineAttributeHandler . handleRequestType attr is not null "+ attribs.keySet()); if (userPrincipal instanceof EnginePrincipal) { log.info("EngineAttributeHandler . handleRequestType setting ENGINE_SESSION_ID in attribs to " + ((EnginePrincipal) userPrincipal).getEngineSessionId()); String engineSessionId = ((EnginePrincipal) userPrincipal).getEngineSessionId(); attribs.put(SessionConstants.HTTP_SESSION_ENGINE_SESSION_ID_KEY, engineSessionId); session.setAttribute(SessionConstants.HTTP_SESSION_ENGINE_SESSION_ID_KEY, engineSessionId); } request.addOption(GeneralConstants.ATTRIBUTES, attribs); session.setAttribute(GeneralConstants.ATTRIBUTES, attribs); } else { log.info("EngineAttributeHandler . handleRequestType attr is null"); } }</code><technical_language>a session return null</technical_language>

Target:
public void handleRequestType(SAML2HandlerRequest request, SAML2HandlerResponse response) throws ProcessingException { super.handleRequestType(request, response); log.info("EngineAttributeHandler . handleRequestType"); if (request.getSAML2Object() instanceof LogoutRequestType) return; if (getType() == HANDLER_TYPE.SP) return; HTTPContext httpContext = (HTTPContext) request.getContext(); HttpSession session = httpContext.getRequest().getSession(false); if (session != null) { Principal userPrincipal = (Principal) session.getAttribute(GeneralConstants.PRINCIPAL_ID); if (userPrincipal == null) userPrincipal = httpContext.getRequest().getUserPrincipal(); Map<String, Object> attribs = (Map<String, Object>) session.getAttribute(GeneralConstants.ATTRIBUTES); if (attribs != null) { log.info("EngineAttributeHandler . handleRequestType attr is not null "+ attribs.keySet()); if (userPrincipal instanceof EnginePrincipal) { log.info("EngineAttributeHandler . handleRequestType setting ENGINE_SESSION_ID in attribs to " + ((EnginePrincipal) userPrincipal).getEngineSessionId()); String engineSessionId = ((EnginePrincipal) userPrincipal).getEngineSessionId(); attribs.put(SessionConstants.HTTP_SESSION_ENGINE_SESSION_ID_KEY, engineSessionId); session.setAttribute(SessionConstants.HTTP_SESSION_ENGINE_SESSION_ID_KEY, engineSessionId); } request.addOption(GeneralConstants.ATTRIBUTES, attribs); session.setAttribute(GeneralConstants.ATTRIBUTES, attribs); } else { log.info("EngineAttributeHandler . handleRequestType attr is null"); } } }
Source:
<code>protected void verify(Host model, Host transform) { assertNotNull(transform); assertEquals(model.getName(), transform.getName()); assertEquals(model.getId(), transform.getId()); assertNotNull(transform.getCluster()); assertEquals(model.getCluster().getId(), transform.getCluster().getId()); assertEquals(model.getAddress(), transform.getAddress()); assertEquals(model.getPort(), transform.getPort()); <START> assertEquals(model.getSsh(), transform.getSsh()); <END> assertEquals(model.getStorageManager().getPriority(), transform.getStorageManager().getPriority()); assertEquals(model.getDisplay().getAddress(), transform.getDisplay().getAddress()); }</code><technical_language>wrote equals() method for SSH object [1], compared reference, content, please compare fields instead. [1] write SSH auto-generated jaxb</technical_language>

Target:
protected void verify(Host model, Host transform) { assertNotNull(transform); assertEquals(model.getName(), transform.getName()); assertEquals(model.getId(), transform.getId()); assertNotNull(transform.getCluster()); assertEquals(model.getCluster().getId(), transform.getCluster().getId()); assertEquals(model.getAddress(), transform.getAddress()); assertEquals(model.getPort(), transform.getPort()); assertEquals(model.getSsh().getUser().getUserName(), transform.getSsh().getUser().getUserName()); assertEquals(model.getSsh().getUser().getPassword(), transform.getSsh().getUser().getPassword()); assertEquals(model.getSsh().getFingerprint(), transform.getSsh().getFingerprint()); assertEquals(model.getSsh().getPort(), transform.getSsh().getPort()); assertEquals(model.getStorageManager().getPriority(), transform.getStorageManager().getPriority()); assertEquals(model.getDisplay().getAddress(), transform.getDisplay().getAddress()); }
Source:
<code>default void inputDetail() { <START> optional(cluster()); <END> optional(clone()); optional(exclusive()); optional(template().name()); or(optional(storageDomain().id()), optional(storageDomain().name())); optional(vm().diskAttachments()[COLLECTION].id()); }</code><technical_language>be: or(optional(cluster().id()), optional(cluster().name()));</technical_language>

Target:
default void inputDetail() { or(optional(cluster().id()), optional(cluster().name())); optional(clone()); optional(exclusive()); optional(template().name()); or(optional(storageDomain().id()), optional(storageDomain().name())); optional(vm().diskAttachments()[COLLECTION].id()); }
Source:
<code><START> private void setTextAppearance(Context context, int data) { <END> titleText.setTextAppearance(context, data); }</code><technical_language>want add public getters setters for view attributes provide dynamic configuration behavior: <LINK_0> . setting a view's attribute, call invalidate() redraw view new attribute value</technical_language>

Target:
private void setTextAppearance(Context context, int data) { titleText.setTextAppearance(context, data); separatorText.setTextAppearance(context, data); titleText.setTextAppearance(context, data); editText.setTextAppearance(context, data); }
Source:
<code>public static <K> InternalTimeServiceManager<K> create( CheckpointableKeyedStateBackend<K> keyedStatedBackend, ClassLoader userClassloader, KeyContext keyContext, ProcessingTimeService processingTimeService, Iterable<KeyGroupStatePartitionStreamProvider> rawKeyedStates) { <START> if (!(keyedStatedBackend instanceof BatchExecutionKeyedStateBackend)) { <END> throw new IllegalStateException( "Batch execution specific time service can work only with BatchExecutionKeyedStateBackend"); } BatchExecutionInternalTimeServiceManager<K> timeServiceManager = new BatchExecutionInternalTimeServiceManager<>( processingTimeService ); keyedStatedBackend.registerKeySelectionListener(timeServiceManager); return timeServiceManager; }</code><technical_language>This a checkState right</technical_language>

Target:
public static <K> InternalTimeServiceManager<K> create( CheckpointableKeyedStateBackend<K> keyedStatedBackend, ClassLoader userClassloader, KeyContext keyContext, ProcessingTimeService processingTimeService, Iterable<KeyGroupStatePartitionStreamProvider> rawKeyedStates) { checkState( keyedStatedBackend instanceof BatchExecutionKeyedStateBackend, "Batch execution specific time service can work only with BatchExecutionKeyedStateBackend"); BatchExecutionInternalTimeServiceManager<K> timeServiceManager = new BatchExecutionInternalTimeServiceManager<>( processingTimeService ); keyedStatedBackend.registerKeySelectionListener(timeServiceManager); return timeServiceManager; }
Source:
<code>private static void verifyOutput(String expected, AuditEvent... events) { final TestByteArrayOutputStream out = new TestByteArrayOutputStream(); final XpathFileGeneratorAuditListener listener = new XpathFileGeneratorAuditListener(out, AutomaticBean.OutputStreamOptions.CLOSE); for (AuditEvent event : events) { listener.addError(event); } listener.auditFinished(null); <START> assertWithMessage("Output steam flush count") <END> .that(out.flushCount) .isEqualTo(TestUtil.adjustFlushCountForOutputStreamClose(1)); assertWithMessage("Output steam close count") .that(out.closeCount) .isEqualTo(1); final String actual = out.toString(); assertEquals("Invalid suppressions file content", expected, actual); }</code><technical_language>please share example of output if mismatch happen, I need role of this message in result message. curious .... if avoid it, convenience in junit</technical_language>

Target:
private static void verifyOutput(String expected, AuditEvent... events) { final TestByteArrayOutputStream out = new TestByteArrayOutputStream(); final XpathFileGeneratorAuditListener listener = new XpathFileGeneratorAuditListener(out, AutomaticBean.OutputStreamOptions.CLOSE); for (AuditEvent event : events) { listener.addError(event); } listener.auditFinished(null); assertWithMessage("Output stream flush count") .that(out.flushCount) .isEqualTo(TestUtil.adjustFlushCountForOutputStreamClose(1)); assertWithMessage("Output stream close count") .that(out.closeCount) .isEqualTo(1); final String actual = out.toString(); assertEquals("Invalid suppressions file content", expected, actual); }
Source:
<code>private Set<String> getDefaultOrigins() { <START> log.debug("getDefaultOrigins() called"); <END> List<VDS> allVds = vdsDao.getAll(getUserID(), getParameters().isFiltered()); Set<String> result = new HashSet<>(); for (VDS vds : allVds) { if (getParameters().getSuffixes().size() > 0) { for (String suffix : getParameters().getSuffixes()) { result.add(HTTPS + vds.getHostName() + suffix); } } else { result.add(HTTPS + vds.getHostName()); } } log.debug("Default list of origins refreshed to: {}" , StringUtils.join(result, ',')); return result; }</code><technical_language>This line add much, writing a debug line later</technical_language>

Target:
private Set<String> getDefaultOrigins() { List<VDS> allVds = vdsDao.getAll(getUserID(), getParameters().isFiltered()); Set<String> result = new HashSet<>(); for (VDS vds : allVds) { if (!getParameters().getSuffixes().isEmpty()) { for (String suffix : getParameters().getSuffixes()) { result.add(HTTPS + vds.getHostName() + suffix); } } else { result.add(HTTPS + vds.getHostName()); } } if (log.isDebugEnabled()) { log.debug("Default list of origins refreshed to: {}", StringUtils.join(result, ',')); } return result; }
Source:
<code>public void testRemoveJobGraph() throws Exception { final CompletableFuture<JobID> removeFuture = new CompletableFuture<>(); final TestingStateHandleStore<JobGraph> stateHandleStore = builder .setAddFunction((ignore, state) -> jobGraphStorageHelper.store(state)) .setRemoveFunction(name -> removeFuture.complete(JobID.fromHexString(name))) .build(); final JobGraphStore jobGraphStore = createAndStartJobGraphStore(stateHandleStore); <START> jobGraphStore.removeJobGraph(testingJobGraph.getJobID()); <END> jobGraphStore.putJobGraph(testingJobGraph); jobGraphStore.removeJobGraph(testingJobGraph.getJobID()); final JobID actual = removeFuture.get(timeout, TimeUnit.MILLISECONDS); assertThat(actual, is(testingJobGraph.getJobID())); }</code><technical_language>I is extra removal</technical_language>

Target:
public void testRemoveJobGraph() throws Exception { final CompletableFuture<JobID> removeFuture = new CompletableFuture<>(); final TestingStateHandleStore<JobGraph> stateHandleStore = builder .setAddFunction((ignore, state) -> jobGraphStorageHelper.store(state)) .setRemoveFunction(name -> removeFuture.complete(JobID.fromHexString(name))) .build(); final JobGraphStore jobGraphStore = createAndStartJobGraphStore(stateHandleStore); jobGraphStore.putJobGraph(testingJobGraph); jobGraphStore.removeJobGraph(testingJobGraph.getJobID()); final JobID actual = removeFuture.get(timeout, TimeUnit.MILLISECONDS); assertThat(actual, is(testingJobGraph.getJobID())); }
Source:
<code>public HttpResponse execute(HttpHost target, HttpRequest request, HttpContext context) throws IOException { final Lock readLock = rwLock.readLock(); readLock.lock(); if (tt != null) { <START> request.addHeader(TT_HEADER, tt); <END> } final HttpResponse resp; try { resp = this.httpClient.execute(target, request, context); } finally { readLock.unlock(); } return handleResponse(target, request, resp, context); }</code><technical_language>This try block (some future implementation throw)</technical_language>

Target:
public HttpResponse execute(HttpHost target, HttpRequest request, HttpContext context) throws IOException { final Lock readLock = rwLock.readLock(); readLock.lock(); final HttpResponse resp; try { if (tt != null) { notNull(request, "Request can't be null"); request.addHeader(TT_HEADER, tt); } resp = this.httpClient.execute(target, request, context); } finally { readLock.unlock(); } return handleResponse(target, request, resp, context); }
Source:
<code>protected boolean isPeerValid(AdminRow peerRow) { boolean hasPeersRpcAddress = peerRow.getInetAddress("rpc_address") != null; boolean hasPeersV2RpcAddress = peerRow.getInetAddress("native_address") != null && peerRow.getInteger("native_port") != null; boolean hasRpcAddress = hasPeersV2RpcAddress || hasPeersRpcAddress; boolean hasHostId = peerRow.getUuid("host_id") != null; <START> boolean hasSchemaVersion = peerRow.getUuid("schema_version") != null; <END> boolean valid = hasRpcAddress && hasHostId && hasSchemaVersion; if (!valid) { LOG.warn( "[{}] Found invalid row in for peer: {}. " + "This is likely a gossip or snitch issue, this node will be ignored.", logPrefix, getPeerTableName(), peerRow.getInetAddress("peer")); } return valid; }</code><technical_language>I in Jira ticket, extend check other columns null create issues line, chose a column (datacenter?). Also, this is enough fix generic problem duplicate keys in nodes map</technical_language>

Target:
protected boolean isPeerValid(AdminRow peerRow) { boolean hasPeersRpcAddress = !peerRow.isNull("rpc_address"); boolean hasPeersV2RpcAddress = !peerRow.isNull("native_address") && !peerRow.isNull("native_port"); boolean hasRpcAddress = hasPeersV2RpcAddress || hasPeersRpcAddress; boolean valid = hasRpcAddress && !peerRow.isNull("host_id") && !peerRow.isNull("data_center") && !peerRow.isNull("rack") && !peerRow.isNull("tokens"); if (!valid) { LOG.warn( "[{}] Found invalid row in for peer: {}. " + "This is likely a gossip or snitch issue, this node will be ignored.", logPrefix, getPeerTableName(), peerRow.getInetAddress("peer")); } return valid; }
Source:
<code>public ElasticsearchRecordCursor(List<ElasticsearchColumnHandle> columnHandles, ElasticsearchConnectorConfig config, ElasticsearchSplit split) { this.columnHandles = columnHandles; maxHits = config.getMaxHits(); tupleDomain = split.getTupleDomain(); jsonPathToIndex = new HashMap(); <START> totalBytes = 0; <END> for (int i = 0; i < columnHandles.size(); i++) { jsonPathToIndex.put(columnHandles.get(i).getColumnJsonPath(), i); } ElasticsearchQueryBuilder builder = new ElasticsearchQueryBuilder(columnHandles, config, split); lines = sendElasticQuery(builder).iterator(); }</code><technical_language>unnecessary</technical_language>

Target:
public ElasticsearchRecordCursor(List<ElasticsearchColumnHandle> columnHandles, ElasticsearchConnectorConfig config, ElasticsearchSplit split) { this.columnHandles = requireNonNull(columnHandles, "columnHandle is null"); this.maxHits = requireNonNull(config, "config is null").getMaxHits(); this.timeout = config.getRequestTimeout(); for (int i = 0; i < columnHandles.size(); i++) { jsonPathToIndex.put(columnHandles.get(i).getColumnJsonPath(), i); } this.builder = new ElasticsearchQueryBuilder(columnHandles, config, split); this.searchHits = sendElasticQuery(builder).iterator(); }
Source:
<code><START> private void testCreateInsertion(String insertion) throws Exception { <END> String url = "/ats/program/" + getSawProgram().getArtId() + "/insertion"; JsonArray array = postAndCheck(url, Entity.entity(insertion, MediaType.APPLICATION_JSON_TYPE)); Assert.assertEquals(1, array.size()); JsonObject obj = getObjectNamed("JAX Insertion", array); Assert.assertNotNull("Did not find value Jax Insertion", obj); }</code><technical_language>getUuid instead of getArtId,</technical_language>

Target:
private void testCreateInsertion(String insertion) throws Exception { String url = "/ats/program/" + getSawProgram().getUuid() + "/insertion"; JsonArray array = postAndCheck(url, Entity.entity(insertion, MediaType.APPLICATION_JSON_TYPE)); Assert.assertEquals(1, array.size()); JsonObject obj = getObjectNamed("JAX Insertion", array); Assert.assertNotNull("Did not find value Jax Insertion", obj); }
Source:
<code>public void testUnsupportedProtoExceptionMsg() throws IOException { exceptionRule.expect(IllegalStateException.class); <START> exceptionRule.expectMessage(UnsupportedProto.class.getName()); <END> ConnectionPool.newConnection(conf, TEST_NN_ADDRESS, TEST_USER1, UnsupportedProto.class); }</code><technical_language>put full string here? BTW, message exactly</technical_language>

Target:
public void testUnsupportedProtoExceptionMsg() throws Exception { LambdaTestUtils.intercept(IllegalStateException.class, "Unsupported protocol for connection to NameNode: " + TestConnectionManager.class.getName(), () -> ConnectionPool.newConnection(conf, TEST_NN_ADDRESS, TEST_USER1, TestConnectionManager.class)); }
Source:
<code>public Response getToolZip(@ApiParam(hidden = true) @Auth Optional<User> user, @ApiParam(value = "toolId", required = true) @PathParam("toolId") Long toolId, @ApiParam(value = "tagId", required = true) @PathParam("tagId") Long tagId) { Tool tool; if (user.isPresent()) { tool = toolDAO.findById(toolId); checkEntry(tool); checkUser(user.get(), tool); } else { tool = toolDAO.findPublishedById(toolId); checkEntry(tool); } Tag tag = tool.getTags().stream().filter(innertag -> innertag.getId() == tagId).findFirst().orElseThrow(() -> new CustomWebApplicationException("Could not find tag", HttpStatus.SC_NOT_FOUND)); Set<SourceFile> sourceFiles = tag.getSourceFiles(); if (sourceFiles == null || sourceFiles.size() == 0) { return null; } String fileName = tool.getToolPath().replaceAll("/", "-") + ".zip"; <START> File returnZipFile = downloadAsZip(sourceFiles, fileName); <END> return Response .ok(returnZipFile) .header("Content-Disposition", "attachment; filename=\"" + fileName + "\"") .build(); }</code><technical_language>This get deleted, it? Googled this: <LINK_0></technical_language>

Target:
public Response getToolZip(@ApiParam(hidden = true) @Auth Optional<User> user, @ApiParam(value = "toolId", required = true) @PathParam("toolId") Long toolId, @ApiParam(value = "tagId", required = true) @PathParam("tagId") Long tagId) { Tool tool; if (user.isPresent()) { tool = toolDAO.findById(toolId); checkEntry(tool); checkUser(user.get(), tool); } else { tool = toolDAO.findPublishedById(toolId); checkEntry(tool); } Tag tag = tool.getTags().stream().filter(innertag -> innertag.getId() == tagId).findFirst() .orElseThrow(() -> new CustomWebApplicationException("Could not find tag", HttpStatus.SC_NOT_FOUND)); Set<SourceFile> sourceFiles = tag.getSourceFiles(); if (sourceFiles == null || sourceFiles.size() == 0) { throw new CustomWebApplicationException("no files found to zip", HttpStatus.SC_NO_CONTENT); } String fileName = tool.getToolPath().replaceAll("/", "-") + ".zip"; return Response.ok().entity((StreamingOutput)output -> writeStreamAsZip(sourceFiles, output)) .header("Content-Disposition", "attachment; filename=\"" + fileName + "\"").build(); }
Source:
<code>public Response createNewPayment(@Auth String accountId, JsonNode requestPayload, @Context UriInfo uriInfo) throws IOException { logger.info("received create payment request: [ ]", requestPayload); Optional<List<String>> missingFields = checkMissingFields(requestPayload); if (missingFields.isPresent()) { return fieldsMissingResponse(logger, missingFields.get()); } <START> Response connectorResponse = client.target(connectorUrl + "/v1/api/charges") <END> .request() .post(buildChargeRequestPayload(accountId, requestPayload)); return responseFrom(uriInfo, connectorResponse, HttpStatus.SC_CREATED, (locationUrl, data) -> Response.created(locationUrl).entity(data), data -> badRequestResponse(logger, data)); }</code><technical_language>extracted "/v1/api/charges"</technical_language>

Target:
public Response createNewPayment(@Auth String accountId, JsonNode requestPayload, @Context UriInfo uriInfo) throws IOException { logger.info("received create payment request: [ ]", requestPayload); Optional<List<String>> missingFields = checkMissingFields(requestPayload); if (missingFields.isPresent()) { return fieldsMissingResponse(logger, missingFields.get()); } Response connectorResponse = client.target(connectorUrl + CONNECTOR_CHARGES_RESOURCE) .request() .post(buildChargeRequestPayload(accountId, requestPayload)); return responseFrom(uriInfo, connectorResponse, HttpStatus.SC_CREATED, (locationUrl, data) -> Response.created(locationUrl).entity(data), data -> badRequestResponse(logger, data)); }
Source:
<code>public RecordWriter<K, V> getRecordWriter(FileSystem ignored, JobConf job, String name, Progressable progress) throws IOException { <START> if (wrapped.realOutputFormat instanceof WorkFileOverride) { <END> ((WorkFileOverride) wrapped.realOutputFormat).setName(name); } return wrapped.getRecordWriter(ignored, job, name, progress); }</code><technical_language>do this DeprecatedFileOutputFormatWrapper</technical_language>

Target:
public RecordWriter<K, V> getRecordWriter(FileSystem ignored, JobConf job, String name, Progressable progress) throws IOException { return wrapped.getRecordWriter(ignored, job, name, progress); }
Source:
<code>public void standard() throws Exception { JsxStandardElementTree tree = parse("<foo> Hello my <bar>world</bar> ! </foo>", Kind.JSX_STANDARD_ELEMENT); assertThat(tree.is(Kind.JSX_STANDARD_ELEMENT)).isTrue(); assertThat(tree.openingElement().ltToken().text()).isEqualTo("<"); assertThat(tree.openingElement().gtToken().text()).isEqualTo(">"); assertThat(tree.openingElement().attributes()).isEmpty(); assertThat(expressionToString(tree.openingElement().elementName())).isEqualTo("foo"); assertThat(tree.closingElement().ltToken().text()).isEqualTo("<"); assertThat(tree.closingElement().gtToken().text()).isEqualTo(">"); assertThat(tree.closingElement().divToken().text()).isEqualTo("/"); assertThat(expressionToString(tree.closingElement().elementName())).isEqualTo("foo"); assertThat(tree.children()).hasSize(3); assertThat(tree.children().get(0).is(Kind.JSX_TEXT)).isTrue(); <START> assertThat(expressionToString(tree.children().get(0))).isEqualTo("Hello my"); <END> assertThat(tree.children().get(1).is(Kind.JSX_STANDARD_ELEMENT)).isTrue(); assertThat(tree.children().get(2).is(Kind.JSX_TEXT)).isTrue(); assertThat(expressionToString(tree.children().get(2))).isEqualTo("!"); }</code><technical_language>@vilchik-elena " " white spaces beginning end</technical_language>

Target:
public void standard() throws Exception { JsxStandardElementTree tree = parse("<foo> Hello my <bar>world</bar> ! </foo>", Kind.JSX_STANDARD_ELEMENT); assertThat(tree.is(Kind.JSX_STANDARD_ELEMENT)).isTrue(); assertThat(tree.openingElement().openAngleBracketToken().text()).isEqualTo("<"); assertThat(tree.openingElement().closeAngleBracketToken().text()).isEqualTo(">"); assertThat(tree.openingElement().attributes()).isEmpty(); assertThat(expressionToString(tree.openingElement().elementName())).isEqualTo("foo"); assertThat(tree.closingElement().openAngleBracketToken().text()).isEqualTo("<"); assertThat(tree.closingElement().closeAngleBracketToken().text()).isEqualTo(">"); assertThat(tree.closingElement().slashToken().text()).isEqualTo("/"); assertThat(expressionToString(tree.closingElement().elementName())).isEqualTo("foo"); assertThat(tree.children()).hasSize(3); assertThat(tree.children().get(0).is(Kind.JSX_TEXT)).isTrue(); assertThat(((JsxTextTree) tree.children().get(0)).token().text()).isEqualTo(" Hello my "); assertThat(tree.children().get(1).is(Kind.JSX_STANDARD_ELEMENT)).isTrue(); assertThat(tree.children().get(2).is(Kind.JSX_TEXT)).isTrue(); assertThat(expressionToString(tree.children().get(2))).isEqualTo("!"); }
Source:
<code>public static boolean shouldReplicate(ReplicationSpec replicationSpec, Table tableHandle, boolean isEventDump, HiveConf hiveConf) { if (replicationSpec == null) { replicationSpec = new ReplicationSpec(); } if (replicationSpec.isNoop() || tableHandle == null) { return false; } if (tableHandle.isNonNative() && !replicationSpec.isMetadataOnly()) { return false; } if (replicationSpec.isInReplicationScope()) { if (tableHandle.isTemporary()) { return false; } if (MetaStoreUtils.isExternalTable(tableHandle.getTTable())) { boolean shouldReplicateExternalTables = hiveConf.getBoolVar(HiveConf.ConfVars.REPL_INCLUDE_EXTERNAL_TABLES) || replicationSpec.isMetadataOnly(); if (isEventDump) { shouldReplicateExternalTables = shouldReplicateExternalTables && !hiveConf.getBoolVar(HiveConf.ConfVars.REPL_BOOTSTRAP_EXTERNAL_TABLES); } return shouldReplicateExternalTables; } if (AcidUtils.isTransactionalTable(tableHandle.getTTable())) { boolean shouldReplicateAcidTables = true; <START> if (hiveConf.getBoolVar(HiveConf.ConfVars.HIVE_IN_TEST_REPL)) { <END> shouldReplicateAcidTables = hiveConf.getBoolVar((HiveConf.ConfVars.REPL_DUMP_INCLUDE_ACID_TABLES)); } if (!shouldReplicateAcidTables) { return false; } if (isEventDump) { return !hiveConf.getBoolVar(HiveConf.ConfVars.REPL_BOOTSTRAP_ACID_TABLES); } } } return true; }</code><technical_language>Need check HIVE_IN_TEST_REPL anywhere. proper support of REPL_DUMP_INCLUDE_ACID_TABLES flag</technical_language>

Target:
public static boolean shouldReplicate(ReplicationSpec replicationSpec, Table tableHandle, boolean isEventDump, HiveConf hiveConf) { if (replicationSpec == null) { replicationSpec = new ReplicationSpec(); } if (replicationSpec.isNoop() || tableHandle == null) { return false; } if (tableHandle.isNonNative() && !replicationSpec.isMetadataOnly()) { return false; } if (replicationSpec.isInReplicationScope()) { if (tableHandle.isTemporary()) { return false; } if (MetaStoreUtils.isExternalTable(tableHandle.getTTable())) { boolean shouldReplicateExternalTables = hiveConf.getBoolVar(HiveConf.ConfVars.REPL_INCLUDE_EXTERNAL_TABLES) || replicationSpec.isMetadataOnly(); if (isEventDump) { shouldReplicateExternalTables = shouldReplicateExternalTables && !hiveConf.getBoolVar(HiveConf.ConfVars.REPL_BOOTSTRAP_EXTERNAL_TABLES); } return shouldReplicateExternalTables; } if (AcidUtils.isTransactionalTable(tableHandle.getTTable())) { if (!ReplUtils.includeAcidTableInDump(hiveConf)) { return false; } if (isEventDump) { return !hiveConf.getBoolVar(HiveConf.ConfVars.REPL_BOOTSTRAP_ACID_TABLES); } } } return true; }
Source:
<code>private int indexWarcRecord(WarcRecord warcRecord) throws IOException { if (!RESPONSE.equals(warcRecord.type())) return 0; String id = warcRecord.id(); org.jsoup.nodes.Document jDoc; try { jDoc = Jsoup.parse(warcRecord.content()); } catch (java.lang.IllegalArgumentException iae) { LOG.error("Parsing document with JSoup failed, skipping document : " + id, iae); System.err.println(id); return 1; } String contents = jDoc.text(); if (contents.trim().length() == 0) { System.err.println(id); return 1; } Document document = new Document(); document.add(new StringField(FIELD_ID, id, Field.Store.YES)); FieldType fieldType = new FieldType(); fieldType.setStored(true); fieldType.setStoreTermVectors(true); if (positions) { fieldType.setIndexOptions(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS); fieldType.setStoreTermVectorPositions(true); document.add(new Field(FIELD_BODY, contents, fieldType)); } else { fieldType.setIndexOptions(IndexOptions.DOCS_AND_FREQS); document.add(new Field(FIELD_BODY, contents, fieldType)); <START> } <END> writer.addDocument(document); return 1; }</code><technical_language>I get logic here. Previously, -positions -docvectors options. Here, storing term vectors? TermVectorsTextField</technical_language>

Target:
private int indexWarcRecord(WarcRecord warcRecord) throws IOException { if (!RESPONSE.equals(warcRecord.type())) return 0; String id = warcRecord.id(); org.jsoup.nodes.Document jDoc; try { jDoc = Jsoup.parse(warcRecord.content()); } catch (java.lang.IllegalArgumentException iae) { LOG.error("Parsing document with JSoup failed, skipping document : " + id, iae); System.err.println(id); return 1; } String contents = jDoc.text(); if (contents.trim().length() == 0) { System.err.println(id); return 1; } Document document = new Document(); document.add(new StringField(FIELD_ID, id, Field.Store.YES)); FieldType fieldType = new FieldType(); if (positions) { if (docVectors) { fieldType.setStoreTermVectors(true); fieldType.setIndexOptions(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS); fieldType.setStoreTermVectorPositions(true); document.add(new Field(FIELD_BODY, contents, fieldType)); } else { document.add(new TextField(FIELD_BODY, contents, Field.Store.NO)); } } else { if (docVectors) { fieldType.setIndexOptions(IndexOptions.DOCS_AND_FREQS); document.add(new Field(FIELD_BODY, contents, fieldType)); } else { document.add(new NoPositionsTextField(FIELD_BODY, contents)); } } writer.addDocument(document); return 1; }
Source:
<code>private void addPluginActionButtons(List<ActionButtonDefinition<?>> pluginActionButtonList) { if (getActionPanelPresenterWidget() != null) { for(ActionButtonDefinition<?> buttonDef: pluginActionButtonList) { int order = 0; if (buttonDef.getPriority() > 0) { order = (int) buttonDef.getPriority(); } <START> getActionPanelPresenterWidget().addActionButton((ActionButtonDefinition) buttonDef, order); <END> } } }</code><technical_language>suggest conversions/transforms close "source" (e.g. View code) minimize added complexity: getActionPanelPresenterWidget().addActionButton( (ActionButtonDefinition) buttonDef, buttonDef.getPriority()); TabOptions#getPriority, default (if provided UI plugin) integer max value. Also, buttonDef is of type ActionButtonDefinition I need typecast: getActionPanelPresenterWidget().addActionButton( buttonDef, buttonDef.getPriority()); buttonDef.getPriority resolved buttonDef itself, need parameter, simplifies code: getActionPanelPresenterWidget().addActionButton(buttonDef);</technical_language>

Target:
private void addPluginActionButtons(List<ActionButtonDefinition<?>> pluginActionButtonList) { if (getActionPanelPresenterWidget() != null) { for(ActionButtonDefinition<?> buttonDef: pluginActionButtonList) { if (buttonDef.getPriority() < 0) { buttonDef.setPriority(0); } getActionPanelPresenterWidget().addActionButton((ActionButtonDefinition) buttonDef); } } }
Source:
<code><START> public MachineSet all(Function<MachineSet, MachineSet> ...ops) { <END> return compose(ops).apply(getAllMachines()); }</code><technical_language>strange a Function a Predicate matching a criteria</technical_language>

Target:
public MachineSet all(Function<MachineSet, MachineSet> ...ops) { return compose(ops).apply(all()); }
Source:
<code>public IntegerCopyNumberTransitionMatrixCollection() { sexGenotypeAndContigToTransitionMatrixMap = new HashMap<>(); <START> maxCopyNumberInCollection = -1; <END> }</code><technical_language>a fan of this public constructor special meaning for maxCopyNumberInCollection = -1, allows this object constructed in a bad state. reason this class immutable</technical_language>

Target:
public IntegerCopyNumberTransitionMatrixCollection() { sexGenotypeAndContigToTransitionMatrixMap = new HashMap<>(); maxCopyNumberInCollection = MAX_COPY_NUMBER_IN_EMPTY_COLLECTION; }
Source:
<code>public void dcConfigChangePropagated() throws Exception { domainConfig.getSlaveConfiguration().setCachedDC(true); domainManager = DomainTestSupport.create(domainConfig); domainManager.start(); <START> domainManager.getDomainSlaveLifecycleUtil().awaitHostController(System.currentTimeMillis()); <END> domainManager.getDomainMasterLifecycleUtil() .executeForResult(getCreateOperationTestLoggingCategory()); domainManager.stop(); domainManager.getDomainSlaveLifecycleUtil().startAsync(); try (DomainClient client = getDomainClient(domainConfig.getSlaveConfiguration())) { waitForHostControllerBeingStarted(TIMEOUT_S, client); waitForServersBeingStarted(TIMEOUT_S, client); checkTestLoggerFromSlaveHost(client); } }</code><technical_language>domainManager.start() this, call DomainLifecycleUtil.start(). this working somehow</technical_language>

Target:
public void dcConfigChangePropagated() throws Exception { domainConfig.getSlaveConfiguration().setCachedDC(true); domainManager = DomainTestSupport.create(domainConfig); domainManager.start(); domainManager.getDomainMasterLifecycleUtil() .executeForResult(getCreateOperationTestLoggingCategory()); domainManager.stop(); domainManager.getDomainSlaveLifecycleUtil().startAsync(); try (DomainClient client = getDomainClient(domainConfig.getSlaveConfiguration())) { waitForHostControllerBeingStarted(TIMEOUT_S, client); waitForServersBeingStarted(TIMEOUT_S, client); checkTestLoggerFromSlaveHost(client); } }
Source:
<code>public DefaultTokenCacheStore(Context context) throws NoSuchAlgorithmException, NoSuchPaddingException { mContext = context; if (context != null) { mPrefs = mContext.getSharedPreferences(SHARED_PREFERENCE_NAME, Activity.MODE_PRIVATE); } else { throw new IllegalArgumentException("Context is null"); } <START> if (sHelper == null) { <END> Logger.v(TAG, "Started to initialize storage helper"); sHelper = new StorageHelper(context); Logger.v(TAG, "Finished to initialize storage helper"); } }</code><technical_language>Thread-safe</technical_language>

Target:
public DefaultTokenCacheStore(Context context) throws NoSuchAlgorithmException, NoSuchPaddingException { mContext = context; if (context != null) { mPrefs = mContext.getSharedPreferences(SHARED_PREFERENCE_NAME, Activity.MODE_PRIVATE); } else { throw new IllegalArgumentException("Context is null"); } synchronized (sLock) { if (sHelper == null) { Logger.v(TAG, "Started to initialize storage helper"); sHelper = new StorageHelper(context); Logger.v(TAG, "Finished to initialize storage helper"); } } }
Source:
<code><START> public boolean isFeaturedVideo() { return featuredVideo.isDisplayed(); } <END></code><technical_language>wait.forElementVisible()</technical_language>

Target:
public boolean isFeaturedVideo() { wait.forElementVisible(featuredVideo); return featuredVideo.isDisplayed(); }
Source:
<code>public void testDeltaWarning() { int distance = 1000000; ghStorage.edge(1, 2, distance, false); ghStorage.edge(2, 3, distance, false); ghStorage.edge(3, 4, distance, false); ghStorage.edge(4, 5, distance, false); ghStorage.edge(5, 6, distance, false); ghStorage.edge(6, 1, distance, false); ghStorage.edge(1, 7, distance, true); ghStorage.edge(7, 8, distance, true); ghStorage.edge(8, 9, distance, true); ghStorage.edge(6, 10, distance, true); ghStorage.edge(10, 11, distance, true); ghStorage.edge(11, 12, distance, true); LandmarkStorage storage = new LandmarkStorage(ghStorage, new RAMDirectory(), new FastestWeighting(encoder), 2); <START> storage.createLandmarks(); END> }</code><technical_language>assert :) logging statement checked automatically maxed out actual landmark nodeIDs</technical_language>

Target:
public void testDeltaWarning() { int distance = 1000000; ghStorage.edge(1, 2, distance, false); ghStorage.edge(2, 3, distance, false); ghStorage.edge(3, 4, distance, false); ghStorage.edge(4, 5, distance, false); ghStorage.edge(5, 6, distance, false); ghStorage.edge(6, 1, distance, false); ghStorage.edge(1, 7, distance, true); ghStorage.edge(7, 8, distance, true); ghStorage.edge(8, 9, distance, true); ghStorage.edge(6, 10, distance, true); ghStorage.edge(10, 11, distance, true); ghStorage.edge(11, 12, distance, true); LandmarkStorage storage = new LandmarkStorage(ghStorage, new RAMDirectory(), new FastestWeighting(encoder), 2); storage.createLandmarks(); assertEquals(12, storage.getLandmarks(1)[0]); assertEquals(9, storage.getLandmarks(1)[1]); assertEquals((int) Math.pow(2, 13) - 2, storage.getToWeight(0, 9) - storage.getFromWeight(0, 9)); assertEquals((int) -Math.pow(2, 13), storage.getToWeight(1, 12) - storage.getFromWeight(1, 12)); }
Source:
<code>void assertLockStream(BiConsumer<Cache<Object, Object>, CacheEntry<Object, Object>> consumer) throws Throwable { for (int i = 0; i < 10; i++) { cache.put(i, "value" + i); } CyclicBarrier barrier = new CyclicBarrier(2); int key = 4; LockedStream<Object, Object> stream = cache.getAdvancedCache().lockedStream(); Future<?> forEachFuture = fork(() -> stream.forEach((c, e) -> { if (e.getKey().equals(key)) { try { barrier.await(10, TimeUnit.SECONDS); consumer.accept(c, e); <START> barrier.await(10, TimeUnit.SECONDS); <END> } catch (InterruptedException | BrokenBarrierException | TimeoutException e1) { throw new RuntimeException(e1); } } })); barrier.await(10, TimeUnit.SECONDS); Future<Object> putFuture = fork(() -> cache.put(key, "value" + key + "-new")); Exceptions.expectException(TimeoutException.class, () -> putFuture.get(50, TimeUnit.MILLISECONDS)); barrier.await(10, TimeUnit.SECONDS); forEachFuture.get(10, TimeUnit.SECONDS); assertEquals("value" + key + "-other", putFuture.get(10, TimeUnit.SECONDS)); assertEquals("value" + key + "-new", cache.get(key)); LockManager lockManager = TestingUtil.extractComponent(cache, LockManager.class); assertEquals(0, lockManager.getNumberOfLocksHeld()); }</code><technical_language>check lock is held end of forEach lambda</technical_language>

Target:
void assertLockStream(BiConsumer<Cache<Object, Object>, CacheEntry<Object, Object>> consumer) throws Throwable { for (int i = 0; i < 10; i++) { cache.put(i, "value" + i); } CyclicBarrier barrier = new CyclicBarrier(2); int key = 4; LockedStream<Object, Object> stream = cache.getAdvancedCache().lockedStream(); Future<?> forEachFuture = fork(() -> stream.forEach((c, e) -> { Object innerKey = e.getKey(); if (innerKey.equals(key)) { try { barrier.await(10, TimeUnit.SECONDS); consumer.accept(c, e); InfinispanLock lock = TestingUtil.extractComponent(c, LockManager.class).getLock(innerKey); assertNotNull(lock); assertEquals(innerKey, lock.getLockOwner()); barrier.await(10, TimeUnit.SECONDS); } catch (InterruptedException | BrokenBarrierException | TimeoutException e1) { throw new RuntimeException(e1); } } })); barrier.await(10, TimeUnit.SECONDS); Future<Object> putFuture = fork(() -> cache.put(key, "value" + key + "-new")); Exceptions.expectException(TimeoutException.class, () -> putFuture.get(50, TimeUnit.MILLISECONDS)); barrier.await(10, TimeUnit.SECONDS); forEachFuture.get(10, TimeUnit.SECONDS); assertEquals("value" + key + "-other", putFuture.get(10, TimeUnit.SECONDS)); assertEquals("value" + key + "-new", cache.get(key)); LockManager lockManager = TestingUtil.extractComponent(cache, LockManager.class); assertEquals(0, lockManager.getNumberOfLocksHeld()); }
Source:
<code>public SamplesArguments(String[] args) { Options options = new Options(); Option input = new Option("d", DIGITALTWINS_URL, false, "DigitalTwins endpoint URL"); Option tenantId = new Option("t", TENANT_ID, false, "AAD Tenant Id"); Option clientId = new Option("c", CLIENT_ID, false, "AAD Client Id"); Option clientSecret = new Option("s", CLIENT_SECRET, false, "AAD Client Secret"); <START> input.setRequired(true); <END> tenantId.setRequired(true); clientId.setRequired(true); clientSecret.setRequired(true); options.addOption(input); options.addOption(tenantId); options.addOption(clientId); options.addOption(clientSecret); CommandLineParser parser = new DefaultParser(); HelpFormatter formatter = new HelpFormatter(); CommandLine cmd = null; try { cmd = parser.parse(options, args); } catch (ParseException e) { System.out.println(e.getMessage()); formatter.printHelp("java <sampleClass>.jar", options); System.exit(1); } this.digitalTwinUrl = cmd.getOptionValue(DIGITALTWINS_URL); this.tenantId = cmd.getOptionValue(TENANT_ID); this.clientId = cmd.getOptionValue(CLIENT_ID); this.clientSecret = cmd.getOptionValue(CLIENT_SECRET); }</code><technical_language>Ah, is set inline initialization? some annotation perhaps</technical_language>

Target:
public SamplesArguments(String[] args) { Option endpoint = new Option("d", DIGITALTWINS_URL, true, "DigitalTwins endpoint URL"); Option tenantId = new Option("t", TENANT_ID, true, "AAD Tenant Id"); Option clientId = new Option("c", CLIENT_ID, true, "AAD Client Id"); Option clientSecret = new Option("s", CLIENT_SECRET, true, "AAD Client Secret"); Option logLevel = new Option("l", LOG_DETAIL_LEVEL, true, "Http logging detail level \n 0 -> NONE \n 1 -> BASIC \n 2 -> HEADERS \n 3 -> BODY \n 4 -> BODY_AND_HEADERS"); endpoint.setRequired(true); tenantId.setRequired(true); clientId.setRequired(true); clientSecret.setRequired(true); logLevel.setRequired(false); Options options = new Options() .addOption(endpoint) .addOption(tenantId) .addOption(clientId) .addOption(clientSecret) .addOption(logLevel); CommandLineParser parser = new DefaultParser(); HelpFormatter formatter = new HelpFormatter(); CommandLine cmd = null; try { cmd = parser.parse(options, args); } catch (ParseException e) { System.out.println(e.getMessage()); formatter.printHelp("java <sampleClass>.jar", options); System.exit(1); } this.digitalTwinEndpoint = cmd.getOptionValue(DIGITALTWINS_URL); this.tenantId = cmd.getOptionValue(TENANT_ID); this.clientId = cmd.getOptionValue(CLIENT_ID); this.clientSecret = cmd.getOptionValue(CLIENT_SECRET); String inputLogLevel = cmd.getOptionValue(LOG_DETAIL_LEVEL); if (inputLogLevel != null && inputLogLevel.trim().length() > 0) { try { int providedLogDetailLevel = Integer.parseInt(inputLogLevel); this.httpLogDetailLevel = convertFromInt(providedLogDetailLevel); } catch (NumberFormatException e) { System.out.println("Provided log detail level must be an integer ranging from 0 - 4"); formatter.printHelp("java <sampleClass>.jar", options); System.exit(1); } } }
Source:
<code><START> public DatanodeInfo[] getCachedDatanodeReport(DatanodeReportType type) <END> throws IOException { try { DatanodeInfo[] dns = this.dnCache.get(type); if (dns == null) { LOG.debug("Get null DN report from cache"); dns = getCachedDatanodeReportImpl(type); this.dnCache.put(type, dns); } return dns; } catch (ExecutionException e) { LOG.error("Cannot get the DN report for {}", type, e); Throwable cause = e.getCause(); if (cause instanceof IOException) { throw (IOException) cause; } else { throw new IOException(cause); } } }</code><technical_language>nit: this package-private</technical_language>

Target:
DatanodeInfo[] getCachedDatanodeReport(DatanodeReportType type) throws IOException { try { DatanodeInfo[] dns = this.dnCache.get(type); if (dns == null) { LOG.debug("Get null DN report from cache"); dns = getCachedDatanodeReportImpl(type); this.dnCache.put(type, dns); } return dns; } catch (ExecutionException e) { LOG.error("Cannot get the DN report for {}", type, e); Throwable cause = e.getCause(); if (cause instanceof IOException) { throw (IOException) cause; } else { throw new IOException(cause); } } }
Source:
<code>public static double getLivingVisibility(LivingEntity living, @Nullable Entity lookingEntity, double visibility) { LivingVisibilityEvent event = new LivingVisibilityEvent(living, lookingEntity, visibility); MinecraftForge.EVENT_BUS.post(event); double value = event.getVisibility(); if(living instanceof PlayerEntity) { <START> value = getPlayerVisibilityDistance((PlayerEntity)living, value, visibility); <END> } return value; }</code><technical_language>I legacy event fired first, new event overwrite legacy result</technical_language>

Target:
public static double getLivingVisibility(LivingEntity living, @Nullable Entity lookingEntity, double visibility) { double value = visibility; if(living instanceof PlayerEntity) { value = getPlayerVisibilityDistance((PlayerEntity)living, visibility, visibility); } LivingVisibilityEvent event = new LivingVisibilityEvent(living, lookingEntity, value); MinecraftForge.EVENT_BUS.post(event); return event.getVisibility(); }
Source:
<code>public void checkMainFeaturesPhpLS() { <START> consoles.waitExpectedTextIntoConsole( <END> "Initialized language server 'org.eclipse.che.plugin.php.languageserver"); checkCodeValidation(); checkAutocompletion(); checkCodeAssistant(); checkGoToDefinition(); }</code><technical_language>odd a constant in other tests, here. If fixing this line anyway, other tests</technical_language>

Target:
public void checkMainFeaturesPhpLS() { consoles.waitExpectedTextIntoConsole(INITIALIZE_LANG_SERVER_MESSAGE); checkCodeValidation(); checkAutocompletion(); checkCodeAssistant(); checkGoToDefinition(); }
Source:
<code>public Option<T> filter(Predicate<? super T> predicate) { T v = get(); <START> return Option.when(predicate.test(v), () -> v); <END> }</code><technical_language>#1272</technical_language>

Target:
public Option<T> filter(Predicate<? super T> predicate) { T v = get(); return predicate.test(v) ? Option.some(v) : Option.none(); }
Source:
<code>public HashCode buildHashCode() { final List<HashCode> hashes = Lists.newArrayListWithCapacity(3); hashes.add(super.buildHashCode()); Hasher hasher = Const.HASH_FUNCTION().newHasher(); hasher.putBoolean(counter) <START> .putBoolean(drop_resets) <END> .putBoolean(delta_only) .putLong(counter_max) .putLong(reset_value) .putString(interval, Const.UTF8_CHARSET); if (id !=null) { hasher.putString(id, Const.UTF8_CHARSET); } hashes.add(hasher.hash()); return Hashing.combineOrdered(hashes); }</code><technical_language>another field need added, :)</technical_language>

Target:
public HashCode buildHashCode() { final List<HashCode> hashes = Lists.newArrayListWithCapacity(3); hashes.add(super.buildHashCode()); Hasher hasher = Const.HASH_FUNCTION().newHasher(); hasher.putBoolean(counter) .putBoolean(drop_resets) .putBoolean(delta_only) .putLong(counter_max) .putLong(reset_value) .putString(interval, Const.UTF8_CHARSET) .putBoolean(rate_to_count); if (id !=null) { hasher.putString(id, Const.UTF8_CHARSET); } hashes.add(hasher.hash()); return Hashing.combineOrdered(hashes); }
Source:
<code>public void run() { IJobManager manager = Job.getJobManager(); try { manager.beginRule(rule, getEventLoopMonitor()); context.run(false, false, runnable); } catch (InvocationTargetException | InterruptedException e) { status = new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, e.getMessage(), e); <START> } catch (OperationCanceledException e) { <END> status = new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, e.getMessage(), e); } finally { manager.endRule(rule); } }</code><technical_language>Missed</technical_language>

Target:
public void run() { IJobManager manager = Job.getJobManager(); try { manager.beginRule(rule, getEventLoopMonitor()); context.run(false, false, runnable); } catch (InvocationTargetException | InterruptedException | OperationCanceledException e) { status = new Status(IStatus.ERROR, PlatformUI.PLUGIN_ID, e.getMessage(), e); } finally { manager.endRule(rule); } }
Source:
<code><START> public final static void writeInt(BytesRef dst, int i) { <END> dst.bytes[dst.offset++] = ((byte) (i >> 24)); dst.bytes[dst.offset++] = ((byte) (i >> 16)); dst.bytes[dst.offset++] = ((byte) (i >> 8)); dst.bytes[dst.offset++] = ((byte) i); }</code><technical_language>I times this is called, revert previous writeInt add dst.offset += 4; end</technical_language>

Target:
public final static void writeInt(BytesRef dst, int i) { dst.bytes[dst.offset] = ((byte) (i >> 24)); dst.bytes[dst.offset + 1] = ((byte) (i >> 16)); dst.bytes[dst.offset + 2] = ((byte) (i >> 8)); dst.bytes[dst.offset + 3] = ((byte) i); dst.offset += 4; }