auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public static String getSamples() throws RuntimeException { Configuration conf = new Configuration(); Class klass = conf.getClass(); <START> klass.getDeclaredMethods(); <END> StringBuilder b = new StringBuilder(); b.append("Configuration examples:\n"); b.append("\n"); String sample = conf.getXMLRepresentationAsString(); b.append("<!-- Sample empty configuration.xml -->\n"); b.append(sample); b.append("\n"); List<Method> mthds = getSetters(klass); for (Method mthd : mthds) { conf = new Configuration(); Object defaultValue = getDefaultValue(klass, mthd, conf); conf = new Configuration(); Object sampleValue = getSampleValue(mthd, defaultValue); if (sampleValue == null) continue; try { mthd.invoke(conf, sampleValue); } catch (IllegalAccessException|IllegalArgumentException| InvocationTargetException ex) { throw new RuntimeException("error setting sample value for " + mthd); } sample = conf.getXMLRepresentationAsString(); sample = sample.replaceFirst( "(?sx)^<\\?xml.*Configuration\\d*\">\\n", ""); sample = sample.replaceFirst("</object>\\n</java>", ""); b.append(" <!-- Sample for "); b.append(mthd.getName()); b.append(". Default is: "); b.append(defaultValue); b.append(" -->"); b.append("\n"); b.append(sample); } return b.toString(); }</code><technical_language>This throw returned array of Method objects. Is this necessary</technical_language>

Target:
public static String getSamples() throws RuntimeException { Configuration conf = new Configuration(); Class klass = conf.getClass(); StringBuilder b = new StringBuilder(); b.append("Configuration examples:\n"); b.append("\n"); String sample = conf.getXMLRepresentationAsString(); b.append("<!-- Sample empty configuration.xml -->\n"); b.append(sample); b.append("\n"); List<Method> mthds = getSetters(klass); for (Method mthd : mthds) { conf = new Configuration(); Object defaultValue = getDefaultValue(klass, mthd, conf); conf = new Configuration(); Object sampleValue = getSampleValue(mthd, defaultValue); if (sampleValue == null) continue; try { mthd.invoke(conf, sampleValue); } catch (IllegalAccessException|IllegalArgumentException| InvocationTargetException ex) { throw new RuntimeException("error setting sample value for " + mthd); } sample = conf.getXMLRepresentationAsString(); sample = sample.replaceFirst( "(?sx)^<\\?xml.*Configuration\\d*\">\\n", ""); sample = sample.replaceFirst("</object>\\n</java>", ""); b.append(" <!-- Sample for "); b.append(mthd.getName()); b.append(". Default is: "); b.append(defaultValue); b.append(" -->"); b.append("\n"); b.append(sample); } return b.toString(); }
Source:
<code>public HttpResponse doClear() throws IOException { Jenkins.getInstance().checkPermission(Jenkins.ADMINISTER); <START> LOGGER.info("Called clearing..."); <END> clear(); return HttpResponses.redirectViaContextPath("/manage"); }</code><technical_language>suggestion</technical_language>

Target:
public HttpResponse doClear() throws IOException { Jenkins.getInstance().checkPermission(Jenkins.ADMINISTER); clear(); return HttpResponses.redirectViaContextPath("/manage"); }
Source:
<code>public void tick() { <START> if (hurtTime <= 0 && TitleMenu.difficulty.difficultyName != MojamComponent.texts.getStatic("diffselect.nightmare")) { <END> if (health < maxHealth) { if (--healingTime <= 0) { ++health; healingTime = HEALING_INTERVAL; } } } if (hurtTime > 0) { hurtTime--; } if (bounceWallTime > 0) { bounceWallTime--; } if (freezeTime > 0) { slideMove(xSlide, ySlide); xSlide *= 0.8; ySlide *= 0.8; if (xBump != 0 || yBump != 0) { move(xBump, yBump); } freezeTime--; return; } else { xSlide = ySlide = 0; if (health <= 0) { die(); remove(); return; } } }</code><technical_language>This work check current difficulty level</technical_language>

Target:
public void tick() { if (hurtTime > 0) { hurtTime--; } if (bounceWallTime > 0) { bounceWallTime--; } if (freezeTime > 0) { slideMove(xSlide, ySlide); xSlide *= 0.8; ySlide *= 0.8; if (xBump != 0 || yBump != 0) { move(xBump, yBump); } freezeTime--; return; } else { xSlide = ySlide = 0; if (health <= 0) { die(); remove(); return; } } }
Source:
<code>public void testNetworksConnectContainerShouldFailIfContainerNotRunning() throws Exception { assumeTrue("Docker API should be at least v1.21 to support Container Creation with " + "HostConfig, got " + sut.version().apiVersion(), compareVersion(sut.version().apiVersion(), "1.21") >= 0); assumeFalse(CIRCLECI); final String networkName = randomName(); final String containerName = randomName(); final NetworkCreation networkCreation = sut.createNetwork(NetworkConfig.builder().name(networkName).build()); assertThat(networkCreation.id(), is(notNullValue())); final ContainerConfig containerConfig = ContainerConfig.builder().image(BUSYBOX_LATEST).cmd("sh", "-c", "echo hello").build(); final ContainerCreation containerCreation = sut.createContainer(containerConfig, containerName); assertThat(containerCreation.id(), is(notNullValue())); try { sut.connectToNetwork(containerCreation.id(), networkCreation.id()); fail("Expected to throw DockerException"); } catch (DockerException e) { <START> assertThat(e.getMessage(), containsString("is not running")); <END> } finally { sut.removeContainer(containerCreation.id()); sut.removeNetwork(networkCreation.id()); } }</code><technical_language>ExpectedException perhaps</technical_language>

