auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void testBufferOverflow() throws MetacardCreationException { String metacardTypeName = "states"; Set<AttributeDescriptor> attributeDescriptors = new HashSet<>(1); String attributeName = Metacard.METADATA; attributeDescriptors.add(new CoreAttributes().getAttributeDescriptor(attributeName)); StringBuilder mockValue = new StringBuilder(); mockValue.append("<?xml version=\"1.1\" encoding=\"UTF-32\"?><metadata></metadata>"); Attribute mockAttribute = new AttributeImpl(Metacard.METADATA, mockValue.toString()); Metacard mockMetacard = mock(Metacard.class, RETURNS_DEEP_STUBS); when(mockMetacard.getMetacardType().getName()).thenReturn(metacardTypeName); when(mockMetacard.getMetacardType().getAttributeDescriptors()).thenReturn(attributeDescriptors); when(mockMetacard.getAttribute(attributeName)).thenReturn(mockAttribute); when(mockMetacard.getMetadata()).thenReturn(mockValue.toString()); SolrInputDocument mockSolrInputDocument = mock(SolrInputDocument.class); DynamicSchemaResolver resolver = new DynamicSchemaResolver() { @Override protected byte[] createTinyBinary(String xml) throws XMLStreamException, SaxonApiException, IOException { throw new BufferOverflowException(); } }; resolver.addFields(mockMetacard, mockSolrInputDocument); <START> <END> }</code><technical_language>verify mock metacard's getId() method is invoked once</technical_language>

Target:
public void testBufferOverflow() throws MetacardCreationException { String metacardTypeName = "states"; Set<AttributeDescriptor> attributeDescriptors = new HashSet<>(1); String attributeName = Metacard.METADATA; attributeDescriptors.add(new CoreAttributes().getAttributeDescriptor(attributeName)); StringBuilder mockValue = new StringBuilder(); mockValue.append("<?xml version=\"1.1\" encoding=\"UTF-32\"?><metadata></metadata>"); Attribute mockAttribute = new AttributeImpl(Metacard.METADATA, mockValue.toString()); Metacard mockMetacard = mock(Metacard.class, RETURNS_DEEP_STUBS); when(mockMetacard.getMetacardType().getName()).thenReturn(metacardTypeName); when(mockMetacard.getMetacardType().getAttributeDescriptors()).thenReturn(attributeDescriptors); when(mockMetacard.getAttribute(attributeName)).thenReturn(mockAttribute); when(mockMetacard.getMetadata()).thenReturn(mockValue.toString()); SolrInputDocument mockSolrInputDocument = mock(SolrInputDocument.class); DynamicSchemaResolver resolver = new DynamicSchemaResolver( Collections.EMPTY_LIST, tinyTree -> { throw new BufferOverflowException(); }); resolver.addFields(mockMetacard, mockSolrInputDocument); verify(mockMetacard).getId(); verify(mockSolrInputDocument) .addField(eq(SchemaFields.METACARD_TYPE_OBJECT_FIELD_NAME), Matchers.any()); verify(mockSolrInputDocument, times(0)).addField(eq("lux_xml"), Matchers.any()); }
Source:
<code>public Object execute(Object[] parameters) { KeyValueQuery<?> query = prepareQuery(parameters); if (this.isCount) { final Class<?> javaType = queryMethod.getEntityInformation().getJavaType(); if( this.isDistinct ){ <START> Iterable<?> iterable = this.keyValueOperations.find(query, javaType); final List<?> list = IterableConverter.toList(iterable); List<?> result = collectDistinct(list); return result.size(); <END> } else{ return this.keyValueOperations.count(query, javaType); } } if (this.isDelete) { return this.executeDeleteQuery(query, queryMethod); } if (queryMethod.isPageQuery() || queryMethod.isSliceQuery()) { return this.executePageSliceQuery(parameters, query, queryMethod); } if (queryMethod.isCollectionQuery() || queryMethod.isQueryForEntity() || queryMethod.isStreamQuery()) { return this.executeFindQuery(query, queryMethod, this.isDistinct); } String message = String.format("Query method '%s' not supported.", queryMethod.getName()); throw new UnsupportedOperationException(message); }</code><technical_language>intermediate conversions extra cost need minimize possible. So, get Iterable keyValueOperations.find(query, javaType), convert Stream, call distinct() it, obtain number of elements count()</technical_language>

Target:
public Object execute(Object[] parameters) { KeyValueQuery<?> query = prepareQuery(parameters); if (this.isCount) { final Class<?> javaType = queryMethod.getEntityInformation().getJavaType(); if (this.isDistinct) { final Iterable<?> iterable = this.keyValueOperations.find(query, javaType); return StreamUtils.createStreamFromIterator(iterable.iterator()).distinct().count(); } else { return this.keyValueOperations.count(query, javaType); } } if (this.isDelete) { return this.executeDeleteQuery(query, queryMethod); } if (queryMethod.isPageQuery() || queryMethod.isSliceQuery()) { return this.executePageSliceQuery(parameters, query, queryMethod); } if (queryMethod.isCollectionQuery() || queryMethod.isQueryForEntity() || queryMethod.isStreamQuery()) { return this.executeFindQuery(query, queryMethod, this.isDistinct); } String message = String.format("Query method '%s' not supported.", queryMethod.getName()); throw new UnsupportedOperationException(message); }
Source:
<code>private void invite(final Bout bout, final StringBuilder msg, final Href href) throws IOException { final Iterator<String> invite = href.param("invite").iterator(); while (invite.hasNext()) { final String friend = invite.next(); try { bout.friends().invite(friend); } catch (final Friends.UnknownAliasException ex) { this.discard(bout); throw new RsFailure(ex); } <START> msg.append(String.format(", \"%s\" invited", friend)); <END> } }</code><technical_language>@dmzaytsev this message appended if invite succeeded, think</technical_language>

Target:
private void invite(final Bout bout, final StringBuilder msg, final Href href) throws IOException { final Iterator<String> invite = href.param("invite").iterator(); while (invite.hasNext()) { final String friend = invite.next(); try { bout.friends().invite(friend); msg.append( String.format(", the invitation sent to \"%s\"", friend) ); } catch (final Friends.UnknownAliasException ex) { this.discard(bout); throw new RsFailure(ex); } } }
Source:
<code>private Map<PaxosAcceptor, ExecutorService> createLatestRoundVerifierExecutors( List<PaxosAcceptor> paxosAcceptors, Function<String, ExecutorService> executorServiceFactory) { Map<PaxosAcceptor, ExecutorService> executors = Maps.newHashMap(); for (int i = 0; i < paxosAcceptors.size(); i++) { <START> executors.put(paxosAcceptors.get(i), executorServiceFactory.apply("lates-round-verifier-" + i)); <END> } return executors; }</code><technical_language>pretty nice for PaxosAcceptor PaxosLearner uuid's similar PingableLeader</technical_language>

