auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public long toBytes() { double bytes = getValue(Unit.BYTE); Preconditions.checkArgument(bytes <= Long.MAX_VALUE, "size is too large to be represented in requested unit as a long"); return (long) bytes; }

Target:
public long toBytes() { double bytes = getValue(Unit.BYTE); Preconditions.checkState(bytes <= Long.MAX_VALUE, "size is too large to be represented in bytes as a long"); return (long) bytes; }
Source:
private boolean deQueueAction(ContainerPlacementRequestMessage requestMessage) { if (hasActiveContainerPlacementAction(requestMessage.getProcessorId())) { return false; } if (!samzaApplicationState.runningProcessors.containsKey(requestMessage.getProcessorId()) || samzaApplicationState.pendingProcessors.containsKey(requestMessage.getProcessorId())) { return false; } return true; }

Target:
private boolean deQueueAction(ContainerPlacementRequestMessage requestMessage) { if (hasActiveContainerPlacementAction(requestMessage.getProcessorId())) { LOG.info("ContainerPlacement request: is en-queued because container has an in-progress placement action", requestMessage); return false; } if (!samzaApplicationState.runningProcessors.containsKey(requestMessage.getProcessorId()) || samzaApplicationState.pendingProcessors.containsKey(requestMessage.getProcessorId())) { LOG.info("ContainerPlacement request: is en-queued because container is pending start", requestMessage); return false; } return true; }
Source:
private void buildCharacters(String pattern) { codePointSet = new HashSet<>(); codePointList = new ArrayList<>(); for (String subPattern : pattern.substring(1, pattern.length() - 1).split("\\|")) { if (isInterval(subPattern)) { String[] startEnd = subPattern.split("-"); Integer start = getCodePointAt(startEnd[0].substring(1)); Integer end = getCodePointAt(startEnd[1].substring(0, startEnd[1].length() - 1)); for (int i = start; i <= end; i++) { fillSetAndList(i, subPattern); } } else { Integer codePoint = getCodePointAt(subPattern); fillSetAndList(codePoint, subPattern); } } }

Target:
private void buildCharacters(String pattern) { for (String subPattern : pattern.substring(1, pattern.length() - 1).split("\\|")) { if (isInterval(subPattern)) { String[] startEnd = subPattern.split("-"); Integer start = getCodePointAt(startEnd[0].substring(1)); Integer end = getCodePointAt(startEnd[1].substring(0, startEnd[1].length() - 1)); for (int i = start; i <= end; i++) { fillSetAndList(i, subPattern); } } else { Integer codePoint = getCodePointAt(subPattern); fillSetAndList(codePoint, subPattern); } } }
Source:
public void get_schema() { Configuration configuration = new Configuration(new H2Templates()); configuration.registerSchemaOverride("public", "pub"); configuration.registerTableOverride("employee", "emp"); configuration.registerTableOverride("public", "employee", "employees"); assertEquals("pub", configuration.getOverride(new SchemaAndTable("public", "")).getSchema()); assertEquals("emp", configuration.getOverride(new SchemaAndTable("", "employee")).getTable()); assertEquals("employees", configuration.getOverride(new SchemaAndTable("public", "employee")).getTable()); configuration.setDynamicNameMapping(new ChangeCaseNameMapping(LetterCase.UPPER)); String notDirectOverriden = "notDirectOverriden"; assertEquals(notDirectOverriden.toUpperCase(), configuration.getOverride(new SchemaAndTable("public", notDirectOverriden)).getTable()); }

Target:
public void get_schema() { Configuration configuration = new Configuration(new H2Templates()); configuration.registerSchemaOverride("public", "pub"); configuration.registerTableOverride("employee", "emp"); configuration.registerTableOverride("public", "employee", "employees"); assertEquals("pub", configuration.getOverride(new SchemaAndTable("public", "")).getSchema()); assertEquals("emp", configuration.getOverride(new SchemaAndTable("", "employee")).getTable()); assertEquals("employees", configuration.getOverride(new SchemaAndTable("public", "employee")).getTable()); configuration.setDynamicNameMapping(new PreConfiguredNameMapping()); SchemaAndTable notOverriddenSchemaAndTable = new SchemaAndTable("notoverridden", "notoverridden"); assertEquals(notOverriddenSchemaAndTable, configuration.getOverride(notOverriddenSchemaAndTable)); configuration.setDynamicNameMapping(new ChangeLetterCaseNameMapping(LetterCase.UPPER, Locale.ENGLISH)); String notDirectOverriden = "notDirectOverriden"; assertEquals(notDirectOverriden.toUpperCase(Locale.ENGLISH), configuration.getOverride(new SchemaAndTable("public", notDirectOverriden)).getTable()); }
Source:
public boolean exists( String fileSystem, String path ) { PathMap pathMap = getPathMap( fileSystem, path ); if ( pathMap != null ) { return true; } return false; }

Target:
public boolean exists( String fileSystem, String path ) { return getPathMap( fileSystem, path ) != null; }
Source:
public void validate() throws Exception { boolean contactPhotoFound = false; for (int attachmentIndex = 0; attachmentIndex < this.getAddedItems() .size(); attachmentIndex++) { Attachment attachment = this.getAddedItems().get(attachmentIndex); if (attachment != null && attachment.isNew()) { if (this.owner.isNew() && this.owner.getService().getRequestedServerVersion() .ordinal() >= ExchangeVersion.Exchange2010_SP2 .ordinal()) { if (attachment instanceof FileAttachment) { FileAttachment fileAttachment = (FileAttachment) attachment; if (fileAttachment.isContactPhoto()) { if (contactPhotoFound) { throw new ServiceValidationException( Strings.MultipleContactPhotosInAttachment); } contactPhotoFound = true; } } } attachment.validate(attachmentIndex); } } }