Target:
public void testNetworksConnectContainerShouldFailIfContainerNotRunning() throws Exception { assumeTrue("Docker API should be at least v1.21 to support Container Creation with " + "HostConfig, got " + sut.version().apiVersion(), compareVersion(sut.version().apiVersion(), "1.21") >= 0); assumeFalse(CIRCLECI); final String networkName = randomName(); final String containerName = randomName(); final NetworkCreation networkCreation = sut.createNetwork(NetworkConfig.builder().name(networkName).build()); assertThat(networkCreation.id(), is(notNullValue())); final ContainerConfig containerConfig = ContainerConfig.builder().image(BUSYBOX_LATEST).cmd("sh", "-c", "echo hello").build(); final ContainerCreation containerCreation = sut.createContainer(containerConfig, containerName); assertThat(containerCreation.id(), is(notNullValue())); try { exception.expect(DockerException.class); sut.connectToNetwork(containerCreation.id(), networkCreation.id()); } finally { sut.removeContainer(containerCreation.id()); sut.removeNetwork(networkCreation.id()); } }
Source:
<code>public AbstractFileSystem(IConfiguration configuration, BackupMetrics backupMetrics, BackupNotificationMgr backupNotificationMgr) { this.backupMetrics = backupMetrics; this.addObserver(backupNotificationMgr); <START> tasksQueued = new HashSet<>(configuration.getBackupQueueSize()); <END> BlockingQueue<Runnable> uploadQueue = new ArrayBlockingQueue<>(configuration.getBackupQueueSize()); PolledMeter.using(backupMetrics.getRegistry()).withName(backupMetrics.uploadQueueSize).monitorSize(uploadQueue); this.fileUploadExecutor = new BlockingSubmitThreadPoolExecutor(configuration.getBackupThreads(), uploadQueue, configuration.getUploadTimeout()); BlockingQueue<Runnable> downloadQueue = new ArrayBlockingQueue<>(configuration.getDownloadQueueSize()); PolledMeter.using(backupMetrics.getRegistry()).withName(backupMetrics.downloadQueueSize).monitorSize(downloadQueue); this.fileDownloadExecutor = new BlockingSubmitThreadPoolExecutor(configuration.getRestoreThreads(), downloadQueue, configuration.getDownloadTimeout()); }</code><technical_language>This needs a concurrent hash set. I slightly odd pre-size this (just resize automatically)</technical_language>

Target:
public AbstractFileSystem(IConfiguration configuration, BackupMetrics backupMetrics, BackupNotificationMgr backupNotificationMgr) { this.backupMetrics = backupMetrics; this.addObserver(backupNotificationMgr); tasksQueued = new ConcurrentHashMap<>().newKeySet(); BlockingQueue<Runnable> uploadQueue = new ArrayBlockingQueue<>(configuration.getBackupQueueSize()); PolledMeter.using(backupMetrics.getRegistry()).withName(backupMetrics.uploadQueueSize).monitorSize(uploadQueue); this.fileUploadExecutor = new BlockingSubmitThreadPoolExecutor(configuration.getBackupThreads(), uploadQueue, configuration.getUploadTimeout()); BlockingQueue<Runnable> downloadQueue = new ArrayBlockingQueue<>(configuration.getDownloadQueueSize()); PolledMeter.using(backupMetrics.getRegistry()).withName(backupMetrics.downloadQueueSize).monitorSize(downloadQueue); this.fileDownloadExecutor = new BlockingSubmitThreadPoolExecutor(configuration.getRestoreThreads(), downloadQueue, configuration.getDownloadTimeout()); }
Source:
<code>private TarArchive getApplicationContent(Owner owner, Libraries libraries) { File jarFile = getJarFile(); <START> ImagePackager packager = getConfiguredPackager(() -> new ImagePackager(jarFile)); <END> if (jarFile.exists()) { return TarArchive.fromZip(jarFile, owner); } return new PackagedTarArchive(owner, libraries, packager); }</code><technical_language>packager moved if jar exists already, I guess</technical_language>

Target:
private TarArchive getApplicationContent(Owner owner, Libraries libraries) { File jarFile = getJarFile(); if (jarFile.exists()) { return TarArchive.fromZip(jarFile, owner); } ImagePackager packager = getConfiguredPackager(() -> new ImagePackager(jarFile)); return new PackagedTarArchive(owner, libraries, packager); }
Source:
<code><START> public Exception staleMessageValidator() { <END> String fromState = _message.getFromState(); String toState = _message.getToState(); String partitionName = _message.getPartitionName(); String state = _currentStateDelta.getState(partitionName); Exception err = null; if (toState.equalsIgnoreCase(state)) { err = new HelixDuplicatedStateTransitionException(String .format("Partition %s current state is same as toState (%s->%s) from message.", partitionName, fromState, toState)); } else if (fromState != null && !fromState.equals("*") && !fromState.equalsIgnoreCase(state)) { err = new HelixStateMismatchException(String.format( "Current state of stateModel does not match the fromState in Message, CurrentState: %s, Message: %s->%s, Partition: %s, from: %s, to: %s", state, fromState, toState, partitionName, _message.getMsgSrc(), _message.getTgtName())); } return err; }</code><technical_language>staleMessageValidator sounds more a class/variable name. changing method name a verb style: validateStaleMessage() (it something)</technical_language>

Target:
public StaleMessageValidateResult staleMessageValidator() { String fromState = _message.getFromState(); String toState = _message.getToState(); String partitionName = _message.getPartitionName(); String state = _currentStateDelta.getState(partitionName); Exception err = null; if (toState.equalsIgnoreCase(state)) { err = new HelixDuplicatedStateTransitionException(String .format("Partition %s current state is same as toState (%s->%s) from message.", partitionName, fromState, toState)); } else if (fromState != null && !fromState.equals("*") && !fromState.equalsIgnoreCase(state)) { err = new HelixStateMismatchException(String.format( "Current state of stateModel does not match the fromState in Message, CurrentState: %s, Message: %s->%s, Partition: %s, from: %s, to: %s", state, fromState, toState, partitionName, _message.getMsgSrc(), _message.getTgtName())); } return new StaleMessageValidateResult(err); }
Source:
<code>private Union createNewUnion(ByteBuffer buf, int position, boolean isWrapped) { NativeMemory nm = getNativeMemory(buf); Memory mem = new MemoryRegion(nm, position, maxIntermediateSize); Union union = isWrapped ? (Union) SetOperation.wrap(mem) : (Union) SetOperation.builder().initMemory(mem).build(size, Family.UNION); Int2ObjectMap<Union> unionMap = unions.get(buf); if (unionMap == null) { unionMap = new Int2ObjectOpenHashMap<>(); } unionMap.put(position, union); <START> unions.put(buf, unionMap); <END> return union; }</code><technical_language>this moved line 101</technical_language>

Target:
private Union createNewUnion(ByteBuffer buf, int position, boolean isWrapped) { NativeMemory nm = getNativeMemory(buf); Memory mem = new MemoryRegion(nm, position, maxIntermediateSize); Union union = isWrapped ? (Union) SetOperation.wrap(mem) : (Union) SetOperation.builder().initMemory(mem).build(size, Family.UNION); Int2ObjectMap<Union> unionMap = unions.get(buf); if (unionMap == null) { unionMap = new Int2ObjectOpenHashMap<>(); unions.put(buf, unionMap); } unionMap.put(position, union); return union; }
Source:
<code>public static void verifyTrainingData() throws Exception { <START> verifyTrainingData(createNameSampleStream(), new BigInteger("168206908604555450993491898907821588182")); <END> }</code><technical_language>handle this introduce a method verify files recursively in a directory</technical_language>