Target:
private Map<PaxosAcceptor, ExecutorService> createLatestRoundVerifierExecutors( List<PaxosAcceptor> paxosAcceptors, Function<String, ExecutorService> executorServiceFactory) { Map<PaxosAcceptor, ExecutorService> executors = Maps.newHashMap(); for (int i = 0; i < paxosAcceptors.size(); i++) { executors.put(paxosAcceptors.get(i), executorServiceFactory.apply("latest-round-verifier-" + i)); } return executors; }
Source:
<code>private StudentProfileAttributes getProfileAttributesFrom( String[] submissionParams) { StudentProfileAttributes spa = StudentProfileAttributes.builder().build(); spa.shortName = StringHelper.trimIfNotNull(submissionParams[1]); spa.email = StringHelper.trimIfNotNull(submissionParams[3]); spa.institute = StringHelper.trimIfNotNull(submissionParams[5]); spa.nationality = StringHelper.trimIfNotNull(submissionParams[7]); try { spa.gender = GenderType.valueOf(submissionParams[9]); } catch (IllegalArgumentException iae) { <START> iae.printStackTrace(); <END> } spa.moreInfo = StringHelper.trimIfNotNull(submissionParams[11]); spa.modifiedDate = null; return spa; }</code><technical_language>Remove try catch too</technical_language>

Target:
private StudentProfileAttributes getProfileAttributesFrom( String[] submissionParams) { StudentProfileAttributes spa = StudentProfileAttributes.builder().build(); spa.shortName = StringHelper.trimIfNotNull(submissionParams[1]); spa.email = StringHelper.trimIfNotNull(submissionParams[3]); spa.institute = StringHelper.trimIfNotNull(submissionParams[5]); spa.nationality = StringHelper.trimIfNotNull(submissionParams[7]); spa.gender = GenderType.valueOf(submissionParams[9]); spa.moreInfo = StringHelper.trimIfNotNull(submissionParams[11]); spa.modifiedDate = null; return spa; }
Source:
<code>public default Number getReadable() { <START> return 1; <END> }</code><technical_language>Magic number</technical_language>

Target:
public default Number getReadable() { throw new UnsupportedOperationException(); }
Source:
<code>public void testKafkaSourceAndSink() throws Exception { final String stringToPost = "Hi there!"; final HttpSource httpSource1 = newHttpSource(); final HttpSource httpSource2 = newHttpSource(); stream().create(generateStreamName(), "%s | kafka --topic='%s' --brokerList='%s'", httpSource1, topic1ToUse, kafkaTestSupport.getBrokerAddress()); stream().create(generateStreamName(), "%s | kafka --topic='%s' --brokerList='%s'", httpSource2, topic2ToUse, kafkaTestSupport.getBrokerAddress()); final CounterSink counter = metrics().newCounterSink(); stream().create(generateStreamName(), "kafka --topics='%s,%s' --zkconnect=%s --outputType=text/plain | " + "filter --expression=payload.toString().contains('%s') | %s", topic1ToUse, topic2ToUse, kafkaTestSupport.getZkConnectString(), stringToPost, counter ); httpSource1.ensureReady().postData(stringToPost); <START> httpSource1.ensureReady().postData(stringToPost); <END> assertThat(counter, eventually(exists())); assertThat(counter, eventually(hasValue("2"))); }</code><technical_language>test posts data http source - httpSource2 instead</technical_language>

Target:
public void testKafkaSourceAndSink() throws Exception { final String stringToPost = "Hi there!"; final HttpSource httpSource = newHttpSource(); stream().create(generateStreamName(), "%s | kafka --topic='%s' --brokerList='%s'", httpSource, topic1ToUse, kafkaTestSupport.getBrokerAddress()); final CounterSink counter = metrics().newCounterSink(); stream().create(generateStreamName(), "kafka --topic='%s' --zkconnect=%s --outputType=text/plain | " + "filter --expression=payload.toString().contains('%s') | %s", topic1ToUse, kafkaTestSupport.getZkConnectString(), stringToPost, counter ); httpSource.ensureReady().postData(stringToPost); assertThat(counter, eventually(exists())); }
Source:
<code>private ShardStats deleteShardsAndIndex(long tableId, Map<UUID, Optional<UUID>> oldShardUuidsMap, Set<UUID> oldDeltaUuidSet, Handle handle, boolean tableSupportsDeltaDelete) throws SQLException { if (tableSupportsDeltaDelete) { ShardStats shardStats = deleteShardsAndIndexWithDelta(tableId, oldShardUuidsMap, handle); long rowCount = shardStats.getRowCount(); long compressedSize = shardStats.getCompressedSize(); long uncompressedSize = shardStats.getUncompressedSize(); ShardStats deltaStats = deleteShardsAndIndexSimple(tableId, oldDeltaUuidSet, handle, true); rowCount -= deltaStats.getRowCount(); compressedSize += deltaStats.getCompressedSize(); uncompressedSize += deltaStats.getUncompressedSize(); return new ShardStats(rowCount, compressedSize, uncompressedSize); } else { Set<UUID> oldShardUuidSet = oldShardUuidsMap.keySet(); <START> ShardStats stats = deleteShardsAndIndexSimple(tableId, oldShardUuidSet, handle, false); <END> return stats; } }</code><technical_language>return</technical_language>

Target:
private ShardStats deleteShardsAndIndex(long tableId, Map<UUID, Optional<UUID>> oldShardUuidsMap, Set<UUID> oldDeltaUuidSet, Handle handle, boolean tableSupportsDeltaDelete) throws SQLException { if (tableSupportsDeltaDelete) { ShardStats shardStats = deleteShardsAndIndexWithDelta(tableId, oldShardUuidsMap, handle); long rowCount = shardStats.getRowCount(); long compressedSize = shardStats.getCompressedSize(); long uncompressedSize = shardStats.getUncompressedSize(); ShardStats deltaStats = deleteShardsAndIndexSimple(tableId, oldDeltaUuidSet, handle, true); rowCount -= deltaStats.getRowCount(); compressedSize += deltaStats.getCompressedSize(); uncompressedSize += deltaStats.getUncompressedSize(); return new ShardStats(rowCount, compressedSize, uncompressedSize); } return deleteShardsAndIndexSimple(tableId, oldShardUuidsMap.keySet(), handle, false); }
Source:
<code>protected Log getImplementation(final String name) { final Log log = LogFactory.getLog(name); <START> if (log.getClass().getName().endsWith("Jdk14Logger")) { <END> return null; } return log; }</code><technical_language>lax imho, .equals("org.apache.commons.logging.impl.Jdk14Logger")</technical_language>