Target:
public void validate() throws Exception { if (this.owner.isNew() && this.owner.getService().getRequestedServerVersion() .ordinal() >= ExchangeVersion.Exchange2010_SP2 .ordinal()) { boolean contactPhotoFound = false; for (int attachmentIndex = 0; attachmentIndex < this.getAddedItems() .size(); attachmentIndex++) { final Attachment attachment = this.getAddedItems().get(attachmentIndex); if (attachment != null && attachment.isNew() && attachment instanceof FileAttachment) { if (((FileAttachment) attachment).isContactPhoto()) { if (contactPhotoFound) { throw new ServiceValidationException( Strings.MultipleContactPhotosInAttachment); } contactPhotoFound = true; } } attachment.validate(attachmentIndex); } } }
Source:
public void testPrependsCorrectName() throws NoSuchMethodException { final TemplateEngine original = mock(TemplateEngine.class); final StatementContext ctx = mock(StatementContext.class); final String template = UUID.randomUUID().toString(); final String originalRendered = UUID.randomUUID().toString(); final ExtensionMethod extensionMethod = new ExtensionMethod(MyDao.class, MyDao.class.getMethod("myDbCall")); when(ctx.getExtensionMethod()).thenReturn(extensionMethod); when(original.render(template, ctx)).thenReturn(originalRendered); final NamePrependingTemplateEngine sut = new NamePrependingTemplateEngine(original); final String result = sut.render(template, ctx); assertThat(result).containsSequence( " ", originalRendered); }

Target:
public void testPrependsCorrectName() throws NoSuchMethodException { final ExtensionMethod extensionMethod = new ExtensionMethod(MyDao.class, MyDao.class.getMethod("myDbCall")); when(ctx.getExtensionMethod()).thenReturn(extensionMethod); final String result = sut.render(TEMPLATE, ctx); assertThat(result).containsSequence( " ", ORIGINAL_RENDERED); }
Source:
public static SshConnection getConnection(String host, int port, String proxy, Authentication authentication) throws IOException { return getConnection(host, port, proxy, authentication, null, 0); }

Target:
public static SshConnection getConnection(String host, int port, String proxy, Authentication authentication) throws IOException { return getConnection(host, port, proxy, authentication, null, GerritDefaultValues.DEFAULT_GERRIT_SSH_CONNECTION_TIMEOUT); }
Source:
protected void initFrontend() { super.initFrontend(); Frontend.setLoginHandler(new FrontendLoginHandler() { @Override public void onLoginSuccess(String userName, String password, String domain) { acquireRestApiSession(Base64Utils.getBasicAuthString(userName, password, domain)); } @Override public void onLogout() { releaseRestApiSession(); } }); }

Target:
protected void initFrontend() { super.initFrontend(); Frontend.setLoginHandler(new FrontendLoginHandler() { @Override public void onLoginSuccess(final String userName, final String password, final String domain) { Scheduler.get().scheduleDeferred(new ScheduledCommand() { @Override public void execute() { final String domainToken = "@"; restApiSessionManager.acquireSession( userName.contains(domainToken) ? userName : userName + domainToken + domain, password); } }); } @Override public void onLogout() { restApiSessionManager.releaseSession(); } }); }
Source:
public void updatePhysics(GlowBlock me) { me.getWorld().requestPulse(me, 2); }

Target:
public void updatePhysics(GlowBlock me) { super.updatePhysics(me); me.getWorld().requestPulse(me, 2); }
Source:
private static void assertFunctionEquals(BiFunction<Object, Object, Boolean> isEqual, String testDescription, Object expectedValue, Object actualValue) { StringBuilder sb = new StringBuilder(); if (testDescription != null) { sb.append(String.format("Test: %s, ", testDescription)); } sb.append(String.format("Expected: %s, actual: %s", expectedValue, actualValue)); assertTrue(isEqual.apply(actualValue, expectedValue), sb.toString()); }

Target:
private static void assertFunctionEquals(BiFunction<Object, Object, Boolean> isEqual, String testDescription, Object expectedValue, Object actualValue) { if (!isEqual.apply(actualValue, expectedValue)) { StringBuilder sb = new StringBuilder(); if (testDescription != null) { sb.append(String.format("Test: %s, ", testDescription)); } sb.append(String.format("Expected: %s, actual: %s", expectedValue, actualValue)); fail(sb.toString()); } }
Source:
public void testOTAPublicRelease() { BaseResourceTestHelper.stubGetClientDetails(this.oAuthTokenStore, Optional.of(BaseResourceTestHelper.getAccessToken())); BaseResourceTestHelper.stubKeyFromKeyStore(this.keyStore, SENSE_ID, Optional.of(KEY)); BaseResourceTestHelper.stubGetHeader(this.httpServletRequest, HelloHttpHeader.SENSE_ID, SENSE_ID); stubGetUserInfo(this.mergedUserInfoDynamoDB, userInfoList); stubGetFeatureActive(featureFlipper, FeatureFlipper.ENABLE_OTA_UPDATES, Collections.EMPTY_LIST, true); stubGetFeatureActive(featureFlipper, FeatureFlipper.OTA_RELEASE, Collections.EMPTY_LIST, true); stubGetOTAWindowStart(otaConfiguration, 11); stubGetOTAWindowEnd(otaConfiguration, 20); stubGetPopulatedFirmwareFileListForGroup(this.firmwareUpdateStore, FeatureFlipper.OTA_RELEASE, FIRMWARE_VERSION, fileList); final long unixTime = new Date().getTime() / 1000L; final byte[] data = this.receiveResource.receiveBatchSenseData(generateValidProtobufWithSignature(KEY, 3600, FIRMWARE_VERSION, (int)unixTime)); final byte[] protobufBytes = Arrays.copyOfRange(data, 16 + 32, data.length); final OutputProtos.SyncResponse syncResponse; try { syncResponse = OutputProtos.SyncResponse.parseFrom(protobufBytes); assertThat(syncResponse.hasResetMcu(), is(true)); assertThat(syncResponse.getFilesCount(), is(1)); } catch (InvalidProtocolBufferException e) { e.printStackTrace(); assertThat(true, is(false)); } }

