auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void obtainsCreationDate() throws Exception { <START> final String alias = "brown"; <END> final Aliases aliases = new DyBase().user(new URN("urn:test:89637")).aliases(); aliases.add(alias); final Inbox inbox = aliases.iterate().iterator().next().inbox(); final Bout bout = inbox.bout(inbox.start()); final Attachments attachments = bout.attachments(); final long before = System.currentTimeMillis(); final String name = "attach-name"; attachments.create(name); final Attachment attachment = attachments.get(name); MatcherAssert.assertThat( attachment.date().getTime(), Matchers.greaterThan(before) ); final long after = System.currentTimeMillis(); MatcherAssert.assertThat( attachment.date().getTime(), Matchers.lessThan(after) ); attachments.delete(name); }</code><technical_language>@CarlosGines please inline</technical_language>

Target:
public void obtainsCreationDate() throws Exception { final Aliases aliases = new DyBase().user(new URN("urn:test:89637")).aliases(); aliases.add("brown"); final Inbox inbox = aliases.iterate().iterator().next().inbox(); final Attachments attachments = inbox.bout(inbox.start()).attachments(); final long before = System.currentTimeMillis(); final String name = "attach-name"; attachments.create(name); final Attachment attachment = attachments.get(name); MatcherAssert.assertThat( attachment.date().getTime(), Matchers.greaterThanOrEqualTo(before) ); final long after = System.currentTimeMillis(); MatcherAssert.assertThat( attachment.date().getTime(), Matchers.lessThanOrEqualTo(after) ); attachments.delete(name); }
Source:
<code>public void testTimeDimensionSetAfterAutoModel() throws Exception { ModelerWorkspace wspace = new ModelerWorkspace( new ModelerWorkspaceHelper( "en_US" ) ); <START> DatabaseMeta dbMeta = ModelITHelper.newH2Db( "CreateAttributeIT-H2-DB", "DROP TABLE if exists datetable;", <END> "CREATE TABLE datetable ( \"date\" TIMESTAMP );" ); TableModelerSource source = new TableModelerSource( dbMeta, "datetable", "" ); Domain domain = source.generateDomain(); wspace.setModelSource( source ); wspace.setDomain( domain ); wspace.setModelName( "DateModel" ); wspace.getWorkspaceHelper().autoModelFlat( wspace ); wspace.getWorkspaceHelper().populateDomain( wspace ); CreateAttribute createAttr = new CreateAttribute(); createAttr.setName( "Date" ); createAttr.setTimeType( TimeType.TimeDays ); createAttr.setDimension( "Date" ); createAttr.setHierarchy( "Date" ); createAttr.setField( "date" ); createAttr.apply( wspace, new MemoryMetaStore() ); OlapDimension dateDim = getCubes( wspace ).get( 0 ).getOlapDimensionUsages().get( 0 ).getOlapDimension(); assertEquals( "Date", dateDim.getName() ); assertTrue( "time dimension not set", dateDim.isTimeDimension() ); }</code><technical_language>store this variable locally it</technical_language>

Target:
public void testTimeDimensionSetAfterAutoModel() throws Exception { ModelerWorkspace wspace = new ModelerWorkspace( new ModelerWorkspaceHelper( "en_US" ) ); DatabaseMeta dbMeta = ModelITHelper.newH2Db( dbName, "DROP TABLE if exists datetable;", "CREATE TABLE datetable ( \"date\" TIMESTAMP );" ); TableModelerSource source = new TableModelerSource( dbMeta, "datetable", "" ); Domain domain = source.generateDomain(); wspace.setModelSource( source ); wspace.setDomain( domain ); wspace.setModelName( "DateModel" ); wspace.getWorkspaceHelper().autoModelFlat( wspace ); wspace.getWorkspaceHelper().populateDomain( wspace ); CreateAttribute createAttr = new CreateAttribute(); createAttr.setName( "Date" ); createAttr.setTimeType( TimeType.TimeDays ); createAttr.setDimension( "Date" ); createAttr.setHierarchy( "Date" ); createAttr.setField( "date" ); createAttr.apply( wspace, new MemoryMetaStore() ); OlapDimension dateDim = getCubes( wspace ).get( 0 ).getOlapDimensionUsages().get( 0 ).getOlapDimension(); assertEquals( "Date", dateDim.getName() ); assertTrue( "time dimension not set", dateDim.isTimeDimension() ); }
Source:
<code>public DoubleSummaryStatistics readObject(ObjectInput input) throws IOException, ClassNotFoundException { verifySerialization(); final DoubleSummaryStatistics summaryStatistics; if (constructor != null) { final long count = input.readLong(); final double sum = input.readDouble(); final double sumCompensation = input.readDouble(); final double simpleSum = input.readDouble(); final double min = input.readDouble(); <START> final double max = input.readDouble(); <END> try { summaryStatistics = constructor.newInstance(count, min, max, sum); } catch (ReflectiveOperationException e) { throw new IOException(String.format(CONSTRUCTOR_CALL_ERROR_MSG, DoubleSummaryStatistics.class, constructor.toString(), count, min, max, sum), e); } } else { summaryStatistics = new DoubleSummaryStatistics(); try { countField.setLong(summaryStatistics, input.readLong()); sumField.setDouble(summaryStatistics, input.readDouble()); sumCompensationField.setDouble(summaryStatistics, input.readDouble()); simpleSumField.setDouble(summaryStatistics, input.readDouble()); minField.setDouble(summaryStatistics, input.readDouble()); maxField.setDouble(summaryStatistics, input.readDouble()); } catch (IllegalAccessException e) { throw new IOException(e); } } return summaryStatistics; }</code><technical_language>move stream reads if, clearer format is of JDK version</technical_language>

Target:
public DoubleSummaryStatistics readObject(ObjectInput input) throws IOException, ClassNotFoundException { verifySerialization(); final DoubleSummaryStatistics summaryStatistics; final long count = input.readLong(); final double sum = input.readDouble(); final double sumCompensation = input.readDouble(); final double simpleSum = input.readDouble(); final double min = input.readDouble(); final double max = input.readDouble(); if (constructor != null) { try { summaryStatistics = constructor.newInstance(count, min, max, sum); } catch (ReflectiveOperationException e) { throw new IOException(String.format(CONSTRUCTOR_CALL_ERROR_MSG, DoubleSummaryStatistics.class, constructor.toString(), count, min, max, sum), e); } } else { summaryStatistics = new DoubleSummaryStatistics(); try { countField.setLong(summaryStatistics, count); sumField.setDouble(summaryStatistics, sum); minField.setDouble(summaryStatistics, min); maxField.setDouble(summaryStatistics, max); } catch (IllegalAccessException e) { throw new IOException(e); } } return summaryStatistics; }
Source:
<code><START> public int get() { <END> return (int) encoder.getPosition(); }</code><technical_language>encoder returns data a double representing rotations, sense for this method exist. get? modify fit this type of sensor (in CustomEncoder) delete it</technical_language>