Target:
protected Log getImplementation(final String name) { final Log log = LogFactory.getLog(name); if (log != null && log.getClass().getName().equals("org.apache.commons.logging.impl.Jdk14Logger")) { return null; } return log; }
Source:
<code>CreditBasedSequenceNumberingViewReader( InputChannelID receiverId, int initialCredit, PartitionRequestQueue requestQueue) { this.receiverId = receiverId; this.numCreditsAvailable = initialCredit; this.requestQueue = requestQueue; <START> this.withoutExclusiveCredits = initialCredit > 0; <END> }</code><technical_language>initialCredit == 0</technical_language>

Target:
CreditBasedSequenceNumberingViewReader( InputChannelID receiverId, int initialCredit, PartitionRequestQueue requestQueue) { this.receiverId = receiverId; this.numCreditsAvailable = initialCredit; this.requestQueue = requestQueue; this.withoutExclusiveCredits = initialCredit == 0; }
Source:
<code>public CompletionStage<Void> passivateAsync(InternalCacheEntry entry) { Object key; if (enabled && entry != null && !isL1Key(key = entry.getKey())) { if (notifier.hasListener(CacheEntryPassivated.class)) { <START> return passivateListener(key, entry); <END> } else { passivate(key, entry); } } return CompletableFutures.completedNull(); }</code><technical_language>IMO clearer if inline passivateListener</technical_language>

Target:
public CompletionStage<Void> passivateAsync(InternalCacheEntry entry) { Object key; if (enabled && entry != null && !isL1Key(key = entry.getKey())) { if (notifier.hasListener(CacheEntryPassivated.class)) { return notifier.notifyCacheEntryPassivated(key, entry.getValue(), true, ImmutableContext.INSTANCE, null) .thenCompose(v -> { if (doPassivate(key, entry)) { return notifier.notifyCacheEntryPassivated(key, null, false, ImmutableContext.INSTANCE, null); } return CompletableFutures.completedNull(); }); } else { doPassivate(key, entry); } } return CompletableFutures.completedNull(); }
Source:
<code>public void testTransactionMetadataCleanup() throws Exception { try (DistributedQueryRunner queryRunner = TpchQueryRunnerBuilder.builder().build()) { queryRunner.execute("select count(*) from nation"); queryRunner.execute("select count(*) from lineitem"); assertTrue(queryRunner.getTransactionManager().getAllTransactionInfos().isEmpty()); <START> assertThatThrownBy(() -> queryRunner.execute("SELECT non_existing_column FROM non_existing_table")) <END> .isInstanceOf(RuntimeException.class); assertThatThrownBy(() -> queryRunner.execute("select * from unnest('wrong_type')")) .isInstanceOf(RuntimeException.class); assertThatThrownBy(() -> queryRunner.execute("select count(*) from nation tablesample BERNOULLI ('wrong_value')")) .isInstanceOf(RuntimeException.class); assertThatThrownBy(() -> queryRunner.execute("select regionkey from nation natural join region")) .isInstanceOf(RuntimeException.class); assertThatThrownBy(() -> queryRunner.execute("select regionkey from nation group by regionkey having 'wrong_condition'")) .isInstanceOf(RuntimeException.class); assertTrue(queryRunner.getTransactionManager().getAllTransactionInfos().isEmpty()); } }</code><technical_language>If i understand correctly, failures happening analysis phase. I is enough 1-2 analysis failure cases, add failure case in execution (for example division zero)</technical_language>

Target:
public void testTransactionMetadataCleanup() throws Exception { try (DistributedQueryRunner queryRunner = TpchQueryRunnerBuilder.builder().build()) { queryRunner.execute("select count(*) from nation"); queryRunner.execute("select count(*) from lineitem"); assertTrue(queryRunner.getTransactionManager().getAllTransactionInfos().isEmpty()); assertThatThrownBy(() -> queryRunner.execute("SELECT non_existing_column FROM non_existing_table")) .isInstanceOf(RuntimeException.class); assertThatThrownBy(() -> queryRunner.execute("select * from unnest('wrong_type')")) .isInstanceOf(RuntimeException.class); assertThatThrownBy(() -> queryRunner.execute("select regionkey from nation group by regionkey having 'wrong_condition'")) .isInstanceOf(RuntimeException.class); assertTrue(queryRunner.getTransactionManager().getAllTransactionInfos().isEmpty()); assertThatThrownBy(() -> queryRunner.execute("select 1/0")) .isInstanceOf(RuntimeException.class); assertThatThrownBy(() -> queryRunner.execute("select regionkey / (regionkey - regionkey) from nation")) .isInstanceOf(RuntimeException.class); assertTrue(queryRunner.getTransactionManager().getAllTransactionInfos().isEmpty()); } }
Source:
<code>private void generateActionMethod(Method method) { javaBuffer.addImport(Consumes.class); javaBuffer.addImport(POST.class); javaBuffer.addImport(Path.class); javaBuffer.addImport(Response.class); javaBuffer.addImport(javaPackages.getXjcPackageName(), "Action"); javaBuffer.addImport(javaPackages.getXjcPackageName(), "Actionable"); generateDoc(method); javaBuffer.addLine("@POST"); javaBuffer.addLine("@Consumes({ %s })", generateMediaTypes()); javaBuffer.addLine("@Actionable"); javaBuffer.addLine( "@Path(\"%s\")", jaxrsNames.getActionPath(method.getName()) ); javaBuffer.addLine(generateResponseReturnMethodSignature( <START> <END> jaxrsNames.getMethodName(method.getName()) + "(Action action)")); javaBuffer.addLine(); }</code><technical_language>Same, 4 spaces</technical_language>