Target:
public static void verifyTrainingData() throws Exception { verifyDirectoryChecksum(new File(getOpennlpDataDir(), "ontonotes4/data/files/data/english").toPath(), ".name", new BigInteger("74675117716526375898817028829433420680")); }
Source:
<code>public void testValidTimeRange_onlyStartTimePassed() throws Exception { <START> String args = {"--deleteall", "--starttime", "10"}; <END> runIndexTool(args, 0); Assert.assertEquals(0, countRowsInIndex()); }</code><technical_language>starttime 8 assert 1 row rebuilt</technical_language>

Target:
public void testValidTimeRange_onlyStartTimePassed() throws Exception { String args = {"--deleteall", "--starttime", "8"}; runIndexTool(args, 0); Assert.assertEquals(1, countRowsInIndex()); }
Source:
<code>public void testCfEqualityChecker() throws TException { CassandraKeyValueServiceImpl kvs; if (keyValueService instanceof CassandraKeyValueService) { kvs = getUnderlyingKvs(keyValueService); } else if (keyValueService instanceof TableSplittingKeyValueService) { KeyValueService delegate = ((TableSplittingKeyValueService) keyValueService).getDelegate(NEVER_SEEN); assertThat(delegate instanceof CassandraKeyValueService) <START> .isTrue(); <END> kvs = (CassandraKeyValueServiceImpl) delegate; } else { throw getUnrecognizedKeyValueServiceException(); } kvs.createTable(NEVER_SEEN, getMetadata()); List<CfDef> knownCfs = kvs.getClientPool().runWithRetry(client -> client.describe_keyspace(CASSANDRA.getConfig().getKeyspaceOrThrow()).getCf_defs()); CfDef clusterSideCf = Iterables.getOnlyElement(knownCfs.stream() .filter(cf -> cf.getName().equals(getInternalTestTableName())) .collect(Collectors.toList())); assertThat( ColumnFamilyDefinitions.isMatchingCf( kvs.getCfForTable(NEVER_SEEN, getMetadata(), FOUR_DAYS_IN_SECONDS), clusterSideCf)) .isTrue(); }</code><technical_language>nit: AssertJ offers assertions: assertThat(delegate).isInstanceOf(CassandraKeyValueService.class);</technical_language>

Target:
public void testCfEqualityChecker() throws TException { CassandraKeyValueServiceImpl kvs; if (keyValueService instanceof CassandraKeyValueService) { kvs = getUnderlyingKvs(keyValueService); } else if (keyValueService instanceof TableSplittingKeyValueService) { KeyValueService delegate = ((TableSplittingKeyValueService) keyValueService).getDelegate(NEVER_SEEN); assertThat(delegate) .as("The nesting of Key Value Services has apparently changed") .isInstanceOf(CassandraKeyValueService.class); kvs = (CassandraKeyValueServiceImpl) delegate; } else { throw getUnrecognizedKeyValueServiceException(); } kvs.createTable(NEVER_SEEN, getMetadata()); List<CfDef> knownCfs = kvs.getClientPool().runWithRetry(client -> client.describe_keyspace(CASSANDRA.getConfig().getKeyspaceOrThrow()).getCf_defs()); CfDef clusterSideCf = Iterables.getOnlyElement(knownCfs.stream() .filter(cf -> cf.getName().equals(getInternalTestTableName())) .collect(Collectors.toList())); assertThat( ColumnFamilyDefinitions.isMatchingCf( kvs.getCfForTable(NEVER_SEEN, getMetadata(), FOUR_DAYS_IN_SECONDS), clusterSideCf)) .as("After serialization and deserialization to database, Cf metadata did not match.") .isTrue(); }
Source:
<code>public BronKerboschCliqueFinder(Graph<V> graph, long timeout, TimeUnit unit) { this.graph = Objects.requireNonNull(graph, "Graph cannot be null"); <START> if (timeout == 0L) { <END> this.nanos = Long.MAX_VALUE; } else { this.nanos = unit.toNanos(timeout); } if (this.nanos < 1L) { throw new IllegalArgumentException("Invalid timeout, must be positive"); } this.timeLimitReached = false; }</code><technical_language>timeout zero a special for infinity, if is eliminate it, code clearer</technical_language>

Target:
public BronKerboschCliqueFinder(Graph<V> graph, long timeout, TimeUnit unit) { this.graph = requireNonNull(graph, "Graph cannot be null"); if (timeout < 1L) { throw new IllegalArgumentException("Invalid timeout, must be positive!"); } this.nanos = unit.toNanos(timeout); }
Source:
<code>public void run() { try { permits.acquire(); run(batch); } catch (Exception e) { permits.release(); log.error("Aggregation will be aborted due to an unexpected error", e); <START> taskTracker.abort("Aborting aggregation due to an unexpected error: " + e.getMessage()); <END> } }</code><technical_language>Yea, not. assuming running CQL command "stuck" lines</technical_language>

Target:
public void run() { try { run(batch); } catch (Exception e) { log.error("Aggregation will be aborted due to an unexpected error", e); taskTracker.abort("Aborting aggregation due to an unexpected error: " + e.getMessage()); } }
Source:
<code>public String getOriginalContent() { <START> return this.nameplateContent; <END> }</code><technical_language>originalContent</technical_language>

Target:
public String getOriginalContent() { return this.originalContent; }
Source:
<code>private RestoreResult restoreAllRepositories() { final RestoreResult.Builder builder = RestoreResult.create(); final RepositoryIds existingRepositoryIds = getRepositories( true ); RepositoryIds currentRepositoryIds = null; try { closeIndices( existingRepositoryIds ); <START> while ( !clusterManager.isHealthy() ) <END> { Thread.sleep( 1000l ); } addResult( builder, doRestoreRepo( SystemConstants.SYSTEM_REPO.getId() ) ); openIndices( RepositoryIds.from( SystemConstants.SYSTEM_REPO.getId() ) ); currentRepositoryIds = getRepositories( false ); closeIndices( currentRepositoryIds ); currentRepositoryIds.forEach( ( repo ) -> addResult( builder, doRestoreRepo( repo ) ) ); return builder.build(); } catch ( InterruptedException e ) { throw Exceptions.unchecked( e ); } finally { openIndices( existingRepositoryIds ); openIndices( currentRepositoryIds ); } }</code><technical_language>while !healthy -> wait</technical_language>