Target:
public void testOTAPublicRelease() { BaseResourceTestHelper.stubGetClientDetails(oAuthTokenStore, Optional.of(BaseResourceTestHelper.getAccessToken())); BaseResourceTestHelper.stubKeyFromKeyStore(keyStore, SENSE_ID, Optional.of(KEY)); BaseResourceTestHelper.stubGetHeader(httpServletRequest, HelloHttpHeader.SENSE_ID, SENSE_ID); stubGetUserInfo(mergedUserInfoDynamoDB, userInfoList); stubGetFeatureActive(featureFlipper, FeatureFlipper.ENABLE_OTA_UPDATES, Collections.EMPTY_LIST, true); stubGetFeatureActive(featureFlipper, FeatureFlipper.OTA_RELEASE, Collections.EMPTY_LIST, true); stubGetOTAWindowStart(otaConfiguration, 11); stubGetOTAWindowEnd(otaConfiguration, 20); stubGetPopulatedFirmwareFileListForGroup(firmwareUpdateStore, FeatureFlipper.OTA_RELEASE, FIRMWARE_VERSION, fileList); final long unixTime = DateTime.now().withZone(userTimeZone).getMillis() / 1000L; final byte[] data = receiveResource.receiveBatchSenseData(generateValidProtobufWithSignature(KEY, 3600, FIRMWARE_VERSION, (int)unixTime)); final byte[] protobufBytes = Arrays.copyOfRange(data, 16 + 32, data.length); final OutputProtos.SyncResponse syncResponse; try { syncResponse = OutputProtos.SyncResponse.parseFrom(protobufBytes); assertThat(syncResponse.hasResetMcu(), is(true)); assertThat(syncResponse.getResetMcu(), is(false)); assertThat(syncResponse.getFilesCount(), is(1)); } catch (InvalidProtocolBufferException e) { e.printStackTrace(); assertThat(true, is(false)); } }
Source:
private void executeTool(Connection conn, ConnectionQueryServices queryServices, Configuration conf) { LOGGER.info("Executing "+ operation); for (Map.Entry<String, ArrayList<String>> entry: tablesAndIndexes.entrySet()) { String dataTableFullName = entry.getKey(); ArrayList<String> indexes = entry.getValue(); try (Admin admin = queryServices.getAdmin()) { PTable dataTable = PhoenixRuntime.getTableNoCache(conn, dataTableFullName); LOGGER.fine("Executing "+operation+" for " + dataTableFullName); boolean mutable = !(dataTable.isImmutableRows()); if (upgrade) { setCompactionEnabled(admin, entry, false); checkAndWaitForMajorCompaction(admin, entry); disableTable(admin, entry); modifyIndexTable(admin, indexes); if (mutable) { modifyDataTable(admin, dataTableFullName); } enableTable(admin, entry); rebuildIndexes(entry, conf); setCompactionEnabled(admin, entry, true); } else { disableTable(admin, entry); if(mutable) { modifyDataTable(admin, dataTableFullName); } modifyIndexTable(admin, indexes); enableTable(admin, entry); } } catch (IOException | SQLException e) { LOGGER.severe("Something went wrong while executing "+operation+" steps " + e); } } }

Target:
private int executeTool(Connection conn, ConnectionQueryServices queryServices, Configuration conf) { LOGGER.info("Executing " + operation); List<Integer> statusList = tablesAndIndexes.entrySet().parallelStream().map(entry -> { String dataTableFullName = entry.getKey(); HashSet<String> indexes = entry.getValue(); try (Admin admin = queryServices.getAdmin()) { PTable dataTable = PhoenixRuntime.getTableNoCache(conn, dataTableFullName); LOGGER.fine("Executing " + operation + " for " + dataTableFullName); boolean mutable = !(dataTable.isImmutableRows()); if (!mutable) { LOGGER.fine("Data table is immutable, waiting for " + GLOBAL_INDEX_CHECKER_ENABLED_MAP_EXPIRATION_MIN + 1 + " minutes for client cache to expire"); if (!test) { Thread.sleep( (GLOBAL_INDEX_CHECKER_ENABLED_MAP_EXPIRATION_MIN + 1) * 60 * 1000); } } disableTable(admin, dataTableFullName, indexes); modifyTable(admin, dataTableFullName, indexes); enableTable(admin, dataTableFullName, indexes); if (upgrade) { rebuildIndexes(dataTableFullName, conf); } } catch (IOException | SQLException | InterruptedException e) { LOGGER.severe("Something went wrong while executing " + operation + " steps " + e); return -1; } return 0; }).collect(Collectors.toList()); return statusList.parallelStream().anyMatch(p -> p == -1) ? -1 : 0; }
Source:
public Image getColumnImage(final Object element, final int columnIndex) { if (columnIndex == 0) { final FileDiff c = (FileDiff) element; switch (c.getChange()) { case ADD: return getDecoratedImage(getEditorImage(c), UIIcons.OVR_STAGED_ADD); case COPY: return COPY; case DELETE: return getDecoratedImage(getEditorImage(c), UIIcons.OVR_STAGED_REMOVE); case RENAME: case MODIFY: return getEditorImage(c); } } return null; }

Target:
public Image getColumnImage(final Object element, final int columnIndex) { if (columnIndex == 0) { final FileDiff c = (FileDiff) element; switch (c.getChange()) { case ADD: return getDecoratedImage(getEditorImage(c), UIIcons.OVR_STAGED_ADD); case DELETE: return getDecoratedImage(getEditorImage(c), UIIcons.OVR_STAGED_REMOVE); case COPY: case RENAME: case MODIFY: return getEditorImage(c); } } return null; }
Source:
protected boolean isVersionSupportedForShareable() { return getStoragePool() != null ?Config.<Boolean> GetValue(ConfigValues.ShareableDiskEnabled, getStoragePool().getcompatibility_version().getValue()) : true; }

Target:
protected boolean isVersionSupportedForShareable() { if (getParameters().getDiskInfo().getDiskStorageType() == DiskStorageType.IMAGE) { return Config.<Boolean> GetValue(ConfigValues.ShareableDiskEnabled, getStoragePool().getcompatibility_version().getValue()); } return true; }
Source:
public void testDelimitedRecords() throws Exception { DelimitedApplication app = new DelimitedApplication(); LocalMode lma = LocalMode.newInstance(); Configuration conf = new Configuration(false); conf.set("dt.operator.HDFSRecordReaderModule.prop.files", inputDir); conf.set("dt.operator.HDFSRecordReaderModule.prop.blocksThreshold", "1"); conf.set("dt.operator.HDFSRecordReaderModule.prop.scanIntervalMillis", "10000"); lma.prepareDAG(app, conf); LocalMode.Controller lc = lma.getController(); lc.setHeartbeatMonitoringEnabled(true); lc.run(10 * 1000); LOG.debug("Waiting for app to finish"); Thread.sleep(1000 * 1); lc.shutdown(); Set<String> expectedRecords = new HashSet<String>(Arrays.asList(FILE_1_DATA.split("\n"))); expectedRecords.addAll(Arrays.asList(FILE_2_DATA.split("\n"))); Assert.assertEquals(expectedRecords, DelimitedValidator.records); }