Target:
private void generateActionMethod(Method method) { javaBuffer.addImport(Consumes.class); javaBuffer.addImport(POST.class); javaBuffer.addImport(Path.class); javaBuffer.addImport(Response.class); javaBuffer.addImport(javaPackages.getXjcPackageName(), "Action"); javaBuffer.addImport(javaPackages.getXjcPackageName(), "Actionable"); generateDoc(method); javaBuffer.addLine("@POST"); javaBuffer.addLine("@Consumes({ %s })", generateMediaTypes()); javaBuffer.addLine("@Actionable"); javaBuffer.addLine( "@Path(\"%s\")", jaxrsNames.getActionPath(method.getName()) ); generateResponseReturnMethod(jaxrsNames.getMethodName(method.getName()) + "(Action action)"); javaBuffer.addLine(); }
Source:
<code>private void saveColumnFamilyNames() throws IOException { final Path file = rocksdbDir.resolve(CF_NAMES_FILENAME); <START> try(final PrintWriter writer = new PrintWriter(new OutputStreamWriter(Files.newOutputStream(file), UTF_8))) { <END> writer.println(new String(RocksDB.DEFAULT_COLUMN_FAMILY, UTF_8)); for(final String cfName : COLUMN_FAMILIES.keySet()) { writer.println(cfName); } } }</code><technical_language>instead of new OutputStreamWriter(Files.newOutputStream(file), UTF_8) Files.newBufferedWriter(file, UTF_8)</technical_language>

Target:
private void saveColumnFamilyNames() throws IOException { final Path file = rocksDbDir.resolve(COLUMN_FAMILY_NAMES_FILENAME); try(final PrintWriter writer = new PrintWriter(Files.newBufferedWriter(file, UTF_8))) { writer.println(new String(RocksDB.DEFAULT_COLUMN_FAMILY, UTF_8)); for(final String cfName : COLUMN_FAMILIES.keySet()) { writer.println(cfName); } } }
Source:
<code>private void init(String serviceName, String host, Integer port) { this.serviceName = serviceName; if (host != null && host.contains(":")) { <START> final String[] hostParts = host.split(":"); <END> int parsedPort = -1; try { parsedPort = Integer.parseInt(hostParts[1]); } catch (NumberFormatException e) { } if (port != null && port != parsedPort) { throw new IAE("Conflicting host:port [%s] and port [%d] settings", host, port); } host = hostParts[0]; port = parsedPort; } if (port == null && host != null) { port = SocketUtil.findOpenPort(8080); } this.port = port != null ? port : -1; this.host = host != null ? host : DEFAULT_HOST; }</code><technical_language>This break for IPv6 addresses</technical_language>

Target:
private void init(String serviceName, String host, Integer port) { Preconditions.checkNotNull(serviceName); this.serviceName = serviceName; if(host == null && port == null) { host = DEFAULT_HOST; port = -1; } else { final HostAndPort hostAndPort; if (host != null) { hostAndPort = HostAndPort.fromString(host); if (port != null && hostAndPort.hasPort() && port != hostAndPort.getPort()) { throw new IAE("Conflicting host:port [%s] and port [%d] settings", host, port); } } else { hostAndPort = HostAndPort.fromParts(DEFAULT_HOST, port); } host = hostAndPort.getHostText(); if (hostAndPort.hasPort()) { port = hostAndPort.getPort(); } if (port == null) { port = SocketUtil.findOpenPort(8080); } } this.port = port; this.host = host; }
Source:
<code>private void showConnectedDevices() { UsbManager manager = (UsbManager) getSystemService(Context.USB_SERVICE); HashMap<String, UsbDevice> devices = manager.getDeviceList(); StringBuilder builder = new StringBuilder(); if (devices.isEmpty()) { builder.append(getString(R.string.no_connected_devices)); } else { for (UsbDevice device : devices.values()) { builder.append( getString(R.string.usb_device_name_vendor_product, device.getDeviceName(), device.getVendorId(), device.getProductId() ) ); <START> } <END> } Toaster.newInstance(this).popBurntToast(builder.toString()); }</code><technical_language>separator devices</technical_language>

Target:
private void showConnectedDevices() { UsbManager manager = (UsbManager) getSystemService(Context.USB_SERVICE); HashMap<String, UsbDevice> devices = manager.getDeviceList(); StringBuilder builder = new StringBuilder(); if (devices.isEmpty()) { builder.append(getString(R.string.no_connected_devices)); } else { for (UsbDevice device : devices.values()) { builder.append( getString(R.string.usb_device_name_vendor_product, device.getDeviceName(), device.getVendorId(), device.getProductId() ) ).append("\n"); } } Toaster.newInstance(this).popBurntToast(builder.toString()); }
Source:
<code>public void should_not_lookup_abuseC_if_rpsl_source_do_not_match() { <START> databaseHelper.updateObject(RpslObject.parse( "inetnum: 173.0.0.0 - 173.255.255.255\n" + <END> "org: ORG-TEST-1\n" + "netname: NN\n" + "status: OTHER\n" + "source: RIPE")); final String responseNoAbuseC = TelnetWhoisClient.queryLocalhost(QueryServer.port, "173.0.0.0"); assertFalse(responseNoAbuseC.contains("Abuse contact for '173.0.0.0 - 173.255.255.255' is 'abuse@ripe.net'")); databaseHelper.updateObject(RpslObject.parse( "inetnum: 173.0.0.0 - 173.255.255.255\n" + "org: ORG-TEST-1\n" + "netname: NN\n" + "status: OTHER\n" + "source: TEST")); final String response = TelnetWhoisClient.queryLocalhost(QueryServer.port, "173.0.0.0"); assertThat(response, containsString("% Abuse contact for '173.0.0.0 - 173.255.255.255' is 'abuse@ripe.net'")); }</code><technical_language>reference "RIPE" source, 'NON-TEST' 'INVALID'</technical_language>

Target:
public void should_not_lookup_abuseC_if_rpsl_source_do_not_match() { databaseHelper.updateObject(RpslObject.parse( "inetnum: 173.0.0.0 - 173.255.255.255\n" + "org: ORG-TEST-1\n" + "netname: NN\n" + "status: OTHER\n" + "source: NON-TEST")); final String responseNoAbuseC = TelnetWhoisClient.queryLocalhost(QueryServer.port, "173.0.0.0"); assertFalse(responseNoAbuseC.contains("Abuse contact for '173.0.0.0 - 173.255.255.255' is 'abuse@ripe.net'")); databaseHelper.updateObject(RpslObject.parse( "inetnum: 173.0.0.0 - 173.255.255.255\n" + "org: ORG-TEST-1\n" + "netname: NN\n" + "status: OTHER\n" + "source: TEST")); final String response = TelnetWhoisClient.queryLocalhost(QueryServer.port, "173.0.0.0"); assertThat(response, containsString("% Abuse contact for '173.0.0.0 - 173.255.255.255' is 'abuse@ripe.net'")); }
Source:
<code>public void share(Context context){ String content = ""; if (isJoke()){ <START> content = "Joke: "; <END> } if (isFunFact()){ content = "Fun fact: "; } if (isFortune()){ content = "Fortune cookie: "; } if (isQuote()){ content = getAuthor() + ": \""; } content += getMessage(); if (isQuote()){ content += "\""; } Intent shareIntent = new Intent(android.content.Intent.ACTION_SEND); shareIntent.setType("text/plain"); shareIntent.putExtra(android.content.Intent.EXTRA_TEXT, content); context.startActivity(Intent.createChooser(shareIntent, "Share via")); }</code><technical_language>Do want put content strings in strings.xml</technical_language>