Target:
public int get() { try { return getSafely(); } catch (InvalidSensorException e) { LogKitten.e(e); return 0; } }
Source:
<code>private static void checkValidPath(CanonicalTreeParser t) throws InvalidPathException { ObjectChecker chk = new ObjectChecker() <START> .setSafeForWindows(SystemReader.getInstance().isWindows()); <END> for (CanonicalTreeParser i = t; i != null; i = i.getParent()) checkValidPathSegment(chk, i); }</code><technical_language>setSafeForMacOs, too</technical_language>

Target:
private static void checkValidPath(CanonicalTreeParser t) throws InvalidPathException { ObjectChecker chk = new ObjectChecker() .setSafeForWindows(SystemReader.getInstance().isWindows()) .setSafeForMacOS(SystemReader.getInstance().isMacOS()); for (CanonicalTreeParser i = t; i != null; i = i.getParent()) checkValidPathSegment(chk, i); }
Source:
<code>public void commitToFile() throws Exception { afw.write(expectedContent, 0, expectedContent.length()); afw.commit(); <START> assertTrue(Files.size(af.toPath()) == expectedContent.length()); <END> }</code><technical_language>java assertEquals(expectedContent.length(), Files.size(af.toPath()));</technical_language>

Target:
public void commitToFile() throws Exception { afw.write(expectedContent, 0, expectedContent.length()); afw.commit(); assertEquals(expectedContent.length(), Files.size(af.toPath())); }
Source:
<code>private boolean isContainedWildcard( AnnotatedTypeMirror inside, AnnotatedTypeMirror outside, AnnotatedTypeMirror outsideUpperBound, AnnotatedTypeMirror outsideLowerBound, boolean canBeCovariant) { <START> if (inside.getKind() == TypeKind.WILDCARD <END> && outside.getKind() == TypeKind.WILDCARD && inside.equals(outside)) { return true; } if (inside.getKind() == TypeKind.WILDCARD) { outsideUpperBound = checker.getTypeFactory() .widenToUpperBound(outsideUpperBound, (AnnotatedWildcardType) inside); } while (outsideUpperBound.getKind() == TypeKind.WILDCARD) { if (ignoreUninferredTypeArgument(outsideUpperBound)) { return true; } outsideUpperBound = ((AnnotatedWildcardType) outsideUpperBound).getExtendsBound(); } AnnotatedTypeMirror castedInside = AnnotatedTypes.castedAsSuper(inside.atypeFactory, inside, outsideUpperBound); if (!checkAndSubtype(castedInside, outsideUpperBound)) { return false; } if (outside.getKind() == TypeKind.WILDCARD && outsideLowerBound.getKind() == TypeKind.TYPEVAR) { return true; } return canBeCovariant || checkAndSubtype(outsideLowerBound, inside); }</code><technical_language>is this for wildcards? enough if inside.equals(outside) returns true</technical_language>

Target:
private boolean isContainedWildcard( AnnotatedTypeMirror inside, AnnotatedTypeMirror outside, AnnotatedTypeMirror outsideUpperBound, AnnotatedTypeMirror outsideLowerBound, boolean canBeCovariant) { if (inside.equals(outside)) { return true; } if (inside.getKind() == TypeKind.WILDCARD) { outsideUpperBound = checker.getTypeFactory() .widenToUpperBound(outsideUpperBound, (AnnotatedWildcardType) inside); } while (outsideUpperBound.getKind() == TypeKind.WILDCARD) { if (ignoreUninferredTypeArgument(outsideUpperBound)) { return true; } outsideUpperBound = ((AnnotatedWildcardType) outsideUpperBound).getExtendsBound(); } AnnotatedTypeMirror castedInside = AnnotatedTypes.castedAsSuper(inside.atypeFactory, inside, outsideUpperBound); if (!checkAndSubtype(castedInside, outsideUpperBound)) { return false; } if (outside.getKind() == TypeKind.WILDCARD && outsideLowerBound.getKind() == TypeKind.TYPEVAR) { return true; } return canBeCovariant || checkAndSubtype(outsideLowerBound, inside); }
Source:
<code>public int compareTo(Alert alert2) { if (risk < alert2.risk) { return -1; } else if (risk > alert2.risk) { return 1; } if (confidence < alert2.confidence) { return -1; } else if (confidence > alert2.confidence) { return 1; } if (pluginId < alert2.pluginId) { return -1; } else if (pluginId > alert2.pluginId) { return 1; } int result = name.compareToIgnoreCase(alert2.name); if (result != 0) { return result; } result = uri.compareToIgnoreCase(alert2.uri); if (result != 0) { return result; } result = param.compareToIgnoreCase(alert2.param); if (result != 0) { return result; } result = otherInfo.compareToIgnoreCase(alert2.otherInfo); if (result != 0) { return result; } if (evidence == null) { if (alert2.evidence == null) { <START> return 0; <END> } return -1; } else if (alert2.evidence == null) { return 1; } result = evidence.compareTo(alert2.evidence); if (result != 0) { return result; } if (attack == null) { if (alert2.attack == null) { return 0; } return -1; } else if (alert2.attack == null) { return 1; } return attack.compareTo(alert2.attack); }</code><technical_language>Shouldnt carry instead of returning 0? need check attack</technical_language>

Target:
public int compareTo(Alert alert2) { if (risk < alert2.risk) { return -1; } else if (risk > alert2.risk) { return 1; } if (confidence < alert2.confidence) { return -1; } else if (confidence > alert2.confidence) { return 1; } if (pluginId < alert2.pluginId) { return -1; } else if (pluginId > alert2.pluginId) { return 1; } int result = name.compareToIgnoreCase(alert2.name); if (result != 0) { return result; } result = uri.compareToIgnoreCase(alert2.uri); if (result != 0) { return result; } result = param.compareToIgnoreCase(alert2.param); if (result != 0) { return result; } result = otherInfo.compareToIgnoreCase(alert2.otherInfo); if (result != 0) { return result; } result = compareStrings(evidence, alert2.evidence); if (result != 0) { return result; } return compareStrings(attack, alert2.attack); }
Source:
<code><START> public DeviceId(final Optional<Long> internalDeviceId, final Optional<String> externalDeviceId) { <END> this.internalDeviceId = internalDeviceId; this.externalDeviceId = externalDeviceId; }</code><technical_language>this public</technical_language>