Target:
public void testDelimitedRecords() throws Exception { DelimitedApplication app = new DelimitedApplication(); LocalMode lma = LocalMode.newInstance(); Configuration conf = new Configuration(false); conf.set("dt.operator.HDFSRecordReaderModule.prop.files", inputDir); conf.set("dt.operator.HDFSRecordReaderModule.prop.blocksThreshold", "1"); conf.set("dt.operator.HDFSRecordReaderModule.prop.scanIntervalMillis", "10000"); lma.prepareDAG(app, conf); LocalMode.Controller lc = lma.getController(); lc.setHeartbeatMonitoringEnabled(true); lc.runAsync(); Set<String> expectedRecords = new HashSet<String>(Arrays.asList(FILE_1_DATA.split("\n"))); expectedRecords.addAll(Arrays.asList(FILE_2_DATA.split("\n"))); while (DelimitedValidator.records.size() != expectedRecords.size()) { LOG.debug("Waiting for app to finish"); Thread.sleep(1000); } lc.shutdown(); Assert.assertEquals(expectedRecords, DelimitedValidator.records); }
Source:
void onWordCount() { totalWords = 0; selectionWords = 0; Position pos = docDisplay_.getCursorPosition(); TextFileType fileType = docDisplay_.getFileType(); Iterable<Range> wordSource = docDisplay_.getWords( fileType.getTokenPredicate(), docDisplay_.getFileType().getCharPredicate(), pos, null); totalWords = 0; wordSource.forEach((r) -> totalWords++); Range selectionRange = docDisplay_.getSelectionRange(); if (selectionRange.getStart().compareTo(selectionRange.getEnd()) != 0) { wordSource = docDisplay_.getWords( fileType.getTokenPredicate(), docDisplay_.getFileType().getCharPredicate(), docDisplay_.getSelectionStart(), docDisplay_.getSelectionEnd()); selectionWords = 0; wordSource.forEach((r) -> selectionWords++); } String selectedWordsText = selectionWords == 0 ? "" : "\nSelected words: " + selectionWords; globalDisplay_.showMessage(MessageDisplay.MSG_INFO, "Word Count", "Total words: " + totalWords + " " + selectedWordsText); }

Target:
void onWordCount() { int totalWords = 0; int selectionWords = 0; Range selectionRange = docDisplay_.getSelectionRange(); TextFileType fileType = docDisplay_.getFileType(); Iterator<Range> wordIter = docDisplay_.getWords( fileType.getTokenPredicate(), docDisplay_.getFileType().getCharPredicate(), Position.create(0, 0), null).iterator(); while (wordIter.hasNext()) { Range r = wordIter.next(); totalWords++; if (selectionRange.intersects(r)) selectionWords++; } String selectedWordsText = selectionWords == 0 ? "" : "\nSelected words: " + selectionWords; globalDisplay_.showMessage(MessageDisplay.MSG_INFO, "Word Count", "Total words: " + totalWords + " " + selectedWordsText); }
Source:
public static void setUp() { try { final URL location = FileLocator.find(TmfCoreTestPlugin.getDefault().getBundle(), new Path(TEST_TRACE.getFullPath()), null); final File test = new File(FileLocator.toFileURL(location).toURI()); fTrace = new TmfTraceStub(test.toURI().getPath(), ITmfTrace.DEFAULT_TRACE_CACHE_SIZE, false, null); TmfSignalManager.deregister(fTrace); fTrace.indexTrace(true); } catch (final TmfTraceException | URISyntaxException | IOException e) { fail(e.toString()); } }

Target:
public static void setUp() { try { final URL location = FileLocator.find(TmfCoreTestPlugin.getDefault().getBundle(), new Path(TEST_TRACE.getFullPath()), null); final File test = new File(FileLocator.toFileURL(location).toURI()); fTrace = new TmfTraceStub(test.toURI().getPath(), ITmfTrace.DEFAULT_TRACE_CACHE_SIZE, false, null); TmfSignalManager.deregister(fTrace); fTrace.indexTrace(true); } catch (final TmfTraceException | URISyntaxException | IOException e) { e.printStackTrace(); fail("Error setting up test trace"); } }
Source:
public void handleLevelChunk(ClientboundLevelChunkPacket clientboundLevelChunkPacket, CallbackInfo ci) { ci.cancel(); PacketUtils.ensureRunningOnSameThread(clientboundLevelChunkPacket, (ClientPacketListener)(Object)this, this.minecraft); int chunkX = clientboundLevelChunkPacket.getX(); int chunkZ = clientboundLevelChunkPacket.getZ(); @SuppressWarnings("ConstantConditions") ColumnBiomeContainer biomeContainer = new ColumnBiomeContainer(minecraft.level.registryAccess().registryOrThrow(Registry.BIOME_REGISTRY), new int[ColumnBiomeContainer.BIOMES_SIZE]); biomeContainer.setLevel(minecraft.level); LevelChunk levelChunk = this.level.getChunkSource().replaceWithPacketData(chunkX, chunkZ, biomeContainer, clientboundLevelChunkPacket.getReadBuffer(), clientboundLevelChunkPacket.getHeightmaps(), clientboundLevelChunkPacket.getAvailableSections()); for (int k = this.level.getMinSection(); k < this.level.getMinSection() - 1; ++k) { this.level.setSectionDirtyWithNeighbors(chunkX, k, chunkZ); } if (levelChunk != null) { for (CompoundTag compoundTag : clientboundLevelChunkPacket.getBlockEntitiesTags()) { BlockPos blockPos = new BlockPos(compoundTag.getInt("x"), compoundTag.getInt("y"), compoundTag.getInt("z")); BlockEntity blockEntity = levelChunk.getBlockEntity(blockPos, LevelChunk.EntityCreationType.IMMEDIATE); if (blockEntity != null) { blockEntity.load(compoundTag); } } } }