Target:
public void share(Context context){ String content = ""; if (isJoke()){ content = context.getString(R.string.reward_joke) + ": "; } if (isFunFact()){ content = context.getString(R.string.reward_fact) + ": "; } if (isFortune()){ content = context.getString(R.string.reward_fortune) + ": "; } if (isQuote()){ content = getAuthor() + ": \""; } content += getMessage(); if (isQuote()){ content += "\""; } Intent shareIntent = new Intent(android.content.Intent.ACTION_SEND); shareIntent.setType("text/plain"); shareIntent.putExtra(android.content.Intent.EXTRA_TEXT, content); context.startActivity(Intent.createChooser( shareIntent, context.getString(R.string.reward_share_via) )); }
Source:
<code>private List<UserGroup> loadUserGroups(String graphApiToken) throws IOException { String responseInJson = getUserMemberships(graphApiToken, Optional.empty()); final List<UserGroup> lUserGroups = new ArrayList<>(); final ObjectMapper objectMapper = JacksonObjectMapperFactory.getInstance(); <START> objectMapper.registerModule(new Jdk8Module()); <END> UserGroups groupsFromJson = objectMapper.readValue(responseInJson, UserGroups.class); if (groupsFromJson.getValue() != null) { lUserGroups.addAll(groupsFromJson.getValue().stream().filter(this::isMatchingUserGroupKey) .collect(Collectors.toList())); } while (groupsFromJson.getOdataNextLink().isPresent()) { responseInJson = getUserMemberships(graphApiToken, groupsFromJson.getOdataNextLink()); groupsFromJson = objectMapper.readValue(responseInJson, UserGroups.class); lUserGroups.addAll(groupsFromJson.getValue().stream().filter(this::isMatchingUserGroupKey) .collect(Collectors.toList())); } return lUserGroups; }</code><technical_language>Is Jdk8Module is for support Optional type in json? null instead of Optional</technical_language>

Target:
private List<UserGroup> loadUserGroups(String graphApiToken) throws IOException { String responseInJson = getUserMemberships(graphApiToken, null); final List<UserGroup> lUserGroups = new ArrayList<>(); final ObjectMapper objectMapper = JacksonObjectMapperFactory.getInstance(); UserGroups groupsFromJson = objectMapper.readValue(responseInJson, UserGroups.class); if (groupsFromJson.getValue() != null) { lUserGroups.addAll(groupsFromJson.getValue().stream().filter(this::isMatchingUserGroupKey) .collect(Collectors.toList())); } while (groupsFromJson.getOdataNextLink() != null) { responseInJson = getUserMemberships(graphApiToken, groupsFromJson.getOdataNextLink()); groupsFromJson = objectMapper.readValue(responseInJson, UserGroups.class); lUserGroups.addAll(groupsFromJson.getValue().stream().filter(this::isMatchingUserGroupKey) .collect(Collectors.toList())); } return lUserGroups; }
Source:
<code>public void createEphemeral(String path) { throw new UnsupportedOperationException( <START> "Create ephemeral nodes using " + SharedZkClient.class.getSimpleName() <END> + " is not supported."); }</code><technical_language>Nit: "Creating ephemeral nodes..."</technical_language>

Target:
public void createEphemeral(String path) { throw new UnsupportedOperationException( "Creating ephemeral nodes using " + SharedZkClient.class.getSimpleName() + " is not supported."); }
Source:
<code>protected boolean checkSqlEngineIndicatorExist() { for (ModelElementIndicator modelElementIndicator : this.treeViewer.getModelElementIndicator()) { if (modelElementIndicator.contains(IndicatorEnum.SqlPatternMatchingIndicatorEnum) || modelElementIndicator.contains(IndicatorEnum.UserDefinedIndicatorEnum) <START> && searchJUDI(modelElementIndicator, false)) { <END> return true; } } return super.checkSqlEngineIndicatorExist(); }</code><technical_language>add brackets this expression more easy understand</technical_language>

Target:
protected boolean checkSqlEngineIndicatorExist() { for (ModelElementIndicator modelElementIndicator : this.treeViewer.getModelElementIndicator()) { if (modelElementIndicator.contains(IndicatorEnum.SqlPatternMatchingIndicatorEnum) || (modelElementIndicator.contains(IndicatorEnum.UserDefinedIndicatorEnum) && searchJUDI( modelElementIndicator, false))) { return true; } } return super.checkSqlEngineIndicatorExist(); }
Source:
<code><START> @Override public Type[] getParameterTypes() { <END> return method.getParameterTypes(); }</code><technical_language>@Override annotations line</technical_language>

Target:
public Class<?>[] getParameterTypes() { return method.getParameterTypes(); }
Source:
<code>public void onPlayerChat(final AsyncPlayerChatEvent event) { final User user = ess.getUser(event.getPlayer()); if (user.isMuted()) { event.setCancelled(true); <START> if (user.getMuteReason ().equals ("")) { <END> user.sendMessage(tl("voiceSilenced")); } else { user.sendMessage(tl("voiceSilenced") + tl("muteFormat", user.getMuteReason ())); } LOGGER.info(tl("mutedUserSpeaks", user.getName(), event.getMessage())); } try { final Iterator<Player> it = event.getRecipients().iterator(); while (it.hasNext()) { final User u = ess.getUser(it.next()); if (u.isIgnoredPlayer(user)) { it.remove(); } } } catch (UnsupportedOperationException ex) { if (ess.getSettings().isDebug()) { ess.getLogger().log(Level.INFO, "Ignore could not block chat due to custom chat plugin event.", ex); } else { ess.getLogger().info("Ignore could not block chat due to custom chat plugin event."); } } user.updateActivity(true); user.setDisplayNick(); }</code><technical_language>space getMuteReason brackets match style conventions rest of EssentialsX's code</technical_language>