Target:
private DeviceId(final Optional<Long> internalDeviceId, final Optional<String> externalDeviceId) { this.internalDeviceId = internalDeviceId; this.externalDeviceId = externalDeviceId; }
Source:
<code>public void testRunMigrationWithCustomSchema() throws Exception { String schemaName = "customschema"; <START> try (Handle handle = new DBI(databaseUrl, "sa", "").open()) { <END> handle.execute("create schema " + schemaName); } Namespace namespace = new Namespace(ImmutableMap.of("schema", schemaName)); migrateCommand.run(null, namespace, conf); try (Handle handle = new DBI(databaseUrl, "sa", "").open()) { final List<Map<String, Object>> rows = handle.select("select * from " + schemaName + ".persons"); assertThat(rows).hasSize(1); assertThat(rows.get(0)).isEqualTo( ImmutableMap.of("id", 1, "name", "Bill Smith", "email", "bill@smith.me")); } }</code><technical_language>I extract DBI a variable Java-8 friendly method useHandle: java DBI dbi = new DBI(databaseUrl, "sa", ""); dbi.useHandle(h -> h.execute("create schema " + schemaName));</technical_language>

Target:
public void testRunMigrationWithCustomSchema() throws Exception { String schemaName = "customschema"; DBI dbi = new DBI(databaseUrl, "sa", ""); dbi.useHandle(h -> h.execute("create schema " + schemaName)); Namespace namespace = new Namespace(ImmutableMap.of("schema", schemaName, "catalog", "public")); migrateCommand.run(null, namespace, conf); dbi.useHandle(handle -> { assertThat(handle .select("select * from " + schemaName + ".persons")) .hasSize(1) .contains(ImmutableMap.of("id", 1, "name", "Bill Smith", "email", "bill@smith.me"), Index.atIndex(0)); }); }
Source:
<code><START> private FUNCTION_TYPE ensureSameType(final Collection<IndexingExpr> filters) { <END> FUNCTION_TYPE type = null; for(final IndexingExpr filter : filters) { if(type == null) { type = IndexingFunctionRegistry.getFunctionType(filter.getFunction()); } else { if(IndexingFunctionRegistry.getFunctionType(filter.getFunction()) != type) { return null; } } } return type; }</code><technical_language>method static</technical_language>