Target:
public void handleLevelChunk(ClientboundLevelChunkPacket clientboundLevelChunkPacket, CallbackInfo ci) { ci.cancel(); PacketUtils.ensureRunningOnSameThread(clientboundLevelChunkPacket, (ClientPacketListener)(Object)this, this.minecraft); int chunkX = clientboundLevelChunkPacket.getX(); int chunkZ = clientboundLevelChunkPacket.getZ(); @SuppressWarnings("ConstantConditions") ColumnBiomeContainer biomeContainer = new ColumnBiomeContainer(minecraft.level.registryAccess().registryOrThrow(Registry.BIOME_REGISTRY), level); this.level.getChunkSource().replaceWithPacketData(chunkX, chunkZ, biomeContainer, clientboundLevelChunkPacket.getReadBuffer(), clientboundLevelChunkPacket.getHeightmaps(), clientboundLevelChunkPacket.getAvailableSections()); }
Source:
public final boolean removedByPlayer(IBlockState state, World world, BlockPos pos, EntityPlayer player, boolean willHarvest) { RayTraceResult hit = reTraceAll(world, pos, player); if (hit instanceof RayTraceResult) { IMicroblockContainerTile tile = getMicroblockTile(world, pos); if (tile != null) { tile.getMicroblockContainer().getPartContainer().harvest(player, (RayTraceResult) hit); } return false; } else { IMicroblockContainerTile tile = getMicroblockTile(world, pos); MultipartContainer container = tile != null ? tile.getMicroblockContainer().getPartContainer() : null; if (container.getParts().isEmpty()) { return removedByPlayerDefault(state, world, pos, player, willHarvest); } else { if (!removedByPlayerDefault(state, world, pos, player, willHarvest)) { return false; } world.removeTileEntity(pos); if (!world.setBlockState(pos, ForgeMultipart.multipart.getDefaultState(), 0)) { return false; } world.removeTileEntity(pos); world.setTileEntity(pos, new TileMultipartContainer(container)); world.notifyBlockUpdate(pos, state, ForgeMultipart.multipart.getDefaultState(), 0); harvestingWrapper = true; if (!player.capabilities.isCreativeMode) { harvestBlock(world, player, pos, world.getBlockState(pos), world.getTileEntity(pos), player.getActiveItemStack()); } harvestingWrapper = false; return false; } } }

Target:
public final boolean removedByPlayer(IBlockState state, World world, BlockPos pos, EntityPlayer player, boolean willHarvest) { RayTraceResult hit = reTraceAll(world, pos, player); if (hit.partHit != null) { IMicroblockContainerTile tile = getMicroblockTile(world, pos); if (tile != null) { tile.getMicroblockContainer().getPartContainer().harvest(player, (RayTraceResult) hit); } return false; } else { IMicroblockContainerTile tile = getMicroblockTile(world, pos); MultipartContainer container = tile != null ? tile.getMicroblockContainer().getPartContainer() : null; if (container.getParts().isEmpty()) { return removedByPlayerDefault(state, world, pos, player, willHarvest); } else { if (!removedByPlayerDefault(state, world, pos, player, willHarvest)) { return false; } if (!world.setBlockState(pos, ForgeMultipartModContainer.multipart.getDefaultState(), 0)) { return false; } world.removeTileEntity(pos); world.setTileEntity(pos, new TileMultipartContainer(container)); world.notifyBlockUpdate(pos, state, ForgeMultipartModContainer.multipart.getDefaultState(), 0); harvestingWrapper = true; if (!player.capabilities.isCreativeMode) { harvestBlock(world, player, pos, world.getBlockState(pos), world.getTileEntity(pos), player.getActiveItemStack()); } harvestingWrapper = false; return false; } } }
Source:
private PGPSecretKey findSecretKeyInLegacySecring(String signingkey, Path secringFile) throws IOException, PGPException { try (InputStream in = newInputStream(secringFile)) { PGPSecretKeyRingCollection pgpSec = new PGPSecretKeyRingCollection( PGPUtil.getDecoderStream(new BufferedInputStream(in)), new JcaKeyFingerprintCalculator()); Iterator<PGPSecretKeyRing> keyrings = pgpSec.getKeyRings(); while (keyrings.hasNext()) { PGPSecretKeyRing keyRing = keyrings.next(); Iterator<PGPSecretKey> keys = keyRing.getSecretKeys(); while (keys.hasNext()) { PGPSecretKey key = keys.next(); String fingerprint = Hex .toHexString(key.getPublicKey().getFingerprint()); if (fingerprint.endsWith(signingkey)) { return key; } Iterator<String> userIDs = key.getUserIDs(); while (userIDs.hasNext()) { String userId = userIDs.next(); if (userId.toLowerCase() .contains(signingKey.toLowerCase())) { return key; } } } } } throw new PGPException( "gpg failed to find secret-key which matches provided keyID: " + signingkey); }

Target:
private PGPSecretKey findSecretKeyInLegacySecring(String signingkey, Path secringFile) throws IOException, PGPException { try (InputStream in = newInputStream(secringFile)) { PGPSecretKeyRingCollection pgpSec = new PGPSecretKeyRingCollection( PGPUtil.getDecoderStream(new BufferedInputStream(in)), new JcaKeyFingerprintCalculator()); Iterator<PGPSecretKeyRing> keyrings = pgpSec.getKeyRings(); while (keyrings.hasNext()) { PGPSecretKeyRing keyRing = keyrings.next(); Iterator<PGPSecretKey> keys = keyRing.getSecretKeys(); while (keys.hasNext()) { PGPSecretKey key = keys.next(); String fingerprint = Hex .toHexString(key.getPublicKey().getFingerprint()); if (fingerprint.endsWith(signingkey)) { return key; } Iterator<String> userIDs = key.getUserIDs(); while (userIDs.hasNext()) { String userId = userIDs.next(); if (containsSigningKey(userId)) { return key; } } } } } throw new PGPException(MessageFormat .format(JGitText.get().gpgNoSecretKeyFound, signingKey)); }
Source:
public ServiceLoaderSupplier(final Class<E> service, final ClassLoader classLoader) { this.service = service; this.classLoader = classLoader; this.acc = (System.getSecurityManager() != null) ? AccessController.getContext() : null; }

Target:
public ServiceLoaderSupplier(final Class<E> service, final ClassLoader classLoader) { this.service = service; this.classLoader = classLoader; this.acc = AccessController.getContext() ; }
Source:
private void updateAccount(final String selector, final Account account) { final SqlSession session = sessions.openSession(); try { session.update(selector, toMap(account)); session.commit(); } finally { session.close(); } Iterator<AuthToken> iterator = account.getAuthToken().iterator(); while(iterator.hasNext()){ AuthToken token = iterator.next(); System.out.println("Updating Account tokens token:"+token); addAuthToken(new AuthToken(account.getSid(), token.getAuthToken(), token.getDescription())); } }