Target:
public void onPlayerChat(final AsyncPlayerChatEvent event) { final User user = ess.getUser(event.getPlayer()); if (user.isMuted()) { event.setCancelled(true); user.sendMessage(user.hasMuteReason() ? tl("voiceSilencedReason", user.getMuteReason()) : tl("voiceSilenced")); LOGGER.info(tl("mutedUserSpeaks", user.getName(), event.getMessage())); } try { final Iterator<Player> it = event.getRecipients().iterator(); while (it.hasNext()) { final User u = ess.getUser(it.next()); if (u.isIgnoredPlayer(user)) { it.remove(); } } } catch (UnsupportedOperationException ex) { if (ess.getSettings().isDebug()) { ess.getLogger().log(Level.INFO, "Ignore could not block chat due to custom chat plugin event.", ex); } else { ess.getLogger().info("Ignore could not block chat due to custom chat plugin event."); } } user.updateActivity(true); user.setDisplayNick(); }
Source:
<code>private static String listIndices(LibraryDilution dilution) { <START> return String.join(", ", dilution.getLibrary().getIndices().stream().map(Index::getSequence).collect(Collectors.toList())); <END> }</code><technical_language>a Collectors.joining(", ") produces a joined string output</technical_language>

Target:
private static String listIndices(LibraryDilution dilution) { return dilution.getLibrary().getIndices().stream().map(Index::getSequence).collect(Collectors.joining(", ")); }
Source:
<code>public DuplicateSet next() { if(!nextSetsIterator.hasNext()) <START> process(wrappedIterator.next()); <END> return nextSetsIterator.next(); }</code><technical_language>brackets nothing</technical_language>

Target:
public DuplicateSet next() { if (!nextSetsIterator.hasNext()) { process(wrappedIterator.next()); } return nextSetsIterator.next(); }
Source:
<code>public TestHiveDistributedQueries() { super(() -> createQueryRunner( getTables(), <START> ImmutableMap.of("internal-communication.task-communication-protocol", "THRIFT"), <END> ImmutableMap.of(), Optional.empty())); }</code><technical_language>this HTTP is tested in this class more</technical_language>

Target:
public TestHiveDistributedQueries() { super(() -> createQueryRunner(getTables())); }
Source:
<code>private static void clean(ByteBuffer buffer) { if (!buffer.isDirect()) { throw new IllegalArgumentException("Unmapping only works with direct buffers"); } if (UNMAP == null) { <START> throw UNMAP_NOT_SUPPORTED_EXCEPTION; <END> } try { UNMAP.invokeExact(buffer); } catch (Throwable throwable) { throw new RuntimeException("Unable to unmap the mapped buffer", throwable); } }</code><technical_language>this a wrapped exception stack trace recorded</technical_language>

Target:
private static void clean(ByteBuffer buffer) { if (!buffer.isDirect()) { throw new IllegalArgumentException("Unmapping only works with direct buffers"); } if (UNMAP == null) { throw new UnsupportedOperationException(UNMAP_NOT_SUPPORTED_EXCEPTION); } try { UNMAP.invokeExact(buffer); } catch (Throwable throwable) { throw new RuntimeException("Unable to unmap the mapped buffer", throwable); } }
Source:
<code><START> public String getErrorMessage() { <END> if (getError().isPresent()) { return getError().get().getMessage(); } return ""; }</code><technical_language>need this method gatewayResponse.getError().map(s -> s.getMessage()) instead in CardCaptureMessageProcess</technical_language>

Target:
public Optional<String> getErrorMessage() { return getError().map(error -> error.getMessage()); }
Source:
<code>private void resultsHide() { if (!resultsShowing) { return; } if (!isMultiple) { selectedItem.removeClass(css.chznSingleWithDrop()); } resultClearHighlight(); fireEvent(new HidingDropDownEvent(this)); <START> dropdown.css("display", "none"); <END> resultsShowing = false; }</code><technical_language>I right left -9000px instead of display:none for reasons. I solve problem of scrollbar simply setting top -9000px</technical_language>

Target:
private void resultsHide() { if (!resultsShowing) { return; } if (!isMultiple) { selectedItem.removeClass(css.chznSingleWithDrop()); } resultClearHighlight(); fireEvent(new HidingDropDownEvent(this)); dropdown.css(isRTL ? "right" : "left", HORIZONTAL_OFFSET + "px"); dropdown.css("top", VERTICAL_OFFSET + "px"); resultsShowing = false; }
Source:
<code>protected Map<String, String> getInternalAddressesAndPorts(ContainerInfo containerInfo, String internalHost) { <START> String internalAddressContainer = containerInfo.getNetworkSettings().getIpAddress(); <END> String internalAddress; if (useContainerAddress) { internalAddress = !isNullOrEmpty(internalAddressContainer) ? internalAddressContainer : internalHost; } else { internalAddress = internalAddressProperty != null ? internalAddressProperty : internalHost; } boolean useExposedPorts = useContainerAddress && internalAddress != internalHost; return getExposedPortsToAddressPorts(internalAddress, containerInfo.getNetworkSettings().getPorts(), useExposedPorts); }</code><technical_language>is final objects</technical_language>

Target:
protected Map<String, String> getInternalAddressesAndPorts(ContainerInfo containerInfo, String internalHost) { final String internalAddressContainer = containerInfo.getNetworkSettings().getIpAddress(); final String internalAddress; if (useContainerAddress) { internalAddress = !isNullOrEmpty(internalAddressContainer) ? internalAddressContainer : internalHost; } else { internalAddress = cheDockerIp != null ? cheDockerIp : internalHost; } boolean useExposedPorts = useContainerAddress && internalAddress != internalHost; return getExposedPortsToAddressPorts(internalAddress, containerInfo.getNetworkSettings().getPorts(), useExposedPorts); }
Source:
<code>void testbuildVendorDetailExtensionForeignFormEmpty() { conversionService.setPaymentWorksFormModeService(buildMockPaymentWorksFormModeService(true)); PaymentWorksVendor pmwVendor = new PaymentWorksVendor(); pmwVendor.setRequestingCompanyTaxCountry(ARUBA_ISO_CODE); pmwVendor.setPaymentMethod(StringUtils.EMPTY); <START> try { conversionService.buildVendorDetailExtension(pmwVendor, buildPaymentWorksIsoToFipsCountryMap()); } catch (IllegalArgumentException iae) { assertTrue(true, "expected illegal argument exception"); return; } assertTrue(false, "expected illegal argument exception"); <END> }</code><technical_language>simplify this JUnit's fail() assertion instead, place assertion "try" block</technical_language>