Target:
private RestoreResult restoreAllRepositories() { final RepositoryIds repositoryIds = getRepositories( true ); try { closeIndices( repositoryIds ); while ( clusterManager.isHealthy() ) { LOG.info( "Waiting for cluster providers to be deactivated to initiate restore" ); Thread.sleep( 1000l ); } return doRestoreIndices( Collections.emptySet() ); } catch ( InterruptedException e ) { throw Exceptions.unchecked( e ); } finally { openIndices( repositoryIds ); } }
Source:
<code>public static void setNodeValue(NodeType node, String name, String value) { ElementParameterType property = getNodeProperty(node, name); <START> if (property != null) { property.setValue(value); } <END> }</code><technical_language>Well, work but, I understand, hide error if is. I issue is in other place. Agree</technical_language>

Target:
public static void setNodeValue(NodeType node, String name, String value) { ElementParameterType property = getNodeProperty(node, name); if (property == null) { throw new IllegalArgumentException( "The component node "+node.getComponentName()+" doesn't have the property "+name ); } property.setValue(value); }
Source:
<code>public void onPlayerTick(PlayerTickEvent evt) { if (evt.phase == Phase.START) { EntityPlayer player = evt.player; ItemStack boots = player.inventory.armorInventory.get(0); <START> boolean hasBoots = !boots.isEmpty() && boots.getItem() == ELYTRA_BOOTS; <END> IAttributeInstance elytraFlight = evt.player.getAttributeMap().getAttributeInstance(EntityPlayer.ELYTRA_FLIGHT); if (elytraFlight != null) { AttributeModifier mod = elytraFlight.getModifier(UUID_ELYTRA_BOOTS); if (mod != null) elytraFlight.removeModifier(mod); if (hasBoots) elytraFlight.applyModifier(new AttributeModifier( UUID_ELYTRA_BOOTS, "elytra_flight_boots", 1.0D, 0)); } } }</code><technical_language>This example cover damage item</technical_language>

Target:
public void onPlayerTick(PlayerTickEvent evt) { if (evt.phase == Phase.START) { EntityPlayer player = evt.player; ItemStack boots = player.inventory.armorInventory.get(0); boolean hasBoots = !boots.isEmpty() && boots.getItem() == ELYTRA_BOOTS; IAttributeInstance elytraFlight = evt.player.getAttributeMap().getAttributeInstance(EntityPlayer.ELYTRA_FLIGHT); if (elytraFlight != null) { AttributeModifier mod = elytraFlight.getModifier(UUID_ELYTRA_BOOTS); if (mod != null) elytraFlight.removeModifier(mod); if (hasBoots) { elytraFlight.applyModifier(new AttributeModifier(UUID_ELYTRA_BOOTS, "elytra_flight_boots", 1.0D, 0)); if (player.ticksExisted % 20 == 0 && player.isElytraFlying()) { boots.damageItem(1, player); } } } } }
Source:
<code>public String getQuestionResultStatisticsCsv( List<FeedbackResponseAttributes> responses, FeedbackQuestionAttributes question, FeedbackSessionResultsBundle bundle) { if (responses.isEmpty()) { return ""; } StringBuilder fragments = new StringBuilder(); Map<String, List<Integer>> optionRanks = generateOptionRanksMapping(responses); DecimalFormat df = new DecimalFormat("#.##"); for (Entry<String, List<Integer>> entry : optionRanks.entrySet()) { String option = Sanitizer.sanitizeForCsv(entry.getKey()); List<Integer> ranksAssigned = entry.getValue(); double average = computeAverage(ranksAssigned); fragments.append(option).append(',').append(df.format(average)).append(Const.EOL); } return "Option" + ", Average Rank" + Const.EOL <START> + fragments.toString() + Const.EOL; <END> }</code><technical_language>need a line break well</technical_language>

Target:
public String getQuestionResultStatisticsCsv( List<FeedbackResponseAttributes> responses, FeedbackQuestionAttributes question, FeedbackSessionResultsBundle bundle) { if (responses.isEmpty()) { return ""; } StringBuilder fragments = new StringBuilder(); Map<String, List<Integer>> optionRanks = generateOptionRanksMapping(responses); DecimalFormat df = new DecimalFormat("#.##"); for (Entry<String, List<Integer>> entry : optionRanks.entrySet()) { String option = Sanitizer.sanitizeForCsv(entry.getKey()); List<Integer> ranksAssigned = entry.getValue(); double average = computeAverage(ranksAssigned); String fragment = option + "," + df.format(average) + Const.EOL; fragments.append(fragment); } return "Option, Average Rank" + Const.EOL + fragments.toString() + Const.EOL; }
Source:
<code>protected void fillThreadSummary(final IPropertiesUpdate update, final RequestMonitor rm) { if (!fHideRunningThreadsProperty) { update.setProperty(IGdbLaunchVMConstants.PROP_THREAD_SUMMARY, null); rm.done(); return; } IProcesses processService = getServicesTracker().getService(IProcesses.class); final IContainerDMContext procDmc = findDmcInPath(update.getViewerInput(), update.getElementPath(), IContainerDMContext.class); if (processService == null || procDmc == null) { update.setStatus(DsfUIPlugin.newErrorStatus(IDsfStatusConstants.INVALID_HANDLE, "Service or handle invalid", null)); } else { processService.getProcessesBeingDebugged( procDmc, new ViewerDataRequestMonitor<IDMContext[]>(getSession().getExecutor(), update) { @Override public void handleCompleted() { IRunControl runControl = getServicesTracker().getService(IRunControl.class); if (!isSuccess() || !(getData() instanceof IExecutionDMContext[]) || runControl == null) { update.setStatus(DsfUIPlugin.newErrorStatus(IDsfStatusConstants.INVALID_HANDLE, "Unable to get threads summary", null)); rm.done(); return; } int runningCount = 0; for (IExecutionDMContext execDmc : (IExecutionDMContext[])getData()) { if (!runControl.isSuspended(execDmc) && !runControl.isStepping(execDmc)) { runningCount++; } } update.setProperty(IGdbLaunchVMConstants.PROP_THREAD_SUMMARY, <START> "(" + runningCount + " filtered running threads)"); <END> rm.done(); } }); } }</code><technical_language>I "filtered running threads" localized</technical_language>

Target:
protected void fillThreadSummary(final IPropertiesUpdate update, final RequestMonitor rm) { if (!fHideRunningThreadsProperty) { update.setProperty(IGdbLaunchVMConstants.PROP_THREAD_SUMMARY, null); rm.done(); return; } IProcesses processService = getServicesTracker().getService(IProcesses.class); final IContainerDMContext procDmc = findDmcInPath(update.getViewerInput(), update.getElementPath(), IContainerDMContext.class); if (processService == null || procDmc == null) { update.setStatus(DsfUIPlugin.newErrorStatus(IDsfStatusConstants.INVALID_HANDLE, "Service or handle invalid", null)); } else { processService.getProcessesBeingDebugged( procDmc, new ViewerDataRequestMonitor<IDMContext[]>(getSession().getExecutor(), update) { @Override public void handleCompleted() { IRunControl runControl = getServicesTracker().getService(IRunControl.class); if (!isSuccess() || !(getData() instanceof IExecutionDMContext[]) || runControl == null) { update.setStatus(DsfUIPlugin.newErrorStatus(IDsfStatusConstants.INVALID_HANDLE, "Unable to get threads summary", null)); rm.done(); return; } int runningCount = 0; for (IExecutionDMContext execDmc : (IExecutionDMContext[])getData()) { if (!runControl.isSuspended(execDmc) && !runControl.isStepping(execDmc)) { runningCount++; } } update.setProperty(IGdbLaunchVMConstants.PROP_THREAD_SUMMARY, String.format("(%d %s)", runningCount, MessagesForGdbLaunchVM.ContainerVMNode_filtered_running_threads)); rm.done(); } }); } }
Source:
<code>private static String getManifestAttributeValue(Attributes headers, String attributeName, File manifestFile) throws IOException { String location = headers.getValue("Bundle-Localization"); if (location == null || location.isEmpty()) { <START> location = "OSGI-INF/l10n/bundle.properties"; <END> } String rawValue = headers.getValue(attributeName); if (rawValue != null && !rawValue.isEmpty()) { if (rawValue.startsWith("%")) { String key = rawValue.substring(1); File l10nFile = new File(manifestFile.getParentFile().getParentFile(), location + ".properties"); if (l10nFile.exists()) { Properties properties = new Properties(); try (InputStream stream = new FileInputStream(l10nFile)) { properties.load(stream); } String translation = properties.getProperty(key); if (translation != null && !translation.isEmpty()) { return translation; } } return key; } return rawValue; } return null; }</code><technical_language>get rid of .properties here</technical_language>

Target:
private static String getManifestAttributeValue(Attributes headers, String attributeName, File manifestFile) throws IOException { String location = headers.getValue("Bundle-Localization"); if (location == null || location.isEmpty()) { location = "OSGI-INF/l10n/bundle"; } String rawValue = headers.getValue(attributeName); if (rawValue != null && !rawValue.isEmpty()) { if (rawValue.startsWith("%")) { String key = rawValue.substring(1); File l10nFile = new File(manifestFile.getParentFile().getParentFile(), location + ".properties"); if (l10nFile.exists()) { Properties properties = new Properties(); try (InputStream stream = new FileInputStream(l10nFile)) { properties.load(stream); } String translation = properties.getProperty(key); if (translation != null && !translation.isEmpty()) { return translation; } } return key; } return rawValue; } return null; }
Source:
<code>public JsonItemParser<EnrichmentTagItem> enrichmentTagItemParser() { <START> JsonItemParser<EnrichmentTagItem> sourceScJudgmentParser = new JsonItemParser<>(EnrichmentTagItem.class); <END> sourceScJudgmentParser.setCommonValidator(commonValidator); sourceScJudgmentParser.setJsonFactory(jsonFactory); return sourceScJudgmentParser; }</code><technical_language>strange name, "ScJudgment" part of item parser name</technical_language>

Target:
public JsonItemParser<EnrichmentTagItem> enrichmentTagItemParser() { JsonItemParser<EnrichmentTagItem> enrichmentTagItemParser = new JsonItemParser<>(EnrichmentTagItem.class); enrichmentTagItemParser.setCommonValidator(commonValidator); enrichmentTagItemParser.setJsonFactory(jsonFactory); return enrichmentTagItemParser; }
Source:
<code>public ProcessRecordsInput getNextResult() { if (!started) { start(); } ProcessRecordsInput result = null; try { result = getRecordsResultQueue.take(); <START> result.withCacheExitTime(Instant.now()); <END> prefetchCounters.removed(result); } catch (InterruptedException e) { log.error("Interrupted while getting records from the cache", e); } return result; }</code><technical_language>This combined previous line</technical_language>

Target:
public ProcessRecordsInput getNextResult() { if (!started) { throw new IllegalStateException("Threadpool in the cache was not started, make sure to call start on the cache"); } ProcessRecordsInput result = null; try { result = getRecordsResultQueue.take().withCacheExitTime(Instant.now()); prefetchCounters.removed(result); } catch (InterruptedException e) { log.error("Interrupted while getting records from the cache", e); } return result; }
Source:
<code>public void testSET_should_not_clearPreviousTTL_onFailure() { String key_NX = "nx_key"; String value_NX = "set only if key did not exist"; int secondsUntilExpiration = 20; SetParams setParamsEX = new SetParams(); setParamsEX.ex(secondsUntilExpiration); <START> SetParams setParamsXX = new SetParams(); setParamsXX.xx(); <END> SetParams setParamsNX = new SetParams(); setParamsNX.nx(); jedis.set(key_NX, value_NX, setParamsEX); String result_NX = jedis.set(key_NX, value_NX, setParamsNX); assertThat(result_NX).isNull(); Long result = jedis.ttl(key_NX); assertThat(result).isGreaterThan(15L); }</code><technical_language>This parameter is used</technical_language>

Target:
public void testSET_should_not_clearPreviousTTL_onFailure() { String key_NX = "nx_key"; String value_NX = "set only if key did not exist"; int secondsUntilExpiration = 20; SetParams setParamsEX = new SetParams(); setParamsEX.ex(secondsUntilExpiration); SetParams setParamsNX = new SetParams(); setParamsNX.nx(); jedis.set(key_NX, value_NX, setParamsEX); String result_NX = jedis.set(key_NX, value_NX, setParamsNX); assertThat(result_NX).isNull(); Long result = jedis.ttl(key_NX); assertThat(result).isGreaterThan(15L); }
Source:
<code>public static TimestampBoundStore create( ConnectionManager connManager, TableReference timestampTable, String tablePrefixString) { return createWithStrategy( connManager, new LegacyPhysicalBoundStoreStrategy(timestampTable, tablePrefixString), false); <START> } <END></code><technical_language>AtlasDbConstants.DEFAULT_INITIALIZE_ASYNC instead of false (and other places in this PR false)</technical_language>

Target:
public static TimestampBoundStore create( ConnectionManager connManager, TableReference timestampTable, String tablePrefixString) { return createWithStrategy( connManager, new LegacyPhysicalBoundStoreStrategy(timestampTable, tablePrefixString), AtlasDbConstants.DEFAULT_INITIALIZE_ASYNC); }
Source:
<code>protected String getApiURl() { String hostUrl = null; String appType = null; String appMode = mProperties.getProperty(APP_MODE_KEY); try { if(mCloudProps.has("url")){ <START> hostUrl = mCloudProps.getString("url"); <END> } else { JSONObject hosts = mCloudProps.getJSONObject("hosts"); if ("dev".equalsIgnoreCase(appMode)) { hostUrl = hosts.getString("debugCloudUrl"); appType = hosts.getString("debugCloudType"); } else { hostUrl = hosts.getString("releaseCloudUrl"); appType = hosts.getString("releaseCloudType"); } hostUrl = hostUrl.endsWith("/") ? hostUrl : hostUrl + "/"; if ("node".equalsIgnoreCase(appType)) { hostUrl = hostUrl + getPath(); } else { String domain = mCloudProps.getString("domain"); String appId = mProperties.getProperty(APP_ID_KEY); hostUrl = hostUrl + "box/srv/1.1/act/" + domain + "/" + appId + "/" + mRemoteAct + "/" + appId; } } FHLog.v(LOG_TAG, "act url = " + hostUrl); } catch (Exception e) { FHLog.e(LOG_TAG, e.getMessage(), e); } return hostUrl; }</code><technical_language>is "act" part of URL appended here? this include "+ getPath();" similar line 89</technical_language>

Target:
protected String getApiURl() { String hostUrl = null; String appType = null; String appMode = mProperties.getProperty(APP_MODE_KEY); try { if(mCloudProps.has("url")){ hostUrl = mCloudProps.getString("url"); appType = "node"; } else { JSONObject hosts = mCloudProps.getJSONObject("hosts"); if ("dev".equalsIgnoreCase(appMode)) { hostUrl = hosts.getString("debugCloudUrl"); appType = hosts.getString("debugCloudType"); } else { hostUrl = hosts.getString("releaseCloudUrl"); appType = hosts.getString("releaseCloudType"); } } hostUrl = hostUrl.endsWith("/") ? hostUrl : hostUrl + "/"; if ("node".equalsIgnoreCase(appType)) { hostUrl = hostUrl + getPath(); } else { String domain = mCloudProps.getString("domain"); String appId = mProperties.getProperty(APP_ID_KEY); hostUrl = hostUrl + "box/srv/1.1/act/" + domain + "/" + appId + "/" + mRemoteAct + "/" + appId; } FHLog.v(LOG_TAG, "act url = " + hostUrl); } catch (Exception e) { FHLog.e(LOG_TAG, e.getMessage(), e); } return hostUrl; }
Source:
<code>public NetworkHttpClient() { RequestConfig config = RequestConfig.custom() .setConnectTimeout(CONNECTION_TIMEOUT) .setSocketTimeout(SOCKET_TIMEOUT) .build(); Collection<Header> headers = Lists.<Header>newArrayList( new BasicHeader("X-Twilio-Client", "java-" + Twilio.VERSION), new BasicHeader(HttpHeaders.USER_AGENT, "twilio-java/" + Twilio.VERSION + " (" + Twilio.JAVA_VERSION + ")"), new BasicHeader(HttpHeaders.ACCEPT, "application/json"), new BasicHeader(HttpHeaders.ACCEPT_ENCODING, "utf-8") ); String googleAppEngineVersion = System.getProperty("com.google.appengine.runtime.version"); <START> boolean isGoogleAppEngine = googleAppEngineVersion != null && !googleAppEngineVersion.isEmpty(); <END> org.apache.http.impl.client.HttpClientBuilder clientBuilder = HttpClientBuilder.create(); if (!isGoogleAppEngine) { clientBuilder.useSystemProperties(); } clientBuilder .setConnectionManager(new PoolingHttpClientConnectionManager()) .setDefaultRequestConfig(config) .setDefaultHeaders(headers) .setMaxConnPerRoute(10); client = clientBuilder.build(); }</code><technical_language>Replace Strings.isNullOrEmpty()</technical_language>

Target:
public NetworkHttpClient() { RequestConfig config = RequestConfig.custom() .setConnectTimeout(CONNECTION_TIMEOUT) .setSocketTimeout(SOCKET_TIMEOUT) .build(); Collection<Header> headers = Lists.<Header>newArrayList( new BasicHeader("X-Twilio-Client", "java-" + Twilio.VERSION), new BasicHeader(HttpHeaders.USER_AGENT, "twilio-java/" + Twilio.VERSION + " (" + Twilio.JAVA_VERSION + ")"), new BasicHeader(HttpHeaders.ACCEPT, "application/json"), new BasicHeader(HttpHeaders.ACCEPT_ENCODING, "utf-8") ); String googleAppEngineVersion = System.getProperty("com.google.appengine.runtime.version"); boolean isNotGoogleAppEngine = Strings.isNullOrEmpty(googleAppEngineVersion); org.apache.http.impl.client.HttpClientBuilder clientBuilder = HttpClientBuilder.create(); if (isNotGoogleAppEngine) { clientBuilder.useSystemProperties(); } clientBuilder .setConnectionManager(new PoolingHttpClientConnectionManager()) .setDefaultRequestConfig(config) .setDefaultHeaders(headers) .setMaxConnPerRoute(10); client = clientBuilder.build(); }
Source:
<code><START> private String getExceptionText(Exception e) { <END> try { ByteArrayOutputStream bos = new ByteArrayOutputStream(); e.printStackTrace(new PrintStream(bos)); return new String(bos.toByteArray()); } catch (Exception ex) { return null; } }</code><technical_language>static</technical_language>

Target:
private static String getExceptionText(Exception e) { try { ByteArrayOutputStream bos = new ByteArrayOutputStream(); e.printStackTrace(new PrintStream(bos)); return new String(bos.toByteArray()); } catch (Exception ex) { return null; } }
Source:
<code>public static InputStream asInputStream(final String inputString) { <START> return IOUtils.toInputStream(Strings.nullToEmpty(inputString), StandardCharsets.UTF_8); <END> }</code><technical_language>suggestion return new ByteArrayInputStream(Strings.nullToEmpty(inputString).getBytes(StandardCharsets.UTF_8));</technical_language>

Target:
public static InputStream asInputStream(final String inputString) { return new ByteArrayInputStream( Strings.nullToEmpty(inputString).getBytes(StandardCharsets.UTF_8)); }
Source:
<code>public void clear() { if (handlerHelper == null || binder == null) { return; } if (panel != null) { <START> for (Widget widget : panel){ <END> ArrayList<InputElement> inputFields = new ArrayList<InputElement>(); ArrayList<TextAreaElement> textareaFields = new ArrayList<TextAreaElement>(); getFields(widget.getElement(),inputFields,textareaFields); for (InputElement field : inputFields) { setField(field.getId(),field.getValue()); } for (TextAreaElement field : textareaFields) { String containerId = field.getParentElement().getParentElement().getId(); String fieldId = containerId.substring(0,containerId.length() - 11); setField(fieldId,field.getValue()); } } } for (PropertyChangeUnsubscribeHandle handle : unsubscribeHandlers) { handle.unsubscribe(); } unsubscribeHandlers.clear(); formFields.clear(); fieldChangeManager.clear(); if (handlerHelper.supportsInputBinding()) { binder.unbind(); } }</code><technical_language>@Christopher-Chianelli I done in a easier that. FormHandler a formFields list contains fields form. iterate list instead of iterating elements widget. FormField elements list provide neet call fieldChangeHandler. problem in solution is assuming form elements InputElements & TextAreas necessarily that. Form Engine support a lot of complex widgets processing them</technical_language>

Target:
public void clear() { if (handlerHelper == null || binder == null) { return; } for (PropertyChangeUnsubscribeHandle handle : unsubscribeHandlers) { handle.unsubscribe(); } unsubscribeHandlers.clear(); formFields.clear(); fieldChangeManager.clear(); if (handlerHelper.supportsInputBinding()) { binder.unbind(); } }
Source:
<code>private byte getUsageCounter( long pageRef ) { <START> return (byte) (UnsafeUtil.getLongVolatile( offFilePageId( pageRef ) ) & 0x07); <END> }</code><technical_language>nice get constant for mister 0x07</technical_language>

Target:
private byte getUsageCounter( long pageRef ) { return (byte) (UnsafeUtil.getLongVolatile( offFilePageId( pageRef ) ) & MASK_USAGE_COUNT); }
Source:
<code>public void testReadLines() throws IOException { String tmpPath = System.getProperty("java.io.tmpdir"); String userName = System.getProperty("user.name"); File tmpDir = new File(tmpPath, userName); tmpDir.mkdir(); tmpDir.deleteOnExit(); Path file = Paths.get(tmpDir.getAbsolutePath(), "tmp.txt"); <START> Random rand = new Random(System.currentTimeMillis()); <END> BufferedWriter writer = Files.newBufferedWriter(file); final int nLines = 5; String[] lines = new String[nLines]; for (int i = 0; i < nLines; i++) { String line = TEST_STRING + Integer.toString(rand.nextInt(100000000)); lines[i] = line; writer.write(line); writer.newLine(); } writer.close(); file.toFile().deleteOnExit(); IterableOnceIterator<String> retLines = IOUtil.readLines(file.toFile()); Stream<String> expectedLines = Stream.of(lines); Iterator<String> itExpected = expectedLines.iterator(); while (retLines.hasNext() && itExpected.hasNext()) { Assert.assertEquals(retLines.next(), itExpected.next()); } Assert.assertFalse(retLines.hasNext()); Assert.assertFalse(itExpected.hasNext()); }</code><technical_language>true randomness in code...use a fixed seed here</technical_language>

Target:
public void testReadLines() throws IOException { final Path file = Files.createTempFile("tmp", ".txt"); file.toFile().deleteOnExit(); final int seed = 12394738; final Random rand = new Random(seed); final int nLines = 5; final List<String> lines = new ArrayList<String>(); try (final PrintWriter writer = new PrintWriter(Files.newBufferedWriter(file))) { for (int i = 0; i < nLines; i++) { final String line = TEST_STRING + Integer.toString(rand.nextInt(100000000)); lines.add(line); writer.println(line); } } final List<String> retLines = new ArrayList<String>(); IOUtil.readLines(file.toFile()).forEachRemaining(retLines::add); Assert.assertEquals(retLines, lines); }
Source:
<code>private void handleExceptionDuringHandshake(HandshakeException cause, AlertLevel level, AlertDescription description, Record record) { if (AlertLevel.FATAL.equals(level)) { if (AlertDescription.UNKNOWN_PSK_IDENTITY != description) { terminateOngoingHandshake(record.getPeerAddress(), cause, description); <START> } <END> } discardRecord(record, cause); }</code><technical_language>Add return skip discardRecord? log irritating</technical_language>

Target:
private void handleExceptionDuringHandshake(HandshakeException cause, AlertLevel level, AlertDescription description, Record record) { if (!AlertLevel.FATAL.equals(level)) { discardRecord(record, cause); return; } if (AlertDescription.UNKNOWN_PSK_IDENTITY == description) { discardRecord(record, cause); return; } terminateOngoingHandshake(record.getPeerAddress(), cause, description); }
Source:
<code><START> private FilterSet getRef() { <END> return getCheckedRef(FilterSet.class); }</code><technical_language>this is compatible</technical_language>

Target:
protected FilterSet getRef() { return getCheckedRef(FilterSet.class); }
Source:
<code>protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_new_sensor_location); button = (Button)findViewById(R.id.saveSensorLocation); buttonCancel = (Button)findViewById(R.id.saveSensorLocationCancel); sensor_location_other = (EditText) findViewById(R.id.edit_sensor_location); sensor_location_other.setEnabled(false); DontAskAgain = (CheckBox)findViewById(R.id.sensorLocationDontAskAgain); radioGroup = (RadioGroup) findViewById(R.id.myRadioGroup); addListenerOnButton(); locations = new LinkedList<Location>(); <START> locations.add(new Location("private", PRIVATE_ID)); <END> locations.add(new Location("Upper arm", 1)); locations.add(new Location("Thigh", 2)); locations.add(new Location("Belly (abdomen)", 3)); locations.add(new Location("Lower back", 4)); locations.add(new Location("buttocks", 5)); locations.add(new Location("other", OTHER_ID)); for(Location location : locations) { AddButton(location.location, location.location_id); } radioGroup.check(PRIVATE_ID); }</code><technical_language>change this text 'I dont wish share'</technical_language>

Target:
protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.activity_new_sensor_location); button = (Button)findViewById(R.id.saveSensorLocation); buttonCancel = (Button)findViewById(R.id.saveSensorLocationCancel); sensor_location_other = (EditText) findViewById(R.id.edit_sensor_location); sensor_location_other.setEnabled(false); DontAskAgain = (CheckBox)findViewById(R.id.sensorLocationDontAskAgain); radioGroup = (RadioGroup) findViewById(R.id.myRadioGroup); addListenerOnButton(); locations = new LinkedList<Location>(); locations.add(new Location("I dont wish to share", PRIVATE_ID)); locations.add(new Location("Upper arm", 1)); locations.add(new Location("Thigh", 2)); locations.add(new Location("Belly (abdomen)", 3)); locations.add(new Location("Lower back", 4)); locations.add(new Location("buttocks", 5)); locations.add(new Location("other", OTHER_ID)); for(Location location : locations) { AddButton(location.location, location.location_id); } radioGroup.check(PRIVATE_ID); }
Source:
<code>private void validateLocation(ISuspendedDMEvent suspendedEvent, String expectedFunction, String expectedFile, int expectedLine, int expectedDepth) throws Throwable { assertNotNull(suspendedEvent); assertTrue("Expected suspended event to be IMIDMEvent, but it was not.", suspendedEvent instanceof IMIDMEvent); Object miEvent = ((IMIDMEvent)suspendedEvent).getMIEvent(); <START> assertTrue("Expected mi event to be MIStoppedEvent, but it was not.", suspendedEvent instanceof IMIDMEvent); <END> MIStoppedEvent stoppedEvent = (MIStoppedEvent)miEvent; MIFrame frame = stoppedEvent.getFrame(); assertTrue("Not inside the expected function. Expected " + expectedFunction + " but got " + frame.getFunction(), frame.getFunction().endsWith(expectedFunction)); assertEquals(expectedLine, frame.getLine()); assertTrue("Not inside the expected file. Expected " + expectedFile + " but got " + frame.getFile(), frame.getFile().endsWith(expectedFile)); int newDepth = SyncUtil.getStackDepth(stoppedEvent.getDMContext()); assertEquals(expectedDepth, newDepth); checkGdbIsSuspended(); }</code><technical_language>be: assertTrue("Expected mi event MIStoppedEvent, not.", miEvent instanceof MIStoppedEvent);</technical_language>

Target:
private void validateLocation(ISuspendedDMEvent suspendedEvent, String expectedFunction, String expectedFile, int expectedLine, int expectedDepth) throws Throwable { assertNotNull(suspendedEvent); assertTrue("Expected suspended event to be IMIDMEvent, but it was not.", suspendedEvent instanceof IMIDMEvent); Object miEvent = ((IMIDMEvent)suspendedEvent).getMIEvent(); assertTrue("Expected mi event to be MIStoppedEvent, but it was not.", miEvent instanceof MIStoppedEvent); MIStoppedEvent stoppedEvent = (MIStoppedEvent)miEvent; MIFrame frame = stoppedEvent.getFrame(); assertTrue("Not inside the expected function. Expected " + expectedFunction + " but got " + frame.getFunction(), frame.getFunction().endsWith(expectedFunction)); assertEquals(expectedLine, frame.getLine()); assertTrue("Not inside the expected file. Expected " + expectedFile + " but got " + frame.getFile(), frame.getFile().endsWith(expectedFile)); int newDepth = SyncUtil.getStackDepth(stoppedEvent.getDMContext()); assertEquals(expectedDepth, newDepth); checkGdbIsSuspended(); }
Source:
<code>public void getObsByPatientId_shouldGetADefaultRepresentationOfAllObs() throws Exception { MockHttpServletRequest req = newGetRequest(getURI(), new Parameter("patient", "da7f524f-27ce-4bb2-86d6-6d1d05312bd5")); SimpleObject result = deserialize(handle(req)); List<Object> results = Util.getResultsList(result); Assert.assertNotNull(results); <START> results.get(8); <END> Assert.assertEquals(9, results.size()); Assert.assertNotNull(PropertyUtils.getProperty(result, "links")); Assert.assertNotNull(PropertyUtils.getProperty(result, "uuid")); Assert.assertNotNull(PropertyUtils.getProperty(result, "display")); }</code><technical_language>Remove this line fail assertion</technical_language>

Target:
public void getObsByPatientId_shouldGetADefaultRepresentationOfAllObs() throws Exception { MockHttpServletRequest req = newGetRequest(getURI(), new Parameter("patient", "5946f880-b197-400b-9caa-a3c661d23041")); SimpleObject result = deserialize(handle(req)); List<Object> results = Util.getResultsList(result); Assert.assertNotNull(results); Object obs = results.get(8); Assert.assertEquals(9, results.size()); Assert.assertNotNull(PropertyUtils.getProperty(obs, "links")); Assert.assertNotNull(PropertyUtils.getProperty(obs, "uuid")); Assert.assertNotNull(PropertyUtils.getProperty(obs, "display")); }
Source:
<code>public void testTaskSummaryAdmin() { final List<String> dataSets = Arrays.asList( HUMAN_TASKS_WITH_ADMIN_DATASET, HUMAN_TASKS_WITH_USER_DATASET, HUMAN_TASKS_DATASET, HUMAN_TASKS_WITH_VARIABLES_DATASET); for (final String dataSet : dataSets) { when(dataSetMock.getUUID()).thenReturn(dataSet); final TaskSummary summary; if(HUMAN_TASKS_WITH_ADMIN_DATASET.equals(dataSet)) { summary = new TaskAdminSummaryDataSetMapper().apply(dataSetMock, 0); }else { summary = new TaskSummaryDataSetMapper().apply(dataSetMock, 0); <START> } <END> assertNotNull(summary); assertEquals(HUMAN_TASKS_WITH_ADMIN_DATASET.equals(dataSet), summary.isForAdmin()); } }</code><technical_language>Indentations broken, else preceding space</technical_language>

Target:
public void testTaskSummaryAdmin() { final List<String> dataSets = Arrays.asList( HUMAN_TASKS_WITH_ADMIN_DATASET, HUMAN_TASKS_WITH_USER_DATASET, HUMAN_TASKS_DATASET, HUMAN_TASKS_WITH_VARIABLES_DATASET); for (final String dataSet : dataSets) { when(dataSetMock.getUUID()).thenReturn(dataSet); final TaskSummary summary = new TaskSummaryDataSetMapper().apply(dataSetMock, 0); assertNotNull(summary); assertEquals(HUMAN_TASKS_WITH_ADMIN_DATASET.equals(dataSet), summary.isForAdmin()); } }