Target:
private void updateAccount(final String selector, final Account account) { final SqlSession session = sessions.openSession(); try { session.update(selector, toMap(account)); session.commit(); } finally { session.close(); } Iterator<AuthToken> iterator = account.getAuthToken().iterator(); while(iterator.hasNext()){ AuthToken token = iterator.next(); addAuthToken(new AuthToken(account.getSid(), token.getAuthToken(), token.getDescription())); } }
Source:
public ValidationResult networkNameNotUsed() { for (Network otherNetwork : getNetworks()) { if (otherNetwork.getName().equals(network.getName()) && !otherNetwork.getId().equals(network.getId())) { return new ValidationResult(VdcBllMessages.ACTION_TYPE_FAILED_NETWORK_NAME_IN_USE, String.format("$NetworkName %s", network.getName())); } } return ValidationResult.VALID; }

Target:
public ValidationResult networkNameNotUsed() { for (Network otherNetwork : getNetworks()) { if (otherNetwork.getName().equals(network.getName()) && !otherNetwork.getId().equals(network.getId())) { return new ValidationResult(VdcBllMessages.ACTION_TYPE_FAILED_NETWORK_NAME_IN_USE, getNetworkNameReplacement()); } } return ValidationResult.VALID; }
Source:
public List<SMREntry> current() { ILogData data = streamView.current(); if (data == null || data.getType() != DataType.DATA || !(data.getPayload(runtime) instanceof ISMRConsumable)) { return new ArrayList<>(); } return ((ISMRConsumable) data.getPayload(runtime)).getSMRUpdates(streamView.getId()); }

Target:
public List<SMREntry> current() { ILogData data = streamView.current(); if (data == null || data.getType() != DataType.DATA || !(data.getPayload(runtime) instanceof ISMRConsumable)) { return Collections.emptyList(); } return ((ISMRConsumable) data.getPayload(runtime)).getSMRUpdates(streamView.getId()); }
Source:
private static Map<String, String> readPairs(byte[] buff, int start, int end) throws TException { Map<String, String> headers = new HashMap<>(); int i = start; while (i < end) { try { int nameSize = ProtocolUtils.readInt(buff, i); i += 4; if (i > end || i + nameSize > end) { throw new FProtocolException(TProtocolException.INVALID_DATA, "invalid protocol header name"); } byte[] nameBuff = Arrays.copyOfRange(buff, i, nameSize + i); i += nameSize; String name = new String(nameBuff, "UTF-8"); int valueSize = ProtocolUtils.readInt(buff, i); i += 4; if (i > end || i + valueSize > end) { throw new FProtocolException(FProtocolException.INVALID_DATA, "invalid protocol header value"); } byte[] valueBuff = Arrays.copyOfRange(buff, i, valueSize + i); i += valueSize; String value = new String(valueBuff, "UTF-8"); headers.put(name, value); } catch (IOException e) { throw new FProtocolException(FProtocolException.UNKNOWN, "could not read header bytes", e); } } return headers; }

Target:
private static Map<String, String> readPairs(byte[] buff, int start, int end) throws TException { Map<String, String> headers = new HashMap<>(); int i = start; while (i < end) { try { int nameSize = ProtocolUtils.readInt(buff, i); i += 4; if (i > end || i + nameSize > end) { throw new FProtocolException(TProtocolException.INVALID_DATA, "invalid protocol header name"); } byte[] nameBuff = Arrays.copyOfRange(buff, i, nameSize + i); i += nameSize; String name = new String(nameBuff, "UTF-8"); int valueSize = ProtocolUtils.readInt(buff, i); i += 4; if (i > end || i + valueSize > end) { throw new FProtocolException(FProtocolException.INVALID_DATA, "invalid protocol header value"); } byte[] valueBuff = Arrays.copyOfRange(buff, i, valueSize + i); i += valueSize; String value = new String(valueBuff, "UTF-8"); headers.put(name, value); } catch (IOException e) { throw new TTransportException(FProtocolException.UNKNOWN, "could not read header bytes", e); } } return headers; }
Source:
void drawDirection(final Canvas canvas, final MapProjectionImpl projection) { if (currentCoords == null) { return; } if (!Settings.isMapDirection()) { return; } if (linePaint == null) { linePaint = new Paint(); linePaint.setAntiAlias(true); linePaint.setStrokeWidth(width); linePaint.setStyle(Paint.Style.STROKE); linePaint.setColor(0xD0EB391E); } final Geopoint[] routingPoints = Routing.getTrack(currentCoords, destinationCoords); final ArrayList<Point> pixelPoints = new ArrayList<>(); for (final Geopoint geopoint : routingPoints) { pixelPoints.add(translateToPixels(projection, geopoint)); } CanvasUtils.drawPath(pixelPoints, canvas, linePaint); }

Target:
void drawDirection(final Canvas canvas, final MapProjectionImpl projection) { if (currentCoords == null) { return; } if (!Settings.isMapDirection()) { return; } if (linePaint == null) { linePaint = new Paint(); linePaint.setAntiAlias(true); linePaint.setStrokeWidth(width); linePaint.setStyle(Paint.Style.STROKE); linePaint.setColor(0xD0EB391E); } final Geopoint[] routingPoints = Routing.getTrack(currentCoords, destinationCoords); final ArrayList<Point> pixelPoints = new ArrayList<>(routingPoints.length); for (final Geopoint geopoint : routingPoints) { pixelPoints.add(translateToPixels(projection, geopoint)); } CanvasUtils.drawPath(pixelPoints, canvas, linePaint); }
Source:
public SequencerPartitionContainer saveSequencerPartitionContainer(SequencerPartitionContainer container) throws IOException { if (sequencerPartitionContainerStore != null) { if (container.getId() == SequencerPartitionContainerImpl.UNSAVED_ID) { container.setSecurityProfile(securityProfileStore.get(securityProfileStore.save(container.getSecurityProfile()))); container.setPlatform(platformStore.get(container.getPlatform().getId())); container.setLastModifier(securityStore.getUserById(getCurrentUser().getUserId())); Date now = new Date(); if (container.getCreationTime() == null) { container.setCreationTime(now); container.setLastModified(now); } else if (container.getLastModified() == null) { container.setLastModified(now); } return sequencerPartitionContainerStore.save(container); } else { SequencerPartitionContainer managed = getSequencerPartitionContainerById(container.getId()); updateContainer(container, managed); managed.setLastModifier(securityStore.getUserById(getCurrentUser().getUserId())); managed.setLastModified(new Date()); return sequencerPartitionContainerStore.save(managed); } } else { throw new IOException("No sequencerPartitionContainerStore available. Check that it has been declared in the Spring config."); } }

Target:
public SequencerPartitionContainer saveSequencerPartitionContainer(SequencerPartitionContainer container) throws IOException { if (sequencerPartitionContainerStore != null) { if (container.getId() == SequencerPartitionContainerImpl.UNSAVED_ID) { container.setSecurityProfile(securityProfileStore.get(securityProfileStore.save(container.getSecurityProfile()))); container.setPlatform(platformStore.get(container.getPlatform().getId())); container.setLastModifier(securityStore.getUserById(getCurrentUser().getUserId())); Date now = new Date(); if (container.getCreationTime() == null) { container.setCreationTime(now); container.setCreator(securityStore.getUserById(getCurrentUser().getUserId())); container.setLastModified(now); } else if (container.getLastModified() == null) { container.setLastModified(now); } return sequencerPartitionContainerStore.save(container); } else { SequencerPartitionContainer managed = getSequencerPartitionContainerById(container.getId()); updateContainer(container, managed); managed.setLastModifier(securityStore.getUserById(getCurrentUser().getUserId())); managed.setLastModified(new Date()); return sequencerPartitionContainerStore.save(managed); } } else { throw new IOException("No sequencerPartitionContainerStore available. Check that it has been declared in the Spring config."); } }
Source:
public Access authorize( AuthenticationResult authenticationResult, Resource resource, Action action ) { if (authenticationResult == null) { return new Access(false); } String identity = null; if (remapAuthNames) { String authorizationName = dbConnector.getAuthorizationNameFromAuthenticationName( authenticationResult.getIdentity() ); if (authorizationName == null) { return new Access(false); } else { identity = authorizationName; } } else { identity = authenticationResult.getIdentity(); } List<Map<String, Object>> permissions = dbConnector.getPermissionsForUser(identity); for (Map<String, Object> permission : permissions) { if (permissionCheck(resource, action, permission)) { return new Access(true); } } return new Access(false); }

Target:
public Access authorize( AuthenticationResult authenticationResult, Resource resource, Action action ) { if (authenticationResult == null) { throw new IAE("WTF? authenticationResult should never be null."); } List<Map<String, Object>> permissions = dbConnector.getPermissionsForUser(dbConfig.getDbPrefix(), authenticationResult.getIdentity()); for (Map<String, Object> permission : permissions) { if (permissionCheck(resource, action, permission)) { return new Access(true); } } return new Access(false); }
Source:
private TableViewerColumn createTableViewerColumn(String title, int bound, final int colIndex, final PerfDiffTableSorter tableSorter, final Table table) { final TableViewerColumn viewerColumn = new TableViewerColumn( tableviewer, SWT.NONE); final TableColumn column = viewerColumn.getColumn(); column.setText(title); column.setWidth(bound); column.setResizable(true); column.setMoveable(true); column.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent e) { tableSorter.setColumnIndex(colIndex); int dir = table.getSortDirection(); if (table.getSortColumn() == column) { dir = (dir == SWT.UP) ? SWT.DOWN : SWT.UP; } else { dir = SWT.DOWN; } table.setSortDirection(dir); table.setSortColumn(column); tableviewer.refresh(); } }); return viewerColumn; }

Target:
private TableViewerColumn createTableViewerColumn(String title, int bound, final int colIndex, final PerfDiffTableSorter tableSorter, final Table table) { final TableViewerColumn viewerColumn = new TableViewerColumn( tableviewer, SWT.NONE); final TableColumn column = viewerColumn.getColumn(); column.setText(title); column.setWidth(bound); column.setResizable(true); column.setMoveable(true); column.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { tableSorter.setColumnIndex(colIndex); int dir = table.getSortDirection(); if (table.getSortColumn() == column) { dir = (dir == SWT.UP) ? SWT.DOWN : SWT.UP; } else { dir = SWT.DOWN; } table.setSortDirection(dir); table.setSortColumn(column); tableviewer.refresh(); } }); return viewerColumn; }
Source:
@Test public void decorateSimpleRabbitListenerContainerFactory_appends_as_first_when_absent() { SimpleRabbitListenerContainerFactory factory = new SimpleRabbitListenerContainerFactory(); factory.setAdviceChain(new CacheInterceptor()); assertThat(rabbitTracing.decorateSimpleRabbitListenerContainerFactory(factory).getAdviceChain()) .hasSize(2) .matches(adviceArray -> asList(adviceArray).get(0) instanceof TracingRabbitListenerAdvice); }

Target:
@Test public void decorateSimpleRabbitListenerContainerFactory_appends_as_first_when_absent() { SimpleRabbitListenerContainerFactory factory = new SimpleRabbitListenerContainerFactory(); factory.setAdviceChain(new CacheInterceptor()); assertThat(rabbitTracing.decorateSimpleRabbitListenerContainerFactory(factory).getAdviceChain()) .hasSize(2) .matches(adviceArray -> adviceArray[0] instanceof TracingRabbitListenerAdvice); }
Source:
public List subList(int fromIndex, int toIndex) { if (fromIndex < 0) { throw new IndexOutOfBoundsException("fromIndex = " + fromIndex); } if (fromIndex > toIndex) { throw new IllegalArgumentException("fromIndex(" + fromIndex + ") > toIndex(" + toIndex + ")"); } if (fromIndex == toIndex) { return new EmptyRange(from); } final Iterator it = iterator(); Object toValue = it.next(); int i = 0; for (; i < fromIndex; i++) { if (!it.hasNext()) { throw new IndexOutOfBoundsException("Index: " + i + " is too big for range: " + this); } toValue = it.next(); } final Object fromValue = toValue; for (; i < toIndex - 1; i++) { if (!it.hasNext()) { throw new IndexOutOfBoundsException("Index: " + i + " is too big for range: " + this); } toValue = it.next(); } return new ObjectRange((Comparable) fromValue, (Comparable) toValue, reverse); }

Target:
public List<Comparable> subList(int fromIndex, int toIndex) { if (fromIndex < 0) { throw new IndexOutOfBoundsException("fromIndex = " + fromIndex); } if (fromIndex > toIndex) { throw new IllegalArgumentException("fromIndex(" + fromIndex + ") > toIndex(" + toIndex + ")"); } if (fromIndex == toIndex) { return new EmptyRange<Comparable>(from); } final Iterator<Comparable> iter = new LazySteppingIterator(this, 1); Comparable toValue = iter.next(); int i = 0; for (; i < fromIndex; i++) { if (!iter.hasNext()) { throw new IndexOutOfBoundsException("Index: " + i + " is too big for range: " + this); } toValue = iter.next(); } final Comparable fromValue = toValue; for (; i < toIndex - 1; i++) { if (!iter.hasNext()) { throw new IndexOutOfBoundsException("Index: " + i + " is too big for range: " + this); } toValue = iter.next(); } return new ObjectRange(fromValue, toValue, reverse); }
Source:
public Set<String> getSupportedExtensions() { return supportedExts; }

Target:
public Set<String> getSupportedExtensions() { return null; }
Source:
public static <I, O> LazyMapList<I, O> of(List<I> list, Function<? super I, ? extends O> mapper) { if (!(list instanceof RandomAccess)) { throw new IllegalArgumentException( "The argument of the List type must support " + "fast (generally constant time) random access."); } return new LazyMapList<>(list, mapper); }

Target:
public static <I, O> LazyMapList<I, O> of(List<I> list, Function<? super I, ? extends O> mapper) { return new LazyMapList<>(list, mapper); }
Source:
public CallEnv(Env caller, Continuation returnAddress, SourceLocation loc, int localsCount) { this.caller = caller; this.returnAddress = returnAddress; this.callSiteLoc = loc; this.invoker = caller==null ? Invoker.INSTANCE : caller.getInvoker(); assert returnAddress!=null; if (localsCount <= 0) { types = Collections.EMPTY_MAP; } else { types = Maps.newHashMapWithExpectedSize(localsCount); } depth = (caller instanceof DepthTrackingEnv) ? depth = ((DepthTrackingEnv) caller).getDepth() + 1 : 1; if (depth > DepthTrackingEnv.MAX_LEGAL_DEPTH) { throw new StackOverflowError("Excessively nested blocks/function calls exceed limit of"+DepthTrackingEnv.MAX_LEGAL_DEPTH+":"+depth); } }

Target:
public CallEnv(Env caller, Continuation returnAddress, SourceLocation loc, int localsCount) { this.caller = caller; this.returnAddress = returnAddress; this.callSiteLoc = loc; this.invoker = caller==null ? Invoker.INSTANCE : caller.getInvoker(); assert returnAddress!=null; if (localsCount <= 0) { types = Collections.EMPTY_MAP; } else { types = Maps.newHashMapWithExpectedSize(localsCount); } depth = (caller instanceof DepthTrackingEnv) ? ((DepthTrackingEnv) caller).getDepth() + 1 : 1; }
Source:
public void handlePersistForm(MotechEvent event) { Map<String, Object> params = event.getParameters(); String title = (String) params.get(EventParameters.FORM_TITLE); String configName = (String) params.get(EventParameters.CONFIGURATION_NAME); String instanceId = (String) params.get(EventParameters.INSTANCE_ID); if (title != null && configName != null && instanceId != null) { if (formInstanceService.getByInstanceId(instanceId) != null) { LOGGER.error("Form Instance with ID: " + instanceId + " already exists. Discarding form instance data"); } else { LOGGER.debug("Saving form instance.Title: " + title + " ConfigName: " + configName + " Instance ID: " + instanceId); FormDefinition formDefinition = formDefinitionService.findByConfigurationNameAndTitle(configName, title); if (formDefinition != null) { FormInstanceBuilder builder = new FormInstanceBuilder(formDefinition, params, instanceId); FormInstance instance = builder.build(); formInstanceService.create(instance); } } } }

Target:
public void handlePersistForm(MotechEvent event) { Map<String, Object> params = event.getParameters(); String title = (String) params.get(EventParameters.FORM_TITLE); String configName = (String) params.get(EventParameters.CONFIGURATION_NAME); String instanceId = (String) params.get(EventParameters.INSTANCE_ID); if (title != null && configName != null && instanceId != null) { if (formInstanceService.getByInstanceId(instanceId) != null) { LOGGER.error("Form Instance with ID: " + instanceId + " already exists. Discarding form instance data"); } else { FormDefinition formDefinition = formDefinitionService.findByConfigurationNameAndTitle(configName, title); if (formDefinition != null) { persistFormInstance(formDefinition, params, instanceId); } else { LOGGER.error("Unable to save form. Form definition does not exist. Configuration name: " + configName + " Title: " + title); } } } else { LOGGER.error("Unable to save form. Event is missing required parameters", event); } }
Source:
public void init() { try { log.info("Search using solr on: "+ getSolrUrl()); } catch (IllegalStateException e) { log.error(e.getMessage()); } }

Target:
public void init() { try { String url = getSolrUrl(); log.info("Search using solr on: "+ url); } catch (IllegalStateException e) { log.error(e.getMessage()); } }
Source:
protected void tearDown() throws Exception { super.tearDown(); for (File file : toDelete) delete(file); toDelete.clear(); FailingMetadataRepositoryFactory.FAIL = false; }

Target:
protected void tearDown() throws Exception { super.tearDown(); for (File file : toDelete) { delete(file); } toDelete.clear(); FailingMetadataRepositoryFactory.FAIL = false; }
Source:
public void testCSVBundle() throws Exception { ServiceReference refs[] = m_bundle.getRegisteredServices(); ServiceReference<AbstractFormatterFactory> reference = refs[0]; AbstractFormatterFactory o = m_bundle.getBundleContext().getService(reference); Properties prop = new Properties(); prop.setProperty("format", "csv"); AbstractFormatter formatter = o.create(prop); Object[] results = formatter.transform("12,10.05,test"); assertEquals(results.length, 3); }

Target:
public void testCSVBundle() throws Exception { ServiceReference refs[] = m_bundle.getRegisteredServices(); ServiceReference<AbstractFormatterFactory> reference = refs[0]; AbstractFormatterFactory o = m_bundle.getBundleContext().getService(reference); Properties prop = new Properties(); Formatter formatter = o.create("csv", prop); Object[] results = formatter.transform("12,10.05,test"); assertEquals(results.length, 3); assertEquals(results[0], "12"); assertEquals(results[1], "10.05"); assertEquals(results[2], "test"); }