Target:
void testbuildVendorDetailExtensionForeignFormEmpty() { conversionService.setPaymentWorksFormModeService(buildMockPaymentWorksFormModeService(true)); PaymentWorksVendor pmwVendor = new PaymentWorksVendor(); pmwVendor.setRequestingCompanyTaxCountry(ARUBA_ISO_CODE); pmwVendor.setPaymentMethod(StringUtils.EMPTY); try { conversionService.buildVendorDetailExtension(pmwVendor, buildPaymentWorksIsoToFipsCountryMap()); fail("With no payment method provided, an Illegal Argument Exception should have been thrown."); } catch (Exception e) { assertEquals(IllegalArgumentException.class, e.getClass()); } }
Source:
<code>private void validateMetatags(File templateFile) throws IOException { Document doc = Jsoup.parse(templateFile, null, ""); Elements metatagsWithCharsetAttribute = doc.select("meta[charset]"); if (metatagsWithCharsetAttribute.isEmpty() || metatagsWithCharsetAttribute.size() > 1) { <START> throw new APIException("radiology.report.template.validation.error", null, <END> new Throwable("Template file should have exactly one meta element with charset attribute")); } Elements dublinAttributes = doc.select("meta[name]"); if (dublinAttributes.isEmpty()) { throw new APIException("radiology.report.template.validation.error", null, new Throwable("Template file should have at least one meta tag containing dublin core attributes")); } }</code><technical_language>@ivange94 APIException("radiology.report.template.validation.xxx") caught end internationalized in UI. please create extra message property code "Template file meta element charset attribute"</technical_language>

Target:
private void validateMetatags(File templateFile) throws IOException { final Document doc = Jsoup.parse(templateFile, null, ""); final Elements metatagsWithCharsetAttribute = doc.select("meta[charset]"); if (metatagsWithCharsetAttribute.isEmpty() || metatagsWithCharsetAttribute.size() > 1) { throw new APIException("radiology.report.template.validation.error.meta.charset"); } final Elements dublinAttributes = doc.select("meta[name]"); if (dublinAttributes.isEmpty()) { throw new APIException("radiology.report.template.validation.error.meta.dublinCore"); } }
Source:
<code>public boolean isStartingPosition() { <START> return false; <END> }</code><technical_language>fixen (in branch gammodes is starting position een decorator)</technical_language>

Target:
public boolean isStartingPosition() { return square.hasProperty(PropertyType.STARTING_POSITION); }
Source:
<code>public void showClientIdentifiers(List<Identifier> identifiers) { <START> if (ll_error.getVisibility() == View.VISIBLE) { <END> ll_error.setVisibility(View.GONE); } this.identifiers = identifiers; identifierListAdapter.setIdentifiers(identifiers); }</code><technical_language>variable name ll_error llError</technical_language>

Target:
public void showClientIdentifiers(List<Identifier> identifiers) { if (llError.getVisibility() == View.VISIBLE) { llError.setVisibility(View.GONE); } this.identifiers = identifiers; identifierListAdapter.setIdentifiers(identifiers); }
Source:
<code>public List<ServicePort> getServicePortsFrom(Set<String> exposedPorts) { <START> List<ServicePort> servicePorts = new ArrayList<>(); <END> for (String exposedPort : exposedPorts) { String[] portAndProtocol = exposedPort.split("/", 2); String port = portAndProtocol[0]; String protocol = portAndProtocol[1]; int portNumber = Integer.parseInt(port); String portName = CheServicePorts.get().get(portNumber); portName = isNullOrEmpty(portName) ? exposedPort.replace("/", "-") : portName; int targetPortNumber = portNumber; ServicePort servicePort = new ServicePort(); servicePort.setName(portName); servicePort.setProtocol(protocol); servicePort.setPort(portNumber); servicePort.setTargetPort(new IntOrString(targetPortNumber)); servicePorts.add(servicePort); } return servicePorts; }</code><technical_language>size is define</technical_language>

Target:
public List<ServicePort> getServicePortsFrom(Set<String> exposedPorts) { List<ServicePort> servicePorts = new ArrayList<>(exposedPorts.size()); for (String exposedPort : exposedPorts) { String[] portAndProtocol = exposedPort.split("/", 2); String port = portAndProtocol[0]; String protocol = portAndProtocol[1]; int portNumber = Integer.parseInt(port); String portName = CheServicePorts.get().get(portNumber); portName = isNullOrEmpty(portName) ? exposedPort.replace("/", "-") : portName; int targetPortNumber = portNumber; ServicePort servicePort = new ServicePort(); servicePort.setName(portName); servicePort.setProtocol(protocol); servicePort.setPort(portNumber); servicePort.setTargetPort(new IntOrString(targetPortNumber)); servicePorts.add(servicePort); } return servicePorts; }
Source:
<code>public synchronized StorageDomain getStorageDomainById(String id) { StorageDomain storageDomain = null; if (storageDomainMap.containsKey(id)) { return storageDomainMap.get(id); } try { storageDomain = loadObject(StorageDomain.class, id) != null ? (StorageDomain) loadObject(StorageDomain.class, id) : recoverStorageDomain(id); log.info("storageDomain restored from file, id: {}", id); } catch <START> (RuntimeException e) <END> { log.error("failed to fetch storageDomain by id, rewrite caches for DC {}", id); } finally { log.info("about to store storage domian object id {}", id, storageDomain); storageDomainMap.put(id, storageDomain); } return storageDomain; }</code><technical_language>in line #153</technical_language>