Target:
private static FUNCTION_TYPE ensureSameType(final Collection<IndexingExpr> filters) { FUNCTION_TYPE type = null; for(final IndexingExpr filter : filters) { if(type == null) { type = IndexingFunctionRegistry.getFunctionType(filter.getFunction()); } else { if(IndexingFunctionRegistry.getFunctionType(filter.getFunction()) != type) { return null; } } } return type; }
Source:
<code>public Optional<Duration> calculateLastLeaderElectionDuration() { Map<UUID, Instant> lowerBounds = ImmutableMap.copyOf(leadershipLowerBound.entrySet()); Map<UUID, Instant> upperBounds = ImmutableMap.copyOf(leadershipUpperBound.entrySet()); Set<UUID> leaders = leadersWithBothBounds(lowerBounds, upperBounds); List<UUID> sortedLongTermLeaders = orderedLongTermLeaders(lowerBounds, upperBounds, leaders); clearOldLongTermLeaders(sortedLongTermLeaders); if (sortedLongTermLeaders.isEmpty()) { return Optional.empty(); } UUID lastLongTermLeader = sortedLongTermLeaders.get(sortedLongTermLeaders.size() - 1); Optional<Duration> result = durationToNextLeader(lowerBounds, upperBounds, leaders, lastLongTermLeader); if (result.isPresent()) { return result; } <START> if (sortedLongTermLeaders.size() == 1) { <END> return Optional.empty(); } UUID secondToLastLongTermLeader = sortedLongTermLeaders.get(sortedLongTermLeaders.size() - 2); return durationToNextLeader(lowerBounds, upperBounds, leaders, secondToLastLongTermLeader); }</code><technical_language>pair this check isEmpty one? e.g. if (sortedLongTermLeaders.isEmpty() || sortedLongTermLeaders.size() == 1) {</technical_language>

Target:
public Optional<Duration> calculateLastLeaderElectionDuration() { Map<UUID, Instant> lowerBounds = ImmutableMap.copyOf(leadershipLowerBound.entrySet()); Map<UUID, Instant> upperBounds = ImmutableMap.copyOf(leadershipUpperBound.entrySet()); Set<UUID> leaders = leadersWithBothBounds(lowerBounds, upperBounds); List<UUID> sortedLongTermLeaders = orderedLongTermLeaders(lowerBounds, upperBounds, leaders); clearOldLongTermLeaders(sortedLongTermLeaders); if (sortedLongTermLeaders.isEmpty()) { return Optional.empty(); } UUID lastLongTermLeader = sortedLongTermLeaders.get(sortedLongTermLeaders.size() - 1); Optional<Duration> result = durationToNextLeader(lowerBounds, upperBounds, leaders, lastLongTermLeader); if (result.isPresent() || sortedLongTermLeaders.size() == 1) { return result; } UUID secondToLastLongTermLeader = sortedLongTermLeaders.get(sortedLongTermLeaders.size() - 2); return durationToNextLeader(lowerBounds, upperBounds, leaders, secondToLastLongTermLeader); }
Source:
<code>public static int partitions(Path basePath) { Path metadataPath = basePath.resolve(METADATA_FILE); if (metadataPath.toFile().exists()) { <START> return Integer.valueOf(readMetadata(metadataPath).getProperty(PARTITIONS_KEY)); <END> } return discoverPartitions(basePath); }</code><technical_language>valueOf -> parseInt</technical_language>

Target:
public static int partitions(Path basePath) { Path metadataPath = basePath.resolve(METADATA_FILE); if (metadataPath.toFile().exists()) { return Integer.parseInt(readMetadata(metadataPath).getProperty(PARTITIONS_KEY)); } return discoverPartitions(basePath); }
Source:
<code>public OutputDataStream[] getOutputDataStreams() { final OutputDataStreamBuilder builder = OutputDataStreams.pushDataStream(OUTPUT_DATA_STREAM_NAME); boolean foundOutputDataStream = false; for (final CoalesceUnit _unit : _units) { final InputColumn<?>[] updatedInputColumns = _unit.getUpdatedInputColumns(_inputs, false); <START> if(_unit.getInputColumns().length == updatedInputColumns.length){ <END> foundOutputDataStream = true; final CoalesceUnit unit = _unit.getUpdatedCoalesceUnit(updatedInputColumns); final Class<?> dataType = unit.getOutputDataType(); final String columnName = unit.getSuggestedOutputColumnName(); final ColumnType columnType = ColumnTypeImpl.convertColumnType(dataType); builder.withColumn(columnName, columnType); } else { logger.info("Missing columns detected, skipping coalesce unit"); } } if(!foundOutputDataStream) { return new OutputDataStream[0]; } return new OutputDataStream[] { builder.toOutputDataStream() }; }</code><technical_language>Missing spaces brackets</technical_language>

Target:
public OutputDataStream[] getOutputDataStreams() { final OutputDataStreamBuilder builder = OutputDataStreams.pushDataStream(OUTPUT_DATA_STREAM_NAME); boolean foundOutputDataStream = false; for (final CoalesceUnit _unit : _units) { final InputColumn<?>[] updatedInputColumns = _unit.getUpdatedInputColumns(_inputs, false); if (_unit.getInputColumnNames().length == updatedInputColumns.length) { foundOutputDataStream = true; final CoalesceUnit unit = _unit.getUpdatedCoalesceUnit(updatedInputColumns); final Class<?> dataType = unit.getOutputDataType(); final String columnName = unit.getSuggestedOutputColumnName(); final ColumnType columnType = ColumnTypeImpl.convertColumnType(dataType); builder.withColumn(columnName, columnType); } else { logger.info("Missing columns detected, skipping coalesce unit"); } } if (!foundOutputDataStream) { return new OutputDataStream[0]; } return new OutputDataStream[] { builder.toOutputDataStream() }; }
Source:
<code><START> private boolean isEmpty() { <END> for (JDKFamily f : data) { if (f.releases.length>0) return false; } return true; }</code><technical_language>bug: Binary compatibility</technical_language>

Target:
public boolean isEmpty() { for (JDKFamily f : data) { if (f.releases.length>0) return false; } return true; }
Source:
<code>private void configure(B builder) { OAuth2AuthorizationRequestRedirectFilter authorizationRequestRedirectFilter = createAuthorizationRequestRedirectFilter(builder); builder.addFilter(postProcess(authorizationRequestRedirectFilter)); OAuth2AuthorizationCodeGrantFilter authorizationCodeGrantFilter = createAuthorizationCodeGrantFilter(builder); <START> RequestCache requestCache = builder.getSharedObject(RequestCache.class); <END> if (requestCache != null) { authorizationCodeGrantFilter.setRequestCache(requestCache); } builder.addFilter(postProcess(authorizationCodeGrantFilter)); }</code><technical_language>move this logic createAuthorizationCodeGrantFilter()</technical_language>

Target:
private void configure(B builder) { OAuth2AuthorizationRequestRedirectFilter authorizationRequestRedirectFilter = createAuthorizationRequestRedirectFilter(builder); builder.addFilter(postProcess(authorizationRequestRedirectFilter)); OAuth2AuthorizationCodeGrantFilter authorizationCodeGrantFilter = createAuthorizationCodeGrantFilter(builder); builder.addFilter(postProcess(authorizationCodeGrantFilter)); }
Source:
<code>public boolean lock(Session session, boolean exclusive, boolean forceLockEvenInMvcc) { int lockMode = database.getLockMode(); if (lockMode == Constants.LOCK_MODE_OFF) { <START> session.registerTable(this); <END> return false; } if (!forceLockEvenInMvcc) { if (exclusive) { exclusive = false; } else { if (lockExclusiveSession == null) { return false; } } } if (lockExclusiveSession == session) { return true; } if (!exclusive && lockSharedSessions.containsKey(session)) { return true; } synchronized (getLockSyncObject()) { if (!exclusive && lockSharedSessions.containsKey(session)) { return true; } session.setWaitForLock(this, Thread.currentThread()); if (SysProperties.THREAD_DEADLOCK_DETECTOR) { WAITING_FOR_LOCK.set(getName()); } waitingSessions.addLast(session); try { doLock1(session, lockMode, exclusive); } finally { session.setWaitForLock(null, null); if (SysProperties.THREAD_DEADLOCK_DETECTOR) { WAITING_FOR_LOCK.remove(); } waitingSessions.remove(session); } } return false; }</code><technical_language>I missing here? if lock mode is off, add table Session#locks, in Session#getLocks(), if lock mode is off, ignore contents of Session#locks ArrayList</technical_language>

Target:
public boolean lock(Session session, boolean exclusive, boolean forceLockEvenInMvcc) { int lockMode = database.getLockMode(); if (lockMode == Constants.LOCK_MODE_OFF) { session.registerTableAsUpdated(this); return false; } if (!forceLockEvenInMvcc) { if (exclusive) { exclusive = false; } else { if (lockExclusiveSession == null) { return false; } } } if (lockExclusiveSession == session) { return true; } if (!exclusive && lockSharedSessions.containsKey(session)) { return true; } synchronized (getLockSyncObject()) { if (!exclusive && lockSharedSessions.containsKey(session)) { return true; } session.setWaitForLock(this, Thread.currentThread()); if (SysProperties.THREAD_DEADLOCK_DETECTOR) { WAITING_FOR_LOCK.set(getName()); } waitingSessions.addLast(session); try { doLock1(session, lockMode, exclusive); } finally { session.setWaitForLock(null, null); if (SysProperties.THREAD_DEADLOCK_DETECTOR) { WAITING_FOR_LOCK.remove(); } waitingSessions.remove(session); } } return false; }
Source:
<code>public void testRefresh() { final CommonTestUtilities.TestingPostgres testingPostgres = getTestingPostgres(); final long startToolCount = testingPostgres.runSelectStatement("select count(*) from tool", new ScalarHandler<>()); Client.main(new String[] { "--config", ResourceHelpers.resourceFilePath("config_file.txt"), "tool", "refresh", "--script" }); final long secondToolCount = testingPostgres.runSelectStatement("select count(*) from tool", new ScalarHandler<>()); testingPostgres.runUpdateStatement("delete from token where tokensource = 'quay.io'"); <START> systemExit.expectSystemExit(); <END> Client.main(new String[] { "--config", ResourceHelpers.resourceFilePath("config_file.txt"), "tool", "refresh", "--script" }); final long thirdToolCount = testingPostgres.runSelectStatement("select count(*) from tool", new ScalarHandler<>()); Assert.assertTrue("there should be no change in count of tools", secondToolCount == thirdToolCount); }</code><technical_language>expected exit code</technical_language>

Target:
public void testRefresh() { final CommonTestUtilities.TestingPostgres testingPostgres = getTestingPostgres(); final long startToolCount = testingPostgres.runSelectStatement("select count(*) from tool", new ScalarHandler<>()); Client.main(new String[] { "--config", ResourceHelpers.resourceFilePath("config_file.txt"), "tool", "refresh", "--script" }); final long secondToolCount = testingPostgres.runSelectStatement("select count(*) from tool", new ScalarHandler<>()); testingPostgres.runUpdateStatement("delete from token where tokensource = 'quay.io'"); systemExit.expectSystemExitWithStatus(6); Client.main(new String[] { "--config", ResourceHelpers.resourceFilePath("config_file.txt"), "tool", "refresh", "--script" }); final long thirdToolCount = testingPostgres.runSelectStatement("select count(*) from tool", new ScalarHandler<>()); Assert.assertTrue("there should be no change in count of tools", secondToolCount == thirdToolCount); }
Source:
<code>public void testAddExistingSingleFileInSubDir() throws IOException, NoFilepatternException { <START> assertTrue(new File(db.getWorkTree(), "sub").mkdir()); <END> File file = new File(db.getWorkTree(), "sub/a.txt"); FileUtils.createNewFile(file); PrintWriter writer = new PrintWriter(file); writer.print("content"); writer.close(); Git git = new Git(db); git.add().addFilepattern("sub/a.txt").call(); assertEquals( "[sub/a.txt, mode:100644, content:content]", indexState(CONTENT)); }</code><technical_language>FileUtils.mkdirs</technical_language>

Target:
public void testAddExistingSingleFileInSubDir() throws IOException, NoFilepatternException { FileUtils.mkdir(new File(db.getWorkTree(), "sub")); File file = new File(db.getWorkTree(), "sub/a.txt"); FileUtils.createNewFile(file); PrintWriter writer = new PrintWriter(file); writer.print("content"); writer.close(); Git git = new Git(db); git.add().addFilepattern("sub/a.txt").call(); assertEquals( "[sub/a.txt, mode:100644, content:content]", indexState(CONTENT)); }
Source:
<code><START> public static List<String> getTestPrototypeFactoryClasses() { <END> if (factoryClassNames.isEmpty()) { String baseODK = BuildConfig.BUILD_DIR + "/intermediates/classes/commcare/debug/"; String baseJR = BuildConfig.PROJECT_DIR + "/../javarosa/build/classes/main/"; String baseCC = BuildConfig.PROJECT_DIR + "/../commcare/build/classes/main/"; addExternalizableClassesFromDir(baseODK, factoryClassNames); addExternalizableClassesFromDir(baseCC, factoryClassNames); addExternalizableClassesFromDir(baseJR, factoryClassNames); } return factoryClassNames; }</code><technical_language>Confused naming of this method in general explanation helpful, more "get" side effects calling addExternalizableClassesFromDir</technical_language>

Target:
public static List<String> getTestPrototypeFactoryClasses() { initFactoryClassList(); return factoryClassNames; }
Source:
<code>public static int adjustPropertyModifiersForMethod(PropertyNode propNode) { int propNodeModifiers = propNode.getModifiers(); if ((propNodeModifiers & Modifier.VOLATILE) != 0) { propNodeModifiers -= Modifier.VOLATILE; } if ((propNodeModifiers & Modifier.TRANSIENT) != 0) { propNodeModifiers -= Modifier.TRANSIENT; <START> } <END> return propNodeModifiers; }</code><technical_language>or: propNodeModifiers = ~(Modifier.TRANSIENT | Modifier.VOLATILE) & propNodeModifiers</technical_language>

Target:
public static int adjustPropertyModifiersForMethod(PropertyNode propNode) { return ~(Modifier.TRANSIENT | Modifier.VOLATILE) & propNode.getModifiers(); }
Source:
<code>public String refundsURIWithParams(Account account, Map<String, String> queryParams) { <START> String path = format("/v1/accounts/%s/refunds", account.getAccountId()); <END> return buildConnectorUri(account, path, queryParams); }</code><technical_language>This match endpoint in connector :(</technical_language>

Target:
public String refundsURIWithParams(Account account, Map<String, String> queryParams) { String path = format("/v1/api/accounts/%s/refunds", account.getAccountId()); return buildConnectorUri(account, path, queryParams); }
Source:
<code>public SeekPoints getSeekPoints(long timeUs) { long[] result = decoderJni.getSeekPosition(timeUs); <START> if (result.length == 4) { <END> return new SeekPoints(new SeekPoint(result[0], result[1]), new SeekPoint(result[2], result[3])); } else { return new SeekPoints(new SeekPoint(timeUs, decoderJni.getDecodePosition())); } }</code><technical_language>result of length 4</technical_language>

Target:
public SeekPoints getSeekPoints(long timeUs) { @Nullable SeekPoints seekPoints = decoderJni.getSeekPoints(timeUs); return seekPoints == null ? new SeekPoints(SeekPoint.START) : seekPoints; }
Source:
<code>public final void readFully(long position, byte[] buffer, int bufferOffset, int bufferLength) { readBytes += bufferLength; long readStart = System.nanoTime(); readInternal(position, buffer, bufferOffset, bufferLength); long currentReadTimeNanos = System.nanoTime() - readStart; readTimeNanos += currentReadTimeNanos; <START> stats.readDataBytesPerSecond(bufferLength, currentReadTimeNanos); <END> }</code><technical_language>Stopwatch started stopped repeatedly</technical_language>

Target:
public final void readFully(long position, byte[] buffer, int bufferOffset, int bufferLength) { readBytes += bufferLength; long start = System.nanoTime(); readInternal(position, buffer, bufferOffset, bufferLength); long currentReadTimeNanos = System.nanoTime() - start; readTimeNanos += currentReadTimeNanos; stats.readDataBytesPerSecond(bufferLength, currentReadTimeNanos); }
Source:
<code>protected void drawStepContent() { super.drawStepContent(); listViewWidget.setItems(FXCollections.observableArrayList(menuItems)); if (defaultValue != null) { int idx = menuItems.indexOf(defaultValue); if (idx != -1) { listViewWidget.getSelectionModel().select(idx); listViewWidget.getFocusModel().focus(idx); listViewWidget.scrollTo(idx); } <START> if (defaultValue.isEmpty()) { <END> setNextButtonEnabled(false); listViewWidget.getSelectionModel().selectedItemProperty() .addListener((observable, oldValue, newValue) -> { if (newValue.trim().equals("")) { setNextButtonEnabled(false); } else { setNextButtonEnabled(true); } }); } } this.addToContentPane(listViewWidget); }</code><technical_language>StringUtils.isBlank</technical_language>

Target:
protected void drawStepContent() { super.drawStepContent(); listViewWidget.setItems(FXCollections.observableArrayList(menuItems)); if (defaultValue != null) { int idx = menuItems.indexOf(defaultValue); if (idx != -1) { listViewWidget.getSelectionModel().select(idx); listViewWidget.getFocusModel().focus(idx); listViewWidget.scrollTo(idx); } if (StringUtils.isBlank(defaultValue)) { setNextButtonEnabled(false); listViewWidget.getSelectionModel().selectedItemProperty() .addListener((observable, oldValue, newValue) -> { if (StringUtils.isBlank(newValue)) { setNextButtonEnabled(false); } else { setNextButtonEnabled(true); } }); } } this.addToContentPane(listViewWidget); }
Source:
<code>public void rewrite_records_in_bulk() { final RecordStorage<I> storage = getStorage(); <START> final I id1 = newId(); <END> final I id2 = newId(); final I id3 = newId(); final EntityRecord record1 = newStorageRecord(id1); final EntityRecord record2 = newStorageRecord(id2); final EntityRecord record3 = newStorageRecord(id3); final EntityRecord record1Modified = newStorageRecord(id1); final EntityRecord record3Modified = newStorageRecord(id3); final Map<I, EntityRecord> v1Records = new HashMap<>(3); v1Records.put(id1, record1); v1Records.put(id2, record2); v1Records.put(id3, record3); final Map<I, EntityRecord> v2Records = new HashMap<>(3); v2Records.put(id1, record1Modified); v2Records.put(id2, record2); v2Records.put(id3, record3Modified); storage.write(v1Records); final Map<I, EntityRecord> firstRevision = storage.readAll(); assertMapsEqual(v1Records, firstRevision, "First revision EntityRecord-s"); storage.write(v2Records); final Map<I, EntityRecord> secondRevision = storage.readAll(); assertMapsEqual(v2Records, secondRevision, "Second revision EntityRecord-s"); }</code><technical_language>a proper for statement instead of manual duplication of entries? If for, adjust number of records test easily</technical_language>

Target:
public void rewrite_records_in_bulk() { final int recordCount = 3; final RecordStorage<I> storage = getStorage(); final Map<I, EntityRecord> v1Records = new HashMap<>(recordCount); final Map<I, EntityRecord> v2Records = new HashMap<>(recordCount); for (int i = 0; i < recordCount; i++) { final I id = newId(); final EntityRecord record = newStorageRecord(id); final EntityRecord alternateRecord = (i % 2 == 0) ? record : newStorageRecord(id); v1Records.put(id, record); v2Records.put(id, alternateRecord); } storage.write(v1Records); final Map<I, EntityRecord> firstRevision = storage.readAll(); assertMapsEqual(v1Records, firstRevision, "First revision EntityRecord-s"); storage.write(v2Records); final Map<I, EntityRecord> secondRevision = storage.readAll(); assertMapsEqual(v2Records, secondRevision, "Second revision EntityRecord-s"); }
Source:
<code>public String getTitleFontFamily() { <START> return null; <END> }</code><technical_language>applies, titles allowed for connectors, fault sorry, try fix plz</technical_language>

Target:
public String getTitleFontFamily() { return label.isPresent() ? label.get().getText().getFontFamily() : null; }
Source:
<code>public Response setDynamicConfigs(final CoordinatorDynamicConfig dynamicConfig, @HeaderParam(AuditManager.X_DRUID_AUTHOR) @DefaultValue("") final String author, @HeaderParam(AuditManager.X_DRUID_COMMENT) @DefaultValue("") final String comment, @Context HttpServletRequest req ) { return manager.set( CoordinatorDynamicConfig.CONFIG_KEY, dynamicConfig, new AuditInfo(author, comment, req.getRemoteAddr()) <START> ) ? Response.ok().build() : Response.status(Response.Status.BAD_REQUEST).build(); <END> }</code><technical_language>Is this a 400 is a 500</technical_language>

Target:
public Response setDynamicConfigs(final CoordinatorDynamicConfig dynamicConfig, @HeaderParam(AuditManager.X_DRUID_AUTHOR) @DefaultValue("") final String author, @HeaderParam(AuditManager.X_DRUID_COMMENT) @DefaultValue("") final String comment, @Context HttpServletRequest req ) { return manager.set( CoordinatorDynamicConfig.CONFIG_KEY, dynamicConfig, new AuditInfo(author, comment, req.getRemoteAddr()) ) ? Response.ok().build() : Response.status(Response.Status.INTERNAL_SERVER_ERROR).build(); }
Source:
<code>public SinglePassSamProgram makeInstance(final String outbase, final String outext, final File input, final File reference, final Set<MetricAccumulationLevel> metricAccumulationLevel, final File dbSnp, final File intervals, final File refflat, final Set<String> ignoreSequence) { final CollectQualityYieldMetrics program = new CollectQualityYieldMetrics(); program.OUTPUT = new File(outbase + ".quality_yield_metrics" + outext); program.INPUT = input; <START> program.setReferenceSequence(reference); <END> return program; }</code><technical_language>used...so do set</technical_language>

Target:
public SinglePassSamProgram makeInstance(final String outbase, final String outext, final File input, final File reference, final Set<MetricAccumulationLevel> metricAccumulationLevel, final File dbSnp, final File intervals, final File refflat, final Set<String> ignoreSequence) { final CollectAlignmentSummaryMetrics program = new CollectAlignmentSummaryMetrics(); program.OUTPUT = new File(outbase + ".alignment_summary_metrics" + outext); program.METRIC_ACCUMULATION_LEVEL = metricAccumulationLevel; program.INPUT = input; program.setReferenceSequence(reference); return program; }
Source:
<code>private synchronized void tryReleaseWorkers() { if (blockedWorkerIds.size() == numWorkersToSync) { LOG.log(Level.INFO, "Try releasing {0} blocked workers: {1}", new Object[]{numWorkersToSync, blockedWorkerIds}); if (globalStateMachine.getCurrentState().equals(STATE_INIT)) { initLatch.countDown(); } else if (globalStateMachine.getCurrentState().equals(STATE_RUN)) { try { <START> final int numWorkersToRelease = numWorkersToSync; <END> LOG.log(Level.INFO, "Wait for driver to allow workers to enter cleanup state"); allowCleanupLatch.await(); if (numWorkersToRelease < numWorkersToSync) { LOG.log(Level.FINE, "{0} more workers are added while waiting for driver to allow cleanup", numWorkersToSync - numWorkersToRelease); if (blockedWorkerIds.size() < numWorkersToSync) { LOG.log(Level.INFO, "Cancel releasing workers," + " because there are {0} workers that do not reach the cleanup barrier", numWorkersToSync - blockedWorkerIds.size()); return; } } } catch (final InterruptedException e) { LOG.log(Level.WARNING, "Interrupted while waiting for the optimization to be done", e); } } transitState(globalStateMachine); LOG.log(Level.INFO, "Send response message to {0} blocked workers", numWorkersToSync); for (final String workerId : blockedWorkerIds) { sendResponseMessage(workerId, EMPTY_DATA); } blockedWorkerIds.clear(); } }</code><technical_language>I feel variable names a bit confusing. rename them: numWorkersToSync -> numWorkers (or numExistingWorkers/numRunningWorkers) numWorkersToRelease -> numWorkersPrev (may differ previous one) sound</technical_language>

Target:
private synchronized void tryReleaseWorkers() { if (blockedWorkerIds.size() == numWorkers) { LOG.log(Level.INFO, "Try releasing {0} blocked workers: {1}", new Object[]{numWorkers, blockedWorkerIds}); if (globalStateMachine.getCurrentState().equals(STATE_INIT)) { initLatch.countDown(); } else if (globalStateMachine.getCurrentState().equals(STATE_RUN)) { try { final int numWorkersBeforeSleep = numWorkers; LOG.log(Level.INFO, "Wait for driver to allow workers to enter cleanup state"); allowCleanupLatch.await(); final int numAddedWorkers = numWorkers - numWorkersBeforeSleep; if (numAddedWorkers > 0) { LOG.log(Level.FINE, "{0} more workers were added while waiting for driver to allow cleanup", numAddedWorkers); if (blockedWorkerIds.size() < numWorkers) { LOG.log(Level.INFO, "Cancel releasing workers" + " because we have {0} more workers that have not requested their cleanup barrier.", numWorkers - blockedWorkerIds.size()); return; } } } catch (final InterruptedException e) { LOG.log(Level.WARNING, "Interrupted while waiting for the optimization to be done", e); } } transitState(globalStateMachine); LOG.log(Level.INFO, "Send response message to {0} blocked workers: {1}", new Object[]{numWorkers, blockedWorkerIds}); for (final String workerId : blockedWorkerIds) { sendResponseMessage(workerId, EMPTY_DATA); } blockedWorkerIds.clear(); } }
Source:
<code>protected final boolean canHandleFileExtension(@Nullable String fileExtension) { <START> return "zip".equalsIgnoreCase(fileExtension); <END> }</code><technical_language>suggestion return FILE_EXTENSION_ZIP.equalsIgnoreCase(fileExtension);</technical_language>

Target:
protected final boolean canHandleFileExtension(@Nullable String fileExtension) { return FILE_EXTENSION_ZIP.equalsIgnoreCase(fileExtension); }
Source:
<code>public static Coder getCoder(CoderType type) { switch (type) { case RESULT: <START> return new HBaseResultCoder(); <END> case RESULT_ARRAY: return new HBaseResultArrayCoder(); default: throw new IllegalArgumentException("Can't get a coder for type: " + type.name()); } }</code><technical_language>reuse instances? justified if getCoder is frequently called</technical_language>

Target:
public static Coder getCoder(CoderType type) { switch (type) { case RESULT: return HBaseResultCoder.getInstance(); case RESULT_ARRAY: return HBaseResultArrayCoder.getInstance(); default: throw new IllegalArgumentException("Can't get a coder for type: " + type.name()); } }
Source:
<code>private void fillReplacerProperties(Node node, Properties properties) { YamlMapping propertiesMapping = asMapping(((ElementAdapter) node).getYamlNode()); for (YamlNameNodePair childNodePair : propertiesMapping.childrenPairs()) { String childName = childNodePair.nodeName(); YamlNode child = childNodePair.childNode(); if (child != null) { Object nodeValue = asScalar(child).nodeValue(); properties.put(childName, nodeValue != null ? nodeValue.toString() : ""); } else { <START> properties.put(childName, ""); <END> } } }</code><technical_language>of tests cover this line</technical_language>

Target:
private void fillReplacerProperties(Node node, Properties properties) { YamlMapping propertiesMapping = getWrappedYamlMapping(node); for (YamlNameNodePair childNodePair : propertiesMapping.childrenPairs()) { String childName = childNodePair.nodeName(); YamlNode child = childNodePair.childNode(); Object nodeValue = asScalar(child).nodeValue(); properties.put(childName, nodeValue != null ? nodeValue.toString() : ""); } }
Source:
<code><START> public void testDirValidation() throws Exception { <END> CommandStringBuilder csb = new CommandStringBuilder(CliStrings.DESCRIBE_OFFLINE_DISK_STORE); csb.addOption(CliStrings.DESCRIBE_OFFLINE_DISK_STORE__DISKSTORENAME, DISK_STORE_NAME); csb.addOption(CliStrings.DESCRIBE_OFFLINE_DISK_STORE__DISKDIRS, "wrongDiskDir"); String commandString = csb.toString(); gfsh.executeAndAssertThat(commandString).statusIsError() .containsOutput("Could not find disk-dirs: \"wrongDiskDir"); }</code><technical_language>remove throws Exception thrown method body?. modifying file, also, great if remove throws Exception single method in class throws</technical_language>

Target:
public void testDirValidation() { CommandStringBuilder csb = new CommandStringBuilder(CliStrings.DESCRIBE_OFFLINE_DISK_STORE); csb.addOption(CliStrings.DESCRIBE_OFFLINE_DISK_STORE__DISKSTORENAME, DISK_STORE_NAME); csb.addOption(CliStrings.DESCRIBE_OFFLINE_DISK_STORE__DISKDIRS, "wrongDiskDir"); String commandString = csb.toString(); gfsh.executeAndAssertThat(commandString).statusIsError() .containsOutput("Could not find disk-dirs: \"wrongDiskDir"); }
Source:
<code>public void updateSchedulePlanWritesCriteria() { SchedulePlan update = SchedulePlan.create(); update.setGuid(schedulePlan.getGuid()); update.setLabel(schedulePlan.getLabel()); update.setStudyKey(schedulePlan.getStudyKey()); Schedule schedule = TestUtils.getSchedule("My Schedule"); Criteria criteria = TestUtils.createCriteria(100, 200, ALL_OF_GROUPS, NONE_OF_GROUPS); criteria.setKey("scheduleCriteria:"+schedulePlan.getGuid()+":0"); CriteriaScheduleStrategy strategy = new CriteriaScheduleStrategy(); ScheduleCriteria scheduleCriteria = new ScheduleCriteria(schedule, criteria); strategy.getScheduleCriteria().add(scheduleCriteria); update.setStrategy(strategy); ArgumentCaptor<Criteria> criteriaCaptor = ArgumentCaptor.forClass(Criteria.class); SchedulePlan updated = dao.updateSchedulePlan(TEST_STUDY, update); strategy = (CriteriaScheduleStrategy)updated.getStrategy(); <START> strategy.getScheduleCriteria().get(0).getCriteria(); <END> scheduleCriteria = strategy.getScheduleCriteria().get(0); Criteria returnedCriteria = scheduleCriteria.getCriteria(); assertEquals(new Integer(100), returnedCriteria.getMinAppVersion(IOS)); assertEquals(new Integer(200), returnedCriteria.getMaxAppVersion(IOS)); verify(criteriaDao).createOrUpdateCriteria(criteriaCaptor.capture()); Criteria updatedCriteria = criteriaCaptor.getValue(); assertEquals(new Integer(100), updatedCriteria.getMinAppVersion(IOS)); assertEquals(new Integer(200), updatedCriteria.getMaxAppVersion(IOS)); }</code><technical_language>Nitpick: Dangling code line</technical_language>

Target:
public void updateSchedulePlanWritesCriteria() { mockSchedulePlanQuery(); SchedulePlan update = SchedulePlan.create(); update.setGuid(schedulePlan.getGuid()); update.setLabel(schedulePlan.getLabel()); update.setStudyKey(schedulePlan.getStudyKey()); Schedule schedule = TestUtils.getSchedule("My Schedule"); Criteria criteria = TestUtils.createCriteria(100, 200, ALL_OF_GROUPS, NONE_OF_GROUPS); criteria.setKey("scheduleCriteria:"+schedulePlan.getGuid()+":0"); CriteriaScheduleStrategy strategy = new CriteriaScheduleStrategy(); ScheduleCriteria scheduleCriteria = new ScheduleCriteria(schedule, criteria); strategy.getScheduleCriteria().add(scheduleCriteria); update.setStrategy(strategy); ArgumentCaptor<Criteria> criteriaCaptor = ArgumentCaptor.forClass(Criteria.class); SchedulePlan updated = dao.updateSchedulePlan(TEST_STUDY, update); strategy = (CriteriaScheduleStrategy)updated.getStrategy(); scheduleCriteria = strategy.getScheduleCriteria().get(0); Criteria returnedCriteria = scheduleCriteria.getCriteria(); assertEquals(new Integer(100), returnedCriteria.getMinAppVersion(IOS)); assertEquals(new Integer(200), returnedCriteria.getMaxAppVersion(IOS)); verify(criteriaDao).createOrUpdateCriteria(criteriaCaptor.capture()); Criteria updatedCriteria = criteriaCaptor.getValue(); assertEquals(new Integer(100), updatedCriteria.getMinAppVersion(IOS)); assertEquals(new Integer(200), updatedCriteria.getMaxAppVersion(IOS)); }
Source:
<code>public void testPermissionsForAddingTemplateDedicatedHostNotChanged(){ setupDedicatedHostForVmAndTemplate(true); List<PermissionSubject> permissionCheckSubjects = cmd.getPermissionCheckSubjects(); for(PermissionSubject permissionSubject : permissionCheckSubjects){ <START> assertFalse(ActionGroup.EDIT_ADMIN_TEMPLATE_PROPERTIES.equals(permissionSubject.getActionGroup())); <END> } }</code><technical_language>==</technical_language>

Target:
public void testPermissionsForAddingTemplateDedicatedHostNotChanged(){ setupDedicatedHostForVmAndTemplate(true); List<PermissionSubject> permissionCheckSubjects = cmd.getPermissionCheckSubjects(); for(PermissionSubject permissionSubject : permissionCheckSubjects){ assertFalse(ActionGroup.EDIT_ADMIN_TEMPLATE_PROPERTIES == permissionSubject.getActionGroup()); } }
Source:
<code><START> private static Limiter<Void> newLimiter() { <END> return DefaultLimiter.newBuilder() .limit(TracingLimitDecorator.wrap(AIMDLimit.newBuilder().initialLimit(1).build())) .build(new SimpleStrategy<>()); }</code><technical_language>inline in ConcurrencyLimiter constructor</technical_language>

Target:
private Limiter<Void> newLimiter() { Limiter<Void> limiter = new InstrumentedLimiter(SimpleLimiter.newBuilder() .limit(new RemotingWindowedLimit(VegasLimit.newDefault())) .build(), slowAcquire); return RemotingBlockingLimiter.wrap(limiter, timeout); }
Source:
<code>protected List<Image> execute(ListImagesCmd command) { WebTarget webTarget = getBaseResource().path("/images/json"); webTarget = booleanQueryParam(webTarget, "all", command.hasShowAllEnabled()); if (command.getFilters() != null) <START> webTarget = webTarget.queryParam("filters", urlPathSegmentEscaper().escape(command.getFilters())); <END> LOGGER.trace("GET: {}", webTarget); List<Image> images = webTarget.request().accept(MediaType.APPLICATION_JSON) .get(new TypeReference<List<Image>>() { }).awaitResult(); LOGGER.trace("Response: {}", images); return images; }</code><technical_language>{}</technical_language>

Target:
protected List<Image> execute(ListImagesCmd command) { WebTarget webTarget = getBaseResource().path("/images/json"); webTarget = booleanQueryParam(webTarget, "all", command.hasShowAllEnabled()); if (command.getFilters() != null) { webTarget = webTarget.queryParam("filters", urlPathSegmentEscaper().escape(command.getFilters())); } LOGGER.trace("GET: {}", webTarget); List<Image> images = webTarget.request().accept(MediaType.APPLICATION_JSON) .get(new TypeReference<List<Image>>() { }); LOGGER.trace("Response: {}", images); return images; }