auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>protected void doTest(Location loc) throws Exception { Entity testEntity = app.createAndManageChild(EntitySpec.create(EmptySoftwareProcess.class)); app.start(ImmutableList.of(loc)); <START> EntityTestUtils.assertAttributeEqualsEventually(MutableMap.of("timeout", TIMEOUT_MS), <END> testEntity, Startable.SERVICE_UP, true); SshMachineLocation sshLoc = Locations.findUniqueSshMachineLocation(testEntity.getLocations()).get(); MachineDetails machine = app.getExecutionContext() .submit(BasicMachineDetails.taskForSshMachineLocation(sshLoc)) .getUnchecked(); LOG.info("Found the following at {}: {}", loc, machine); assertNotNull(machine); OsDetails details = machine.getOsDetails(); assertNotNull(details); assertNotNull(details.getArch()); assertNotNull(details.getName()); assertNotNull(details.getVersion()); assertFalse(details.getArch().startsWith("architecture:")); assertFalse(details.getName().startsWith("name:")); assertFalse(details.getVersion().startsWith("version:")); }</code><technical_language>surprised if this takes 10 minutes - app.start() block testEntity.start completes, block for VM etc. EmptySoftwareProcess sets serviceUp based driver.isRunning, is true soon launch is called. string feelings - happy leave is</technical_language>

Target:
protected void doTest(Location loc) throws Exception { Entity testEntity = app.createAndManageChild(EntitySpec.create(EmptySoftwareProcess.class)); app.start(ImmutableList.of(loc)); EntityTestUtils.assertAttributeEqualsEventually(testEntity, Startable.SERVICE_UP, true); SshMachineLocation sshLoc = Locations.findUniqueSshMachineLocation(testEntity.getLocations()).get(); MachineDetails machine = app.getExecutionContext() .submit(BasicMachineDetails.taskForSshMachineLocation(sshLoc)) .getUnchecked(); LOG.info("Found the following at {}: {}", loc, machine); assertNotNull(machine); OsDetails details = machine.getOsDetails(); assertNotNull(details); assertNotNull(details.getArch()); assertNotNull(details.getName()); assertNotNull(details.getVersion()); assertFalse(details.getArch().startsWith("architecture:")); assertFalse(details.getName().startsWith("name:")); assertFalse(details.getVersion().startsWith("version:")); }
Source:
<code><START> static UberDocument toUberDocument(final Object object) { <END> if (object == null) { return null; } if (object instanceof UberDocument) { return (UberDocument) object; } if (object instanceof Iterable) { } else if (object instanceof Map) { } throw new IllegalArgumentException("Don't know how to handle type : " + object.getClass()); }</code><technical_language>This a leftover usage. remove it</technical_language>

Target:
static UberDocument toUberDocument(final Object object) { if (object == null) { return null; } if (object instanceof UberDocument) { return (UberDocument) object; } throw new IllegalArgumentException("Don't know how to handle type : " + object.getClass()); }
Source:
<code>public void selectMultiFilesByShiftKeyWithCheckMultiselection( String clickItemPath, List<String> selectedItemsPaths) { Actions actions = actionsFactory.createAction(seleniumWebDriver); <START> actions.keyDown(Keys.SHIFT).perform(); <END> selectItem(clickItemPath); waitAllItemsIsSelected(selectedItemsPaths); actions.keyUp(Keys.SHIFT).perform(); }</code><technical_language>static import for simplifying constant references similar done in other parts of code</technical_language>

Target:
public void selectMultiFilesByShiftKeyWithCheckMultiselection( String clickItemPath, List<String> selectedItemsPaths) { Actions actions = actionsFactory.createAction(seleniumWebDriver); actions.keyDown(SHIFT).perform(); selectItem(clickItemPath); waitAllItemsIsSelected(selectedItemsPaths); actions.keyUp(SHIFT).perform(); }
Source:
<code>private boolean updateDataSource(VXQueryCollectionDataSource ds, Mutable<ILogicalExpression> expression) { boolean added = false; ILogicalExpression comparison = null; List<Mutable<ILogicalExpression>> finds = new ArrayList<Mutable<ILogicalExpression>>(); ExpressionToolbox.findAllFunctionExpressions(expression, BuiltinOperators.VALUE.getFunctionIdentifier(), finds); <START> if (finds.size() > 0) { <END> List<ILogicalExpression> listComparison = ExpressionToolbox.getFullArguments(finds.get(finds.size() - 1)); comparison = listComparison.get(0); } byte[] b = new byte[4]; b[0] = (byte) 0xff; b[1] = (byte) 0x00; b[2] = (byte) 0x00; b[3] = (byte) 0x00; for (int i = finds.size(); i > 0; --i) { Byte[] value = ExpressionToolbox.getConstantArgument(finds.get(i - 1), 1); List<ILogicalExpression> values = ExpressionToolbox.getFullArguments(finds.get(i - 1)); ILogicalExpression one = values.get(0); if (one.equals(comparison)) { ds.addValueSeq(ArrayUtils.toObject(b)); } if (values.size() != 0) { ds.addValueSeq(value); added = true; } } return added; }</code><technical_language>explain here? do variable do: comparison, b, one</technical_language>

Target:
private boolean updateDataSource(VXQueryCollectionDataSource ds, Mutable<ILogicalExpression> expression) { boolean added = false; ILogicalExpression comparison = null; List<Mutable<ILogicalExpression>> finds = new ArrayList<Mutable<ILogicalExpression>>(); List<Mutable<ILogicalExpression>> finds2 = new ArrayList<Mutable<ILogicalExpression>>(); List<ILogicalExpression> listComparison = new ArrayList<ILogicalExpression>(); List<ILogicalExpression> listValues = new ArrayList<ILogicalExpression>(); ExpressionToolbox.findAllFunctionExpressions(expression, BuiltinOperators.VALUE.getFunctionIdentifier(), finds); if (finds.size() > 0) { listComparison = ExpressionToolbox.getFullArguments(finds.get(finds.size() - 1)); comparison = listComparison.get(0); } for (int i = finds.size(); i > 0; --i) { listValues.add(ExpressionToolbox.getFullArguments(finds.get(i-1)).get(0)); listValues.add(ExpressionToolbox.getFullArguments(finds.get(i-1)).get(1)); } byte[] b = new byte[4]; b[0] = (byte) 0xff; b[1] = (byte) 0x00; b[2] = (byte) 0x00; b[3] = (byte) 0x00; for (int i = finds.size(); i > 0; --i) { Byte[] value = ExpressionToolbox.getConstantArgument(finds.get(i - 1), 1); List<ILogicalExpression> values = ExpressionToolbox.getFullArguments(finds.get(i - 1)); ILogicalExpression one = values.get(0); if (one.equals(comparison)) { ds.addValueSeq(ArrayUtils.toObject(b)); } if (values.size() != 0) { ds.addValueSeq(value); added = true; } } return added; }
Source:
<code>public void handle(GlowSession session, PlayerUpdateMessage message) { Location original = session.getPlayer().getLocation(); Location newLoc = original.clone(); message.update(newLoc); if (newLoc.distanceSquared(original) > 16 * 16) { return; } <START> if (session.getPlayer().isOnGround() != message.getOnGround()) <END> session.getPlayer().setOnGround(message.getOnGround()); session.getPlayer().setRawLocation(newLoc); }</code><technical_language>{}</technical_language>

Target:
public void handle(GlowSession session, PlayerUpdateMessage message) { Location original = session.getPlayer().getLocation(); Location newLoc = original.clone(); message.update(newLoc); if (newLoc.distanceSquared(original) > 16 * 16) { return; } if (session.getPlayer().isOnGround() != message.getOnGround()) { session.getPlayer().setOnGround(message.getOnGround()); } session.getPlayer().setRawLocation(newLoc); }
Source:
<code>public Port getPortToConnectTo() { if (sslEnabledDataCenters.contains(datacenter.getName())) { if (ports.containsKey(PortType.SSL)) { <START> return new Port(ports.get(PortType.SSL), PortType.SSL); <END> } else { throw new IllegalArgumentException("No SSL Port exists for the data node " + hostname + ":" + port); } } return new Port(port, PortType.PLAINTEXT); }</code><technical_language>simple if Map<PortType, Port> instead of Map<PortType, Integer>. check</technical_language>

Target:
public Port getPortToConnectTo() { if (sslEnabledDataCenters.contains(datacenter.getName())) { if (ports.containsKey(PortType.SSL)) { return ports.get(PortType.SSL); } else { throw new IllegalStateException("No SSL Port exists for the data node " + hostname + ":" + portNum); } } return ports.get(PortType.PLAINTEXT); }
Source:
<code>public Response shutDown() { log.info("Received shutdown request"); executorService.schedule( new Runnable() { @Override public void run() { <START> lifecycle.stop(); <END> System.exit(-1); } }, 1, TimeUnit.SECONDS ); executorService.shutdown(); return Response.status(Response.Status.ACCEPTED).build(); }</code><technical_language>able get thread dumps of not-terminating processes</technical_language>

Target:
public Response shutDown() { log.info("Received shutdown request"); executorService.schedule( new Runnable() { @Override public void run() { System.exit(0); } }, 1, TimeUnit.SECONDS ); executorService.shutdown(); return Response.status(Response.Status.ACCEPTED).build(); }
Source:
<code>public JavaParserTypeSolver(File srcDir) { if (!srcDir.exists() || !srcDir.isDirectory()) { throw new IllegalStateException("SrcDir does not exist or is not a directory: " + srcDir.getAbsolutePath()); } this.srcDir = srcDir; <START> javaParser = new JavaParser( <END> new ParserConfiguration() .setLanguageLevel(BLEEDING_EDGE) .setAttributeComments(false) .setStoreTokens(false)); }</code><technical_language>this possibly configurable? optionally pass a parser configuration</technical_language>

Target:
public JavaParserTypeSolver(File srcDir) { this(srcDir.toPath()); }
Source:
<code>public void testBaseOutput() throws IOException { String[] args = new String[] { "I=" + TEST_INPUT_VCF1, "O=" + TEST_OUTPUT, "G=" + TEST_GENOTYPES_VCF1, "H=" + SUBSETTED_HAPLOTYPE_DATABASE_FOR_TESTING }; Assert.assertEquals(runPicardCommandLine(args), 0); <START> Assert.assertEquals(checkResult( <END> new File(TEST_OUTPUT + ".fingerprinting_summary_metrics"), new File(TEST_OUTPUT + ".fingerprinting_detail_metrics")), true); }</code><technical_language>I asserts, for metrics file....that breaks easier understand probem is</technical_language>

Target:
public void testBaseOutput() { String[] args = new String[]{ "I=" + TEST_INPUT_VCF1, "O=" + TEST_OUTPUT, "G=" + TEST_GENOTYPES_VCF1, "H=" + SUBSETTED_HAPLOTYPE_DATABASE_FOR_TESTING }; Assert.assertEquals(runPicardCommandLine(args), 0); Assert.assertTrue(MetricsFile.areMetricsEqual(new File(TEST_OUTPUT + ".fingerprinting_summary_metrics"), RESULT_EXAMPLE_SUMMARY)); Assert.assertTrue(MetricsFile.areMetricsEqual(new File(TEST_OUTPUT + ".fingerprinting_detail_metrics"), RESULT_EXAMPLE_DETAIL)); }
Source:
<code>public void stop() { if (stopped.compareAndSet(false, true)) { try { metadataConsumer.close(); } catch (Exception e) { LOG.warn("metadataConsumer.close for system " + systemName + " failed with exception.", e); } } if (adminClientForDelete != null) { try { adminClientForDelete.close(); } catch (Exception e) { <START> LOG.warn("AdminClient.close() for system " + systemName + " failed with exception.", e); <END> } } if (adminClient != null) { adminClient.close(); } }</code><technical_language>Minor: slf4j string formatter. rephrase LOG.warn(Closing adminClient of system: failed., systemName, e)</technical_language>

Target:
public void stop() { if (stopped.compareAndSet(false, true)) { try { metadataConsumer.close(); } catch (Exception e) { LOG.warn("metadataConsumer.close for system " + systemName + " failed with exception.", e); } } if (adminClientForDelete != null) { try { adminClientForDelete.close(); } catch (Exception e) { LOG.warn("AdminClient.close() for system failed with exception {}.", systemName, e); } } if (adminClient != null) { adminClient.close(); } }
Source:
<code>@Test public void checkAbilityToStartServiceUsingCapabilitiesAndFlags() throws Exception { File app = new File(ROOT_TEST_PATH, "ApiDemos-debug.apk"); <START> File chrome = new File(new File(ROOT_TEST_PATH, "pagefactory_tests"), "chromedriver.exe"); <END> DesiredCapabilities caps = new DesiredCapabilities(); caps.setCapability(PLATFORM_NAME, "Android"); caps.setCapability(FULL_RESET, true); caps.setCapability(NEW_COMMAND_TIMEOUT, 60); caps.setCapability(APP_PACKAGE, "io.appium.android.apis"); caps.setCapability(APP_ACTIVITY, ".view.WebView1"); caps.setCapability(APP, app.getAbsolutePath()); caps.setCapability(CHROMEDRIVER_EXECUTABLE, chrome.getAbsolutePath()); service = new AppiumServiceBuilder() .withArgument(CALLBACK_ADDRESS, testIP) .withArgument(SESSION_OVERRIDE) .withArgument(PRE_LAUNCH) .withCapabilities(caps).build(); service.start(); assertTrue(service.isRunning()); }</code><technical_language>Path.resolve method construct longer paths</technical_language>

Target:
@Test public void checkAbilityToStartServiceUsingCapabilitiesAndFlags() throws Exception { File app = ROOT_TEST_PATH.resolve("ApiDemos-debug.apk").toFile(); File chrome = ROOT_TEST_PATH.resolve("pagefactory_tests").resolve("chromedriver.exe").toFile(); DesiredCapabilities caps = new DesiredCapabilities(); caps.setCapability(PLATFORM_NAME, "Android"); caps.setCapability(FULL_RESET, true); caps.setCapability(NEW_COMMAND_TIMEOUT, 60); caps.setCapability(APP_PACKAGE, "io.appium.android.apis"); caps.setCapability(APP_ACTIVITY, ".view.WebView1"); caps.setCapability(APP, app.getAbsolutePath()); caps.setCapability(CHROMEDRIVER_EXECUTABLE, chrome.getAbsolutePath()); service = new AppiumServiceBuilder() .withArgument(CALLBACK_ADDRESS, testIP) .withArgument(SESSION_OVERRIDE) .withArgument(PRE_LAUNCH) .withCapabilities(caps).build(); service.start(); assertTrue(service.isRunning()); }
Source:
<code>protected void requestDatacenterToCreateWaitingVms(Datacenter datacenter) { int requestedVms = 0; <START> for (final Vm vm : getVmWaitingList()) { <END> if (!vmsToDatacentersMap.containsKey(vm) && !vmCreationRequestsMap.containsKey(vm)) { println(String.format( "%.2f: %s: Trying to Create %s in %s", getSimulation().clock(), getName(), vm, datacenter.getName())); sendNow(datacenter.getId(), CloudSimTags.VM_CREATE_ACK, vm); vmCreationRequestsMap.put(vm, datacenter); requestedVms++; } } datacenterRequestedList.add(datacenter); this.vmCreationRequests += requestedVms; }</code><technical_language>access attribute</technical_language>

Target:
protected void requestDatacenterToCreateWaitingVms(Datacenter datacenter) { int requestedVms = 0; for (final Vm vm :vmWaitingList) { if (!vmsToDatacentersMap.containsKey(vm) && !vmCreationRequestsMap.containsKey(vm)) { println(String.format( "%.2f: %s: Trying to Create %s in %s", getSimulation().clock(), getName(), vm, datacenter.getName())); sendNow(datacenter.getId(), CloudSimTags.VM_CREATE_ACK, vm); vmCreationRequestsMap.put(vm, datacenter); requestedVms++; } } datacenterRequestedList.add(datacenter); this.vmCreationRequests += requestedVms; }
Source:
<code>public void handleFromRemoteSite(String origin, XSiteReplicateCommand command, Reply reply, DeliverOrder order) { if (trace) { log.tracef("Handling command %s from remote site %s", command, origin); } BackupReceiver receiver = backupReceiverRepository.getBackupReceiver(origin, command.getCacheName().toString()); if (order.preserveOrder()) { <START> runXSiteReplicateCommand(command, receiver, reply); <END> } else { remoteCommandsExecutor.execute(() -> runXSiteReplicateCommand(command, receiver, reply)); } }</code><technical_language>s/Replicate/Replicable/</technical_language>

Target:
public void handleFromRemoteSite(String origin, XSiteReplicateCommand command, Reply reply, DeliverOrder order) { if (trace) { log.tracef("Handling command %s from remote site %s", command, origin); } BackupReceiver receiver = backupReceiverRepository.getBackupReceiver(origin, command.getCacheName().toString()); if (order.preserveOrder()) { runXSiteReplicableCommand(command, receiver, reply); } else { remoteCommandsExecutor.execute(() -> runXSiteReplicableCommand(command, receiver, reply)); } }
Source:
<code>CheckAndSetResult<SequenceAndBound> checkAndSetCoordinationValue( Optional<SequenceAndBound> oldValue, SequenceAndBound newValue) { CheckAndSetRequest request = new CheckAndSetRequest.Builder() .table(AtlasDbConstants.COORDINATION_TABLE) .cell(getCoordinationValueCell()) .oldValue(oldValue.map(this::serializeSequenceAndBound)) .newValue(serializeSequenceAndBound(newValue)) .build(); try { kvs.checkAndSet(request); return ImmutableCheckAndSetResult.of(true, ImmutableList.of(newValue)); } catch (CheckAndSetException e) { if (e.getActualValues() != null) { return ImmutableCheckAndSetResult.of(false, e.getActualValues() .stream() .map(this::deserializeSequenceAndBound) .collect(Collectors.toList())); } else { return getMostRecentValueAndBound(oldValue, newValue); <START> } <END> } }</code><technical_language>nit: else required returns</technical_language>

Target:
CheckAndSetResult<SequenceAndBound> checkAndSetCoordinationValue( Optional<SequenceAndBound> oldValue, SequenceAndBound newValue) { CheckAndSetRequest request = new CheckAndSetRequest.Builder() .table(AtlasDbConstants.COORDINATION_TABLE) .cell(getCoordinationValueCell()) .oldValue(oldValue.map(this::serializeSequenceAndBound)) .newValue(serializeSequenceAndBound(newValue)) .build(); try { kvs.checkAndSet(request); return ImmutableCheckAndSetResult.of(true, ImmutableList.of(newValue)); } catch (CheckAndSetException e) { if (e.getActualValues() != null) { return ImmutableCheckAndSetResult.of(false, e.getActualValues() .stream() .map(this::deserializeSequenceAndBound) .collect(Collectors.toList())); } return getFailedResultWithMostRecentValueAndBound(oldValue, newValue); } }
Source:
<code>private static boolean enableTracing(AbstractManagedChannelImplBuilder<?> builder) { if (setEnableTracingMethodNotFound == null) { try { setEnableTracingMethod = AbstractManagedChannelImplBuilder.class.getMethod("setEnableTracing", boolean.class); setEnableTracingMethodNotFound = false; } catch (Exception e) { setEnableTracingMethodNotFound = true; } } <START> if (builder != null && setEnableTracingMethod != null) { <END> try { setEnableTracingMethod.invoke(builder, true); return true; } catch (Exception e) { LOG.warn("Could not enable tracing", e); } } return false; }</code><technical_language>if setEnableTracingMethodNotFound = false</technical_language>

Target:
private static void enableTracing(AbstractManagedChannelImplBuilder<?> builder) { try { Method setEnableTracingMethod = AbstractManagedChannelImplBuilder.class.getMethod("setEnableTracing", boolean.class); if (setEnableTracingMethod != null) { try { setEnableTracingMethod.invoke(builder, true); } catch (Exception e) { LOG.warn("Could not enable tracing", e); } } } catch (NoSuchMethodException | SecurityException e1) { return; } }
Source:
<code>abstract PdlBuilder newline() throws IOException; abstract PdlBuilder indent() throws IOException; abstract PdlBuilder increaseIndent(); abstract PdlBuilder decreaseIndent(); abstract boolean writeDoc(String doc) throws IOException; PdlBuilder writeProperties(List<String> prefix, Map<String, Object> properties) throws IOException { for (Map.Entry<String, Object> entry : properties.entrySet()) { String key = entry.getKey(); Object value = entry.getValue(); ArrayList<String> pathParts = new ArrayList<>(prefix); pathParts.add(key); if (value instanceof DataMap) { DataMap dm = (DataMap) value; <START> if (!dm.isEmpty() && dm.size() == 1) <END> { writeProperties(pathParts, dm); } else if (!pathParts.isEmpty()) { writeProperty(pathParts, dm); } } else if (Boolean.TRUE.equals(value)) { indent().write("@").writePath(pathParts).newline(); } else { writeProperty(pathParts, value); } } return this; }</code><technical_language>Redundant. dm.size() == 1 suffices</technical_language>

Target:
abstract PdlBuilder newline() throws IOException; abstract PdlBuilder indent() throws IOException; abstract PdlBuilder increaseIndent(); abstract PdlBuilder decreaseIndent(); abstract boolean writeDoc(String doc) throws IOException; PdlBuilder writeProperties(List<String> prefix, Map<String, Object> properties) throws IOException { for (Map.Entry<String, Object> entry : properties.entrySet()) { String key = entry.getKey(); Object value = entry.getValue(); ArrayList<String> pathParts = new ArrayList<>(prefix); pathParts.add(key); if (value instanceof DataMap) { DataMap dm = (DataMap) value; if (dm.size() == 1) { writeProperties(pathParts, dm); } else { writeProperty(pathParts, dm); } } else if (Boolean.TRUE.equals(value)) { indent().write("@").writePath(pathParts).newline(); } else { writeProperty(pathParts, value); } } return this; }
Source:
<code>private void initMigrationPolicies() { AsyncQuery aQuery = new AsyncQuery(this, new INewAsyncCallback() { @Override public void onSuccess(Object model, Object returnValue) { migrationPolicies = (List<MigrationPolicy>) returnValue; } }); aQuery.converterCallback = new IAsyncConverter() { @Override public Object convert(Object returnValue, AsyncQuery asyncQuery) { if (returnValue == null) { return new ArrayList<MigrationPolicy>(); } Collections.sort((List<MigrationPolicy>) returnValue, new Comparator<MigrationPolicy>() { @Override public int compare(MigrationPolicy m1, MigrationPolicy m2) { if (NoMigrationPolicy.ID.equals(m1.getId())) { return -1; } return m1.getName().compareTo(m2.getName()); } }); return returnValue; } }; Frontend.getInstance().runQuery(VdcQueryType.GetAllMigrationPolicies, new VdcQueryParametersBase(), aQuery); <START> initCpuMap(); <END> }</code><technical_language>please move this initCache() method</technical_language>

Target:
private void initMigrationPolicies() { AsyncQuery aQuery = new AsyncQuery(this, new INewAsyncCallback() { @Override public void onSuccess(Object model, Object returnValue) { migrationPolicies = (List<MigrationPolicy>) returnValue; } }); aQuery.converterCallback = new IAsyncConverter() { @Override public Object convert(Object returnValue, AsyncQuery asyncQuery) { if (returnValue == null) { return new ArrayList<MigrationPolicy>(); } Collections.sort((List<MigrationPolicy>) returnValue, new Comparator<MigrationPolicy>() { @Override public int compare(MigrationPolicy m1, MigrationPolicy m2) { if (NoMigrationPolicy.ID.equals(m1.getId())) { return -1; } return m1.getName().compareTo(m2.getName()); } }); return returnValue; } }; Frontend.getInstance().runQuery(VdcQueryType.GetAllMigrationPolicies, new VdcQueryParametersBase(), aQuery); }
Source:
<code>public void testGetFlooders() throws Exception { final EventType eventType = NakadiTestUtils.createEventType(); blacklist(eventType.getName(), BlacklistService.Type.CONSUMER_ET); try { TestUtils.waitFor( () -> given() .contentType(ContentType.JSON) .get(BLACKLIST_URL) .then() .statusCode(HttpStatus.SC_OK) .body("consumers.event_types", hasItems(eventType.getName())), 1000, 200); } finally { <START> whitelist(eventType.getName(), BlacklistService.Type.CONSUMER_ET); <END> } }</code><technical_language>do want whitelist end</technical_language>

Target:
public void testGetFlooders() throws Exception { final EventType eventType = NakadiTestUtils.createEventType(); blacklist(eventType.getName(), BlacklistService.Type.CONSUMER_ET); TestUtils.waitFor( () -> given() .contentType(ContentType.JSON) .get(BLACKLIST_URL) .then() .statusCode(HttpStatus.SC_OK) .body("consumers.event_types", hasItems(eventType.getName())), 1000, 200); }
Source:
<code>public IdToken idTokenWithAudience(String targetAudience, List<IdTokenProvider.Option> options) throws IOException { GenericUrl documentURL = new GenericUrl(getIdentityDocumentUrl()); if (options != null) { <START> if (options.contains(IdTokenProvider.Option.FORMAT_FULL)) <END> documentURL.set("format", "full"); if (options.contains(IdTokenProvider.Option.LICENSES_TRUE)) documentURL.set("license","TRUE"); } documentURL.set("audience", targetAudience); HttpResponse response = null; response = getMetadataResponse(documentURL.toString()); InputStream content = response.getContent(); if (content == null) { throw new IOException("Empty content from metadata token server request."); } String rawToken = response.parseAsString(); JsonWebSignature jws = JsonWebSignature.parse(OAuth2Utils.JSON_FACTORY, rawToken); return new IdToken(rawToken, jws); }</code><technical_language>google style brace if statements, single line</technical_language>

Target:
public IdToken idTokenWithAudience(String targetAudience, List<IdTokenProvider.Option> options) throws IOException { GenericUrl documentUrl = new GenericUrl(getIdentityDocumentUrl()); if (options != null) { if (options.contains(IdTokenProvider.Option.FORMAT_FULL)) { documentUrl.set("format", "full"); } if (options.contains(IdTokenProvider.Option.LICENSES_TRUE)) { documentUrl.set("format", "full"); documentUrl.set("license", "TRUE"); } } documentUrl.set("audience", targetAudience); HttpResponse response = getMetadataResponse(documentUrl.toString()); InputStream content = response.getContent(); if (content == null) { throw new IOException("Empty content from metadata token server request."); } String rawToken = response.parseAsString(); return IdToken.create(rawToken); }
Source:
<code>public void registerFilesToLongleaf(Resource resc) { Set<Resource> rescTypes = resc.listProperties(RDF.type).toList().stream() .map(Statement::getResource).collect(toSet()); if (rescTypes.contains(Cdr.FileObject)) { String checksum = resc.getProperty(CdrDeposit.md5sum).getString(); if (resc.hasProperty(CdrDeposit.storageUri)) { registerFile(resc.getProperty(CdrDeposit.storageUri).getString().replace("file:", ""), resc.getURI(), checksum); <START> } else if (resc.hasProperty(CdrDeposit.descriptiveStorageUri)) { <END> registerFile(resc.getProperty(CdrDeposit.descriptiveStorageUri).getString(), resc.getURI(), checksum); } else { log.info("File does not have storageUri or descriptiveStorageUri properties", resc.getURI()); } } NodeIterator iterator = getChildIterator(resc); if (iterator == null) { return; } try { while (iterator.hasNext()) { Resource childResc = (Resource) iterator.next(); registerFilesToLongleaf(childResc); } } finally { iterator.close(); } }</code><technical_language>need bump this out of FileObject block Units, Collections, Folders, Works Files MODS descriptions</technical_language>

Target:
public void registerFilesToLongleaf(Resource resc) { PID objPid = PIDs.get(resc.toString()); BinaryObject premisBin = repoObjLoader.getBinaryObject(DatastreamPids.getMdEventsPid(objPid)); URI premisStorageUri = premisBin.getContentUri(); if (premisStorageUri != null) { registerFile(premisStorageUri, null); } StmtIterator statementIterator = resc.listProperties(); try { while (statementIterator.hasNext()) { Statement currentStatement = statementIterator.nextStatement(); if (currentStatement.getPredicate().toString().matches(".*Uri")) { URI storageUri = URI.create(currentStatement.getString()); if (currentStatement.getString().matches(".*original_file")) { String checksum = resc.getProperty(CdrDeposit.md5sum).getString(); registerFile(storageUri, checksum); } else { registerFile(storageUri, null); } } } } finally { statementIterator.close(); } NodeIterator nodeIterator = getChildIterator(resc); if (nodeIterator == null) { return; } try { while (nodeIterator.hasNext()) { Resource childResc = (Resource) nodeIterator.next(); registerFilesToLongleaf(childResc); } } finally { nodeIterator.close(); } }
Source:
<code>private ITmfStateValue getEventField(ITmfEvent event, String fieldName) { ITmfStateValue value = TmfStateValue.nullValue(); final ITmfEventField content = event.getContent(); if (fieldName.equals(TmfXmlStrings.CPU)) { value = TmfStateValue.newValueInt(Integer.valueOf(event.getSource())); } <START> else { <END> if (content.getField(fieldName) == null) { return value; } Object field = content.getField(fieldName).getValue(); if (field instanceof String) { String fieldString = (String) field; value = TmfStateValue.newValueString(fieldString); if (fForcedType == ValueForcedType.VALUE_TYPE_INT) { value = TmfStateValue.newValueInt(Integer.parseInt(fieldString)); } else if (fForcedType == ValueForcedType.VALUE_TYPE_LONG) { value = TmfStateValue.newValueLong(Long.parseLong(fieldString)); } } else if (field instanceof Long) { Long fieldLong = (Long) field; value = TmfStateValue.newValueLong(fieldLong); if (fForcedType == ValueForcedType.VALUE_TYPE_INT) { value = TmfStateValue.newValueInt(fieldLong.intValue()); } else if (fForcedType == ValueForcedType.VALUE_TYPE_STRING) { value = TmfStateValue.newValueString(fieldLong.toString()); } } else if (field instanceof Integer) { Integer fieldInterger = (Integer) field; value = TmfStateValue.newValueInt(fieldInterger); if (fForcedType == ValueForcedType.VALUE_TYPE_LONG) { value = TmfStateValue.newValueLong(fieldInterger.longValue()); } else if (fForcedType == ValueForcedType.VALUE_TYPE_STRING) { value = TmfStateValue.newValueString(fieldInterger.toString()); } } } return value; }</code><technical_language>} else line</technical_language>

Target:
private ITmfStateValue getEventField(ITmfEvent event, String fieldName) { ITmfStateValue value = TmfStateValue.nullValue(); final ITmfEventField content = event.getContent(); if (fieldName.equals(TmfXmlStrings.CPU)) { value = TmfStateValue.newValueInt(Integer.valueOf(event.getSource())); } else { if (content.getField(fieldName) == null) { return value; } Object field = content.getField(fieldName).getValue(); if (field instanceof String) { String fieldString = (String) field; switch (fForcedType) { case INT: value = TmfStateValue.newValueInt(Integer.parseInt(fieldString)); break; case LONG: value = TmfStateValue.newValueLong(Long.parseLong(fieldString)); break; case NULL: case STRING: default: value = TmfStateValue.newValueString(fieldString); break; } } else if (field instanceof Long) { Long fieldLong = (Long) field; switch (fForcedType) { case INT: value = TmfStateValue.newValueInt(fieldLong.intValue()); break; case STRING: value = TmfStateValue.newValueString(fieldLong.toString()); break; case LONG: case NULL: default: value = TmfStateValue.newValueLong(fieldLong); break; } } else if (field instanceof Integer) { Integer fieldInterger = (Integer) field; switch (fForcedType) { case LONG: value = TmfStateValue.newValueLong(fieldInterger.longValue()); break; case STRING: value = TmfStateValue.newValueString(fieldInterger.toString()); break; case INT: case NULL: default: break; } } } return value; }
Source:
<code>public void incrementChildCount() { <START> this.childCount++; <END> }</code><technical_language>this. is needed I guess :wink:</technical_language>

Target:
public void incrementChildCount() { childCount++; }
Source:
<code><START> public static Configuration testConfiguration() <END> { if (configuration == null) { configuration = createTestConfiguration(); } return configuration; }</code><technical_language>this synchronized</technical_language>

Target:
public static synchronized Configuration testConfiguration() { if (configuration == null) { configuration = createTestConfiguration(); } return configuration; }
Source:
<code><START> public boolean isMonitoringNeeded(VDS vds) { <END> boolean retVal = false; for ( MonitoringStrategy monitoringStrategy : strategies ) { retVal = retVal || monitoringStrategy.isMonitoringNeeded(vds); if (retVal) { break; } } return retVal; }</code><technical_language>opinion :) (though break logic correct)</technical_language>

Target:
public boolean isMonitoringNeeded(VDS vds) { for ( MonitoringStrategy monitoringStrategy : strategies ) { if (monitoringStrategy.isMonitoringNeeded(vds)) { return true; } } return false; }
Source:
<code>protected boolean executeAnalysis(final IProgressMonitor monitor) { <START> Object parameter = null; <END> parameter = getParameter(PARAM_TEST); if (!(parameter instanceof Integer)) { throw new RuntimeException("The parameter should be set"); } int integer = ((Integer) parameter).intValue(); fOutput = integer; if (integer == 0) { return false; } else if (integer == 999) { while (!monitor.isCanceled()) { try { Thread.sleep(0); } catch (InterruptedException e) { break; } } return !monitor.isCanceled(); } return true; }</code><technical_language>assign directly</technical_language>

Target:
protected boolean executeAnalysis(final IProgressMonitor monitor) { Object parameter = getParameter(PARAM_TEST); if (!(parameter instanceof Integer)) { throw new RuntimeException("The parameter should be set"); } int integer = ((Integer) parameter).intValue(); fOutput = integer; if (integer == 0) { return false; } else if (integer == 999) { while (!monitor.isCanceled()) { try { Thread.sleep(0); } catch (InterruptedException e) { break; } } return !monitor.isCanceled(); } return true; }
Source:
<code>private void addAddress(Map<String, Object> map, String address) { if (getParameters().getDisk().getDiskInterface() != DiskInterface.VirtIO_SCSI) { if (StringUtils.isNotBlank(address)) { map.put("address", XmlRpcStringUtils.string2Map(address)); } } else { Map<VmDevice, Integer> vmDeviceUnitMap = VmInfoBuilder.getVmDeviceUnitMapForVirtioScsiDisks(getParameters().getVm()); int availableUnit = VmInfoBuilder.getAvailableUnitForVirtioScsiDisk(vmDeviceUnitMap); if (!StringUtils.isEmpty(address)) { Map<String, String> addressMap = XmlRpcStringUtils.string2Map(address); int unit = Integer.valueOf(addressMap.get(VdsProperties.Unit)); if (!vmDeviceUnitMap.containsValue(unit)) { <START> map.put(VdsProperties.Address, XmlRpcStringUtils.string2Map(address)); <END> } else { map.put(VdsProperties.Address, VmInfoBuilder.createAddressForVirtioScsiDisk(availableUnit)); } } else { map.put(VdsProperties.Address, VmInfoBuilder.createAddressForVirtioScsiDisk(availableUnit)); } } }</code><technical_language>addressMap here</technical_language>

Target:
private void addAddress(Map<String, Object> map, String address) { if (getParameters().getDisk().getDiskInterface() != DiskInterface.VirtIO_SCSI) { if (StringUtils.isNotBlank(address)) { map.put("address", XmlRpcStringUtils.string2Map(address)); } } else { Map<VmDevice, Integer> vmDeviceUnitMap = VmInfoBuilder.getVmDeviceUnitMapForVirtioScsiDisks(getParameters().getVm()); int availableUnit = VmInfoBuilder.getAvailableUnitForVirtioScsiDisk(vmDeviceUnitMap); if (StringUtils.isNotBlank(address)) { Map<String, String> addressMap = XmlRpcStringUtils.string2Map(address); int unit = Integer.valueOf(addressMap.get(VdsProperties.Unit)); if (!vmDeviceUnitMap.containsValue(unit)) { map.put(VdsProperties.Address, addressMap); } else { map.put(VdsProperties.Address, VmInfoBuilder.createAddressForVirtioScsiDisk(availableUnit)); } } else { map.put(VdsProperties.Address, VmInfoBuilder.createAddressForVirtioScsiDisk(availableUnit)); } } }
Source:
<code>public Result apply(LimitNode parent, Captures captures, Context context) { JoinNode joinNode = captures.get(CHILD); <START> PlanNode leftSource = joinNode.getLeft(); <END> PlanNode rightSource = joinNode.getRight(); boolean noChange = true; if (isLeftOuter(joinNode.getType()) && !isLimited(leftSource, context.getLookup(), parent.getCount())) { leftSource = new LimitNode(context.getIdAllocator().getNextId(), leftSource, parent.getCount(), false); noChange = false; } if (isRightOuter(joinNode.getType()) && !isLimited(rightSource, context.getLookup(), parent.getCount())) { rightSource = new LimitNode(context.getIdAllocator().getNextId(), rightSource, parent.getCount(), false); noChange = false; } if (noChange) { return Result.empty(); } return Result.ofPlanNode( parent.replaceChildren(ImmutableList.of( joinNode.replaceChildren(ImmutableList.of(leftSource, rightSource))))); }</code><technical_language>name left right for conciseness</technical_language>

Target:
public Result apply(LimitNode parent, Captures captures, Context context) { JoinNode joinNode = captures.get(CHILD); PlanNode left = joinNode.getLeft(); PlanNode right = joinNode.getRight(); if (isLeftOuter(joinNode.getType()) && !isLimited(left, context.getLookup(), parent.getCount())) { left = new LimitNode(context.getIdAllocator().getNextId(), left, parent.getCount(), false); } if (isRightOuter(joinNode.getType()) && !isLimited(right, context.getLookup(), parent.getCount())) { right = new LimitNode(context.getIdAllocator().getNextId(), right, parent.getCount(), false); } if (joinNode.getLeft() != left || joinNode.getRight() != right) { return Result.ofPlanNode( parent.replaceChildren(ImmutableList.of( joinNode.replaceChildren(ImmutableList.of(left, right))))); } return Result.empty(); }
Source:
<code>public void onBackPressed() { if (projectListFragment != null) { projectListFragment.cancelLoadProjectTask(); Log.d(TAG, "Back press detected!"); <START> } <END> super.onBackPressed(); }</code><technical_language>projectListFragment is set, null check needed Please remove log output</technical_language>

Target:
public void onBackPressed() { projectListFragment.cancelLoadProjectTask(); super.onBackPressed(); }
Source:
<code>public JobExecutionResult toJobExecutionResult(ClassLoader classLoader) throws JobExecutionException, IOException, ClassNotFoundException { if (applicationStatus == ApplicationStatus.SUCCEEDED) { return new JobExecutionResult( jobId, netRuntime, AccumulatorHelper.deserializeAccumulators( accumulatorResults, classLoader)); } else { final JobExecutionException exception = <START> getJobExecutionException(serializedThrowable, classLoader); <END> throw applicationStatus == ApplicationStatus.CANCELED || applicationStatus == ApplicationStatus.FAILED ? new JobExecutionException(jobId, applicationStatus, "Application Status: " + applicationStatus.name(), exception) : new JobExecutionException(jobId, ApplicationStatus.UNKNOWN, "Job failed for unknown reason.", exception); } }</code><technical_language>This else {...} block simply: throw getJobExecutionException(serializedThrowable, classLoader); right? do need wrap original exception anymore</technical_language>

Target:
public JobExecutionResult toJobExecutionResult(ClassLoader classLoader) throws JobExecutionException, IOException, ClassNotFoundException { if (applicationStatus != ApplicationStatus.SUCCEEDED) { throw getJobExecutionException(serializedThrowable, classLoader); } return new JobExecutionResult(jobId, netRuntime, AccumulatorHelper.deserializeAccumulators(accumulatorResults, classLoader)); }
Source:
<code>public <T> List<T> loadClasses(ILanguageComponent component, Class<T> type) throws MetaborgException { @SuppressWarnings("rawtypes") <START> final Map<Class, ServiceLoader> serviceLoaderCacheLevel2; <END> if(serviceLoaderCache.containsKey(component)) { serviceLoaderCacheLevel2 = serviceLoaderCache.get(component); if(serviceLoaderCacheLevel2.containsKey(type)) { @SuppressWarnings("unchecked") ServiceLoader<T> serviceLoader = (ServiceLoader<T>) serviceLoaderCacheLevel2.get(type); return initializeInjectionFields(serviceLoader.iterator()); } } else { serviceLoaderCacheLevel2 = Maps.newHashMap(); serviceLoaderCache.put(component, serviceLoaderCacheLevel2); } final ClassLoader classLoader = classLoader(component); final ServiceLoader<T> serviceLoader = ServiceLoader.load(type, classLoader); serviceLoaderCacheLevel2.put(type, serviceLoader); return initializeInjectionFields(serviceLoader.iterator()); }</code><technical_language>Again, Class<?></technical_language>

Target:
public <T> List<T> loadClasses(ILanguageComponent component, Class<T> type) throws MetaborgException { final Map<Class<?>, ServiceLoader<?>> serviceLoaderCacheLevel2; if(serviceLoaderCache.containsKey(component)) { serviceLoaderCacheLevel2 = serviceLoaderCache.get(component); if(serviceLoaderCacheLevel2.containsKey(type)) { @SuppressWarnings("unchecked") ServiceLoader<T> serviceLoader = (ServiceLoader<T>) serviceLoaderCacheLevel2.get(type); return initializeInjectionFields(serviceLoader.iterator()); } } else { serviceLoaderCacheLevel2 = Maps.newHashMap(); serviceLoaderCache.put(component, serviceLoaderCacheLevel2); } final ClassLoader classLoader = classLoader(component); final ServiceLoader<T> serviceLoader = ServiceLoader.load(type, classLoader); serviceLoaderCacheLevel2.put(type, serviceLoader); return initializeInjectionFields(serviceLoader.iterator()); }
Source:
<code>public CanvasHighlight invalid(final Iterable<? extends RuleViolation> violations) { violations.forEach(v -> { final String uuid = v.getUUID(); <START> if (null != uuid) { <END> applyStateToShape(uuid, ShapeState.INVALID); } }); getCanvas().draw(); return this; }</code><technical_language>Consider of Optional</technical_language>

Target:
public CanvasHighlight invalid(final Iterable<? extends RuleViolation> violations) { violations.forEach(v -> { final String uuid = v.getUUID(); applyStateToShape(uuid, ShapeState.INVALID); }); getCanvas().draw(); return this; }
Source:
<code>public void testDialogClosed() { ExLangsPreference target = new ExLangsPreference(getActivity(), null, true, sharedPrefs); target.setKey("pref_key_native_tongue"); target.callOnDialogClosed(false); assertNull(sharedPrefs.getString("pref_key_native_tongue", null)); target.callOnDialogClosed(true); <START> assertEquals(sharedPrefs.getString("pref_key_native_tongue", null), <END> LanguageUtils.getDefaultLangCode()); }</code><technical_language>In environment. junit.framework.ComparisonFailure: expected:<[en]> was:<[zh]></technical_language>

Target:
public void testDialogClosed() { ExLangsPreference target = new ExLangsPreference(getActivity(), null, true, sharedPrefs); target.setKey("pref_key_native_tongue"); target.callOnDialogClosed(false); assertNull(target.persistedStringValue); target.setValue("base"); target.callOnDialogClosed(true); assertNotSame("base", target.persistedStringValue); }
Source:
<code>public SegmentLoaderLocalCacheManager( QueryableIndexFactory factory, SegmentLoaderConfig config, @Json ObjectMapper mapper ) { this.factory = factory; this.config = config; this.jsonMapper = mapper; this.locations = Sets.newTreeSet(new Comparator<StorageLocation>() { @Override public int compare(StorageLocation left, StorageLocation right) { <START> return -Longs.compare(left.available(), right.available()); <END> } }); for (StorageLocationConfig locationConfig : config.getLocations()) { locations.add(new StorageLocation(locationConfig.getPath(), locationConfig.getMaxSize())); } }</code><technical_language>standard java.lang.Long.compare(right.available(), left.available()). I suggested this form before</technical_language>

Target:
public SegmentLoaderLocalCacheManager( QueryableIndexFactory factory, SegmentLoaderConfig config, @Json ObjectMapper mapper ) { this.factory = factory; this.config = config; this.jsonMapper = mapper; this.locations = Sets.newTreeSet(new Comparator<StorageLocation>() { @Override public int compare(StorageLocation left, StorageLocation right) { return Longs.compare(right.available(), left.available()); } }); for (StorageLocationConfig locationConfig : config.getLocations()) { locations.add(new StorageLocation(locationConfig.getPath(), locationConfig.getMaxSize())); } }
Source:
<code>public static <TSource> Enumerable<TSource> except( Enumerable<TSource> source0, Enumerable<TSource> source1, boolean all) { Set<TSource> set = new HashSet<>(); <START> Collection<TSource> resultCollection = all ? HashMultiset.create() : new HashSet<>(); <END> source1.into(set); try (Enumerator<TSource> os = source0.enumerator()) { while (os.moveNext()) { TSource o = os.current(); if (set.contains(o)) { continue; } resultCollection.add(o); } return Linq4j.asEnumerable(resultCollection); } }</code><technical_language>Is a source of definition except/intersect implementation</technical_language>

Target:
public static <TSource> Enumerable<TSource> except( Enumerable<TSource> source0, Enumerable<TSource> source1, boolean all) { Collection<TSource> collection = all ? HashMultiset.create() : new HashSet<>(); source0.into(collection); try (Enumerator<TSource> os = source1.enumerator()) { while (os.moveNext()) { TSource o = os.current(); collection.remove(o); } return Linq4j.asEnumerable(collection); } }
Source:
<code>void handleDelayedWriteBookieFailure() { int curBlockAddCompletions = blockAddCompletions.get(); if (bk.getDisableEnsembleChangeFeature().isAvailable()) { if (LOG.isDebugEnabled()) { LOG.debug("Ensemble change is disabled. Failed bookies for ledger {}.", delayedWriteFailedBookies, ledgerId); } return; } int curNumEnsembleChanges = numEnsembleChanges.incrementAndGet(); if (curNumEnsembleChanges > maxAllowedEnsembleChanges) { if (LOG.isDebugEnabled()) { LOG.debug("Exceeding maxAllowedEnsembeChanges {}. Failed bookies for ledger {}.", maxAllowedEnsembleChanges, delayedWriteFailedBookies, ledgerId); } return; } if (writeFlags.contains(WriteFlag.DEFERRED_SYNC)) { if (LOG.isDebugEnabled()) { <START> LOG.debug("Cannot perform ensemble changee with writeflags {}." <END> + "Failed bookies for ledger {}.", writeFlags, delayedWriteFailedBookies, ledgerId); } return; } synchronized (metadata) { try { EnsembleInfo ensembleInfo = replaceBookieInMetadata(delayedWriteFailedBookies, curNumEnsembleChanges); if (ensembleInfo.replacedBookies.isEmpty()) { return; } if (LOG.isDebugEnabled()) { LOG.debug("[EnsembleChange-L{}-{}] : writing new ensemble info = {}", getId(), curNumEnsembleChanges, ensembleInfo); } writeLedgerConfig(new ChangeEnsembleCb(ensembleInfo, curBlockAddCompletions, curNumEnsembleChanges, false)); } catch (BKException.BKNotEnoughBookiesException e) { LOG.error("Could not get additional bookie to remake ensemble: {}", ledgerId); } delayedWriteFailedBookies.clear(); } }</code><technical_language>a typo changee</technical_language>

Target:
void handleDelayedWriteBookieFailure() { int curBlockAddCompletions = blockAddCompletions.get(); if (bk.getDisableEnsembleChangeFeature().isAvailable()) { if (LOG.isDebugEnabled()) { LOG.debug("Ensemble change is disabled. Failed bookies for ledger {}.", delayedWriteFailedBookies, ledgerId); } return; } int curNumEnsembleChanges = numEnsembleChanges.incrementAndGet(); if (curNumEnsembleChanges > maxAllowedEnsembleChanges) { if (LOG.isDebugEnabled()) { LOG.debug("Exceeding maxAllowedEnsembeChanges {}. Failed bookies for ledger {}.", maxAllowedEnsembleChanges, delayedWriteFailedBookies, ledgerId); } return; } if (writeFlags.contains(WriteFlag.DEFERRED_SYNC)) { if (LOG.isDebugEnabled()) { LOG.debug("Cannot perform ensemble change with writeflags {}." + "Failed bookies for ledger {}.", writeFlags, delayedWriteFailedBookies, ledgerId); } return; } synchronized (metadata) { try { EnsembleInfo ensembleInfo = replaceBookieInMetadata(delayedWriteFailedBookies, curNumEnsembleChanges); if (ensembleInfo.replacedBookies.isEmpty()) { return; } if (LOG.isDebugEnabled()) { LOG.debug("[EnsembleChange-L{}-{}] : writing new ensemble info = {}", getId(), curNumEnsembleChanges, ensembleInfo); } writeLedgerConfig(new ChangeEnsembleCb(ensembleInfo, curBlockAddCompletions, curNumEnsembleChanges, false)); } catch (BKException.BKNotEnoughBookiesException e) { LOG.error("Could not get additional bookie to remake ensemble: {}", ledgerId); } delayedWriteFailedBookies.clear(); } }
Source:
<code>@Override Bitmap decodeStream(InputStream stream, PicassoBitmapOptions options) throws IOException { if (options != null && options.inJustDecodeBounds) { InputStream is = null; try { <START> BitmapFactory.decodeStream(is, null, options); <END> } finally { Utils.closeQuietly(is); } calculateInSampleSize(options); } return BitmapFactory.decodeStream(stream, null, options); }</code><technical_language>is is null</technical_language>

Target:
private Bitmap decodeStream(InputStream stream, PicassoBitmapOptions options) throws IOException { if (options != null && options.inJustDecodeBounds) { InputStream is = getInputStream(); try { BitmapFactory.decodeStream(is, null, options); } finally { Utils.closeQuietly(is); } calculateInSampleSize(options); } return BitmapFactory.decodeStream(stream, null, options); }