Target:
public synchronized StorageDomain getStorageDomainById(String id) { StorageDomain storageDomain = null; if (storageDomainMap.containsKey(id)) { return storageDomainMap.get(id); } storageDomain = (StorageDomain) loadObject(StorageDomain.class, id); if (storageDomain == null) { storageDomain = recoverStorageDomain(id); } return storageDomain; }
Source:
<code>public static void load() { if (!LOCALES.isEmpty() || localeIDs != null) { LOCALES.clear(); localeIDs = null; currentLocale = null; Utils.gc(false); } final Pattern fileExt = Pattern.compile("(.+).(lang)$"); currentLocale = FALLBACK; try (JarFile opsu = Utils.getJarFile()) { Enumeration<JarEntry> entries = opsu.entries(); while (entries.hasMoreElements()) { JarEntry entry = entries.nextElement(); String entryName = entry.getName(); if (fileExt.matcher(entryName).matches()) addLocale(new I18n(entryName)); } } catch (NullPointerException e) { for (File langFile : findRecursively(Utils.getRunningDirectory(), fileExt)) try { addLocale(new I18n(langFile)); } catch (Exception e2) { Log.error("Could not load translation: " + langFile.getName(), e2); } } catch (IOException e) { Log.error("Could not find resources for translation", e); } <START> localeIDs = new String[LOCALES.size()]; <END> for (int a = 0; a < localeIDs.length; a++) localeIDs[a] = LOCALES.get(a).toString(); }</code><technical_language>Consider some sort of [List](<LINK_2> (maybe [ArrayList](<LINK_1> simplify for loop a bit. If localeIDs LOCALES tightly coupled, want consider a [Map](<LINK_0> IDs locales instead</technical_language>

Target:
public static void load() { LOCALES.clear(); localeIDs = null; currentLocale = FALLBACK; try (JarFile opsu = Utils.getJarFile()) { Enumeration<JarEntry> entries = opsu.entries(); while (entries.hasMoreElements()) { JarEntry entry = entries.nextElement(); String entryName = entry.getName(); if (entryName.endsWith(LANG_FILE_EXT)) addLocale(new I18n(entryName)); } } catch (NullPointerException e) { for (File langFile : findLanguagesRecursively(Utils.getWorkingDirectory())) try { addLocale(new I18n(langFile)); } catch (Exception e2) { Log.error("Could not load translation: " + langFile.getName(), e2); } } catch (IOException e) { Log.error("Could not find resources for translation", e); } }
Source:
<code>public PhoneHomeParameterCreator createParameters() { PhoneHomeParameterCreator parameterCreator = new PhoneHomeParameterCreator(); List<MetricsCollector> metricsCollectorList = new ArrayList<>(); metricsCollectorList.add(new BuildInfoCollector()); metricsCollectorList.add(new ClusterInfoCollector()); metricsCollectorList.add(new ClientInfoCollector()); metricsCollectorList.add(new MapInfoCollector()); <START> metricsCollectorList.add(new OSInfoCollector()); <END> metricsCollectorList.forEach((metricsCollector -> parameterCreator. addMap(metricsCollector.computeMetrics(hazelcastNode)))); return parameterCreator; }</code><technical_language>nit: cleaner create this list a field. java.util.Arrays.asList(...) create array, instead of adding values ArrayList</technical_language>

Target:
public PhoneHomeParameterCreator createParameters() { PhoneHomeParameterCreator parameterCreator = new PhoneHomeParameterCreator(); metricsCollectorList.forEach((metricsCollector -> parameterCreator. addMap(metricsCollector.computeMetrics(hazelcastNode)))); return parameterCreator; }
Source:
<code>public String toString() { return "NetatmoBindingConfig [userid=" + this.userid + ", deviceId=" + this.deviceId + ", moduleId=" + this.moduleId + ", measure=" + (this.measureType != null ? this.measureType.getMeasure() : null) + ", homeId=" + this.homeId + ", personId=" + this.personId + ", cameraId=" + this.cameraId <START> + ", attribute=" + this.attribute + "]"; <END> }</code><technical_language>toString a smarter print out for weather camera</technical_language>

Target:
public String toString() { String sReturn = "NetatmoBindingConfig"; if (bWeather) { sReturn += " weather=true [userid=" + this.userid + ", deviceId=" + this.deviceId + ", moduleId=" + this.moduleId + ", measure=" + (this.measureType != null ? this.measureType.getMeasure() : null) + "]"; } if (bCamera) { sReturn += " camera=true [homeId=" + this.homeId + ", personId=" + this.personId + ", cameraId=" + this.cameraId + ", attribute=" + this.attribute + "]"; } return sReturn; }
Source:
<code>public boolean generateLaborLedgerBenefitClearingPendingEntries(GeneralLedgerPendingEntrySequenceHelper sequenceHelper) { LOG.debug("started generateLaborLedgerBenefitClearingPendingEntries()"); String chartOfAccountsCode = SpringContext.getBean(ParameterService.class).getParameterValueAsString(SalaryExpenseTransferDocument.class, LaborParameterConstants.BENEFIT_CLEARING_CHART); <START> String accountNumber = SpringContext.getBean(ParameterService.class).getParameterValueAsString(SalaryExpenseTransferDocument.class, LaborParameterConstants.BENEFIT_CLEARING_CHART); <END> List<LaborLedgerPendingEntry> benefitClearingPendingEntries = CuLaborPendingEntryGenerator.generateBenefitClearingPendingEntries(this, sequenceHelper, accountNumber, chartOfAccountsCode); if (benefitClearingPendingEntries != null && !benefitClearingPendingEntries.isEmpty()) { return this.getLaborLedgerPendingEntries().addAll(benefitClearingPendingEntries); } return true; }</code><technical_language>this reference BENEFIT_CLEARING_ACCOUNT instead</technical_language>

Target:
public boolean generateLaborLedgerBenefitClearingPendingEntries(GeneralLedgerPendingEntrySequenceHelper sequenceHelper) { LOG.debug("started generateLaborLedgerBenefitClearingPendingEntries()"); String chartOfAccountsCode = SpringContext.getBean(ParameterService.class).getParameterValueAsString(SalaryExpenseTransferDocument.class, LaborParameterConstants.BENEFIT_CLEARING_CHART); String accountNumber = SpringContext.getBean(ParameterService.class).getParameterValueAsString(SalaryExpenseTransferDocument.class, LaborParameterConstants.BENEFIT_CLEARING_ACCOUNT); List<LaborLedgerPendingEntry> benefitClearingPendingEntries = CuLaborPendingEntryGenerator.generateBenefitClearingPendingEntries(this, sequenceHelper, accountNumber, chartOfAccountsCode); if (benefitClearingPendingEntries != null && !benefitClearingPendingEntries.isEmpty()) { return this.getLaborLedgerPendingEntries().addAll(benefitClearingPendingEntries); } return true; }
Source:
<code>void compact(CompactionDetails details) throws IOException, StoreException { checkStarted(); compactor.compact(details); checkCapacityAndUpdateWriteStatusDelegate(log.getCapacityInBytes(), index.getLogUsedCapacity()); <START> logger.trace("One cycle of compaction is completed on the store: " + storeId); <END> }</code><technical_language>log formatting</technical_language>

Target:
void compact(CompactionDetails details) throws IOException, StoreException { checkStarted(); compactor.compact(details); checkCapacityAndUpdateWriteStatusDelegate(log.getCapacityInBytes(), index.getLogUsedCapacity()); logger.trace("One cycle of compaction is completed on the store {}", storeId); }