auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public static void removeCustomTraceType(Class<? extends ITmfTrace> traceClass, String category, String definitionName) { String traceTypeId = null; if (traceClass.equals(CustomTxtTrace.class)) { CustomTxtTraceDefinition def = CustomTxtTraceDefinition.load(category, definitionName); <START> if (def != null) { <END> traceTypeId = CustomTxtTrace.buildTraceTypeId(category, definitionName); } } else if (traceClass.equals(CustomXmlTrace.class)) { CustomXmlTraceDefinition def = CustomXmlTraceDefinition.load(category, definitionName); if (def != null) { traceTypeId = CustomXmlTrace.buildTraceTypeId(category, definitionName); } } if (traceTypeId != null) { TraceTypeHelper helper = TRACE_TYPES.remove(traceTypeId); if (helper != null) { helper.getTrace().dispose(); } } }</code><technical_language>called delete button in Manage Custom Parsers dialog, definition removed xml file, load returns null. This prevents helper removed properly</technical_language>

Target:
public static void removeCustomTraceType(Class<? extends ITmfTrace> traceClass, String category, String definitionName) { String traceTypeId = null; if (traceClass.equals(CustomTxtTrace.class)) { traceTypeId = CustomTxtTrace.buildTraceTypeId(category, definitionName); } else if (traceClass.equals(CustomXmlTrace.class)) { traceTypeId = CustomXmlTrace.buildTraceTypeId(category, definitionName); } if (traceTypeId != null) { TraceTypeHelper helper = TRACE_TYPES.remove(traceTypeId); if (helper != null) { helper.getTrace().dispose(); } } }
Source:
<code>public BigtableOptions toBigtableOptions() { return new BigtableOptions.Builder() .setProjectId(getProjectId()) .setZoneId(getZoneId()) .setClusterId(getClusterId()) <START> .setUserAgent("CloudBigtableGrpcIO") <END> .build(); }</code><technical_language>mention dataflow? IO</technical_language>

Target:
public BigtableOptions toBigtableOptions() { return new BigtableOptions.Builder() .setProjectId(getProjectId()) .setZoneId(getZoneId()) .setClusterId(getClusterId()) .setUserAgent("CloudBigtableDataflow") .build(); }
Source:
<code>private boolean isNewDeveloperCode(final String chplProductNumber) { String devCode = chplProductNumberUtil.getDeveloperCode(chplProductNumber); <START> return !StringUtils.isEmpty(devCode) && devCode.contentEquals(NEW_DEVELOPER_CODE); <END> }</code><technical_language>I StringUtils.equals(devCode, NEW_DEVELOPER_CODE), handles case devCode null, in places this</technical_language>

Target:
private boolean isNewDeveloperCode(final String chplProductNumber) { String devCode = chplProductNumberUtil.getDeveloperCode(chplProductNumber); return StringUtils.equals(devCode, NEW_DEVELOPER_CODE); }
Source:
<code><START> public static <E> Set<E> asSet(Optional<E> opt) { <END> return opt.map(v -> ImmutableSet.of(v)).orElseGet(() -> ImmutableSet.of()); }</code><technical_language>changing this ImmutableSet</technical_language>

Target:
public static <E> Collection<E> asSet(Optional<E> opt) { if (opt.isPresent()) { return Collections.singleton(opt.get()); } return Collections.emptySet(); }
Source:
<code>public void run() { plumber = initPlumber(); try { plumber.startJob(); firehose = initFirehose(); final CommitterMaker committerMaker = CommitterMakers.fromFirehose(firehose); while (firehose.hasMore()) { final InputRow inputRow; try { inputRow = firehose.nextRow(); if (inputRow == null) { log.debug("thrown away null input row, considering unparseable"); metrics.incrementUnparseable(); continue; } } catch (ParseException e) { <START> log.debug(e, "thrown away line due to exception, considering unparseable"); <END> metrics.incrementUnparseable(); continue; } boolean lateEvent = false; boolean indexLimitExceeded = false; try { lateEvent = plumber.add(inputRow, committerMaker) == -1; } catch (IndexSizeExceededException e) { log.info("Index limit exceeded: %s", e.getMessage()); indexLimitExceeded = true; } if (indexLimitExceeded || lateEvent) { metrics.incrementThrownAway(); log.debug("Throwing away event[%s]", inputRow); if (indexLimitExceeded) { plumber.persist(committerMaker.makeCommitter()); } continue; } metrics.incrementProcessed(); } } catch (RuntimeException e) { log.makeAlert( e, "RuntimeException aborted realtime processing[%s]", fireDepartment.getDataSchema().getDataSource() ).emit(); normalExit = false; throw e; } catch (Error e) { log.makeAlert(e, "Exception aborted realtime processing[%s]", fireDepartment.getDataSchema().getDataSource()) .emit(); normalExit = false; throw e; } finally { CloseQuietly.close(firehose); if (normalExit) { plumber.finishJob(); plumber = null; firehose = null; } } }</code><technical_language>a significant change in behavior. Is needed for this PR</technical_language>

Target:
public void run() { plumber = initPlumber(); try { Object metadata = plumber.startJob(); if (fireDepartment.checkFirehoseV2()) { firehoseV2 = initFirehoseV2(metadata); runFirehoseV2(firehoseV2); } else { firehose = initFirehose(); runFirehose(firehose); } } catch (RuntimeException e) { log.makeAlert( e, "RuntimeException aborted realtime processing[%s]", fireDepartment.getDataSchema().getDataSource() ).emit(); normalExit = false; throw e; } catch (Error e) { log.makeAlert(e, "Exception aborted realtime processing[%s]", fireDepartment.getDataSchema().getDataSource()) .emit(); normalExit = false; throw e; } finally { CloseQuietly.close(firehose); if (normalExit) { plumber.finishJob(); plumber = null; firehose = null; } } }
Source:
<code>public static ZonedDateTime toZonedDateTime(Calendar calendar) { if (calendar == null) { return null; } <START> return ofInstant(calendar.toInstant(), ZoneId.of("UTC")); <END> }</code><technical_language>ZoneOffset.UTC instead of ZoneId.of("UTC")</technical_language>

Target:
public static ZonedDateTime toZonedDateTime(Calendar calendar) { if (calendar == null) { return null; } return ZonedDateTime.ofInstant(calendar.toInstant(), ZoneOffset.UTC); }
Source:
<code>public static MapParser create(File file) throws IOException { String name = file.getName(); Matcher stuff = SESSION_PATTERN.matcher(name); stuff.matches(); <START> long sessionId = new BigInteger(stuff.group(1), 16).longValue(); <END> LineIterator iter = FileUtils.lineIterator(file); NavigableMap<Long, MapEntry> entries = new TreeMap<>(); while (iter.hasNext()) { String line = iter.next(); Matcher matcher = MAPFILE_PATTERN.matcher(line); matcher.matches(); long addrLow = Long.parseUnsignedLong(matcher.group(1), 16); long addrHigh = Long.parseUnsignedLong(matcher.group(2), 16); Perms perms = Perms.create(matcher.group(3)); long offset = Long.parseLong(matcher.group(4), 16); char deviceHigh = (char) Integer.parseInt(matcher.group(5), 16); char deviceLow = (char) Integer.parseInt(matcher.group(6), 16); long iNode = Long.parseLong(matcher.group(7), 16); String pathName = matcher.group(8); entries.put(addrLow, new MapEntry(addrLow, addrHigh, perms, offset, deviceLow, deviceHigh, iNode, pathName)); } return new MapParser(sessionId, entries); }</code><technical_language>avoid needing BigInteger, Long.parseUnsignedLong</technical_language>

Target:
public static MapParser create(File file) throws IOException { String name = file.getName(); Matcher stuff = SESSION_PATTERN.matcher(name); stuff.matches(); long sessionId = Long.parseUnsignedLong(stuff.group(1), 16); LineIterator iter = FileUtils.lineIterator(file); NavigableMap<Long, MapEntry> entries = new TreeMap<>(); while (iter.hasNext()) { String line = iter.next(); Matcher matcher = MAPFILE_PATTERN.matcher(line); matcher.matches(); long addrLow = Long.parseUnsignedLong(matcher.group(1), 16); long addrHigh = Long.parseUnsignedLong(matcher.group(2), 16); Perms perms = Perms.create(matcher.group(3)); long offset = Long.parseLong(matcher.group(4), 16); char deviceHigh = (char) Integer.parseInt(matcher.group(5), 16); char deviceLow = (char) Integer.parseInt(matcher.group(6), 16); long iNode = Long.parseLong(matcher.group(7), 16); String pathName = matcher.group(8); entries.put(addrLow, new MapEntry(addrLow, addrHigh, perms, offset, deviceLow, deviceHigh, iNode, pathName)); } return new MapParser(sessionId, entries); }
Source:
<code>public String getConnectionUrl() { StringBuilder stringBuilder = new StringBuilder(); String account = this.account.getStringValue(); if (account == null || account.isEmpty()) { throw new IllegalArgumentException(i18nMessages.getMessage("error.missingAccount")); } String warehouse = this.warehouse.getStringValue(); String db = this.db.getStringValue(); String schema = this.schemaName.getStringValue(); String role = this.role.getStringValue(); String tracing = this.tracing.getStringValue(); appendProperty("warehouse", warehouse, stringBuilder); appendProperty("db", db, stringBuilder); appendProperty("schema", schema, stringBuilder); appendProperty("role", role, stringBuilder); appendProperty("tracing", tracing, stringBuilder); Provider prov = this.provider.getValue(); String azure = ""; if (prov == Provider.AZURE) { String region = this.azureRegion.getValue().getRegion(); azure = "." + region + ".azure"; } String url = new StringBuilder().append("jdbc:snowflake://") .append(account) .append(azure) .append(".snowflakecomputing.com") .append("/?") .append(stringBuilder) .toString(); <START> if (LOGGER.isDebugEnabled()) <END> LOGGER.debug("Snowflake connection jdbc URL : " + url); return url; }</code><technical_language>Add braces please</technical_language>

Target:
public String getConnectionUrl() { StringBuilder connectionParams = new StringBuilder(); String account = this.account.getStringValue(); if (account == null || account.isEmpty()) { throw new IllegalArgumentException(i18nMessages.getMessage("error.missingAccount")); } String regionID = useCustomRegion.getValue() ? this.customRegionID.getValue() : this.region.getValue().getRegionID(); String warehouse = this.warehouse.getStringValue(); String db = this.db.getStringValue(); String schema = this.schemaName.getStringValue(); String role = this.role.getStringValue(); String tracing = this.tracing.getStringValue(); appendProperty("warehouse", warehouse, connectionParams); appendProperty("db", db, connectionParams); appendProperty("schema", schema, connectionParams); appendProperty("role", role, connectionParams); appendProperty("tracing", tracing, connectionParams); StringBuilder url = new StringBuilder() .append("jdbc:snowflake://") .append(account); if (!StringUtils.isEmpty(regionID)) { url.append(".").append(regionID); } url.append(".snowflakecomputing.com") .append("/?") .append(connectionParams); if (LOGGER.isDebugEnabled()) { LOGGER.debug("Snowflake connection jdbc URL : " + url); } return url.toString(); }
Source:
<code>private static boolean shouldBeAloneOnLine(RightCurlyOption bracePolicy, Details details) { final int tokenLambda = details.lcurly.getParent().getType(); return bracePolicy == RightCurlyOption.ALONE && tokenLambda != TokenTypes.LAMBDA && !isAloneOnLine(details) && !isEmptyBody(details.lcurly) || shouldBeAloneInLambda(bracePolicy, details) || shouldBeAloneOrSingleLine(bracePolicy, details); <START> } <END></code><technical_language>I do implementation of this method now. i more hard read before. Please split RightCurlyOption.ALONE RightCurlyOption.ALONE_OR_SINGLELINE code return (bracePolicy == RightCurlyOption.ALONE && ............) || (bracePolicy == RightCurlyOption.ALONE_OR_SINGLELINE && ............) completely split this method for ALONE_OR_SINGLELINE , check for policy in validate</technical_language>

Target:
private static boolean shouldBeAloneOnLine(RightCurlyOption bracePolicy, Details details) { final int tokenLambda = details.lcurly.getParent().getType(); return bracePolicy == RightCurlyOption.ALONE && tokenLambda != TokenTypes.LAMBDA && !isAloneOnLine(details) && !isEmptyBody(details.lcurly) || bracePolicy == RightCurlyOption.ALONE_OR_SINGLELINE && !isAloneOnLine(details) && !isSingleLineBlock(details) && !isAnonInnerClassInit(details.lcurly) && !isEmptyBody(details.lcurly) || bracePolicy == RightCurlyOption.ALONE && tokenLambda == TokenTypes.LAMBDA && !isAloneLambda(details); }
Source:
<code>public DataContainer toContainer() { return new MemoryDataContainer() <START> .set(Keys.BOOK_AUTHOR.getQuery(), this.getValue()); <END> }</code><technical_language>intending send DataContainer JSON string representation of Text object</technical_language>

Target:
public DataContainer toContainer() { return new MemoryDataContainer() .set(Keys.BOOK_AUTHOR.getQuery(), Texts.json().to(this.getValue())); }
Source:
<code>public Multimap<String, String> createHttpHeadersForResource(final UriInfo uriInfo, final FedoraResource resource) { final Session internalSession = sessionFactory.getInternalSession(); final IdentifierConverter<Resource, FedoraResource> translator = new DefaultIdentifierTranslator(internalSession); final Model model = createDefaultModel(); final ListMultimap<String, String> headers = ArrayListMultimap.create(); LOGGER.debug("Adding WebAC Link Header for Resource: {}", resource); final Optional<Pair<URI, FedoraResource>> acls = WebACRolesProvider.getEffectiveAcl(resource); if (acls.isPresent()) { nodeService.find(internalSession, acls.get().getRight().getPath()) .getTriples(translator, PropertiesRdfContext.class) .filter(t -> model.asStatement(t).getPredicate().hasURI(WEBAC_ACCESS_CONTROL_VALUE)) .filter(t -> t.getObject().isURI()) <START> .forEachRemaining(t -> { <END> headers.put("Link", Link.fromUri(uriInfo.getBaseUriBuilder() .path(translator.convert(model.asStatement(t).getObject().asResource()).getPath()) .toString()).rel("acl").build().toString()); }); } return headers; }</code><technical_language>break this some variable names</technical_language>

Target:
public Multimap<String, String> createHttpHeadersForResource(final UriInfo uriInfo, final FedoraResource resource) { final Session internalSession = sessionFactory.getInternalSession(); final IdentifierConverter<Resource, FedoraResource> translator = new DefaultIdentifierTranslator(internalSession); final ListMultimap<String, String> headers = ArrayListMultimap.create(); LOGGER.debug("Adding WebAC Link Header for Resource: {}", resource); WebACRolesProvider.getEffectiveAcl(resource).ifPresent(acls -> { nodeService.find(internalSession, acls.resource.getPath()) .getTriples(translator, PropertiesRdfContext.class) .asModel().listObjectsOfProperty(createProperty(WEBAC_ACCESS_CONTROL_VALUE)) .forEachRemaining(linkObj -> { if (linkObj.isURIResource()) { final Resource acl = linkObj.asResource(); final String aclPath = translator.convert(acl).getPath(); final URI aclUri = uriInfo.getBaseUriBuilder().path(aclPath).build(); headers.put("Link", Link.fromUri(aclUri).rel("acl").build().toString()); } }); }); return headers; }
Source:
<code>public void securityTokenDiscovered(final Transport transport) { if (!mTagHandlingEnabled) return; new AsyncTask<Void, Void, IOException>() { @Override protected void onPreExecute() { super.onPreExecute(); onSecurityTokenPreExecute(); } @Override protected IOException doInBackground(Void... params) { try { <START> handleSmartcard(transport); <END> } catch (IOException e) { return e; } return null; } @Override protected void onPostExecute(IOException exception) { super.onPostExecute(exception); if (exception != null) { handleSmartcardError(exception); return; } onSecurityTokenPostExecute(); } }.execute(); }</code><technical_language>called smartcard</technical_language>

Target:
public void securityTokenDiscovered(final Transport transport) { if (!mTagHandlingEnabled) return; new AsyncTask<Void, Void, IOException>() { @Override protected void onPreExecute() { super.onPreExecute(); onSecurityTokenPreExecute(); } @Override protected IOException doInBackground(Void... params) { try { handleSecurityToken(transport); } catch (IOException e) { return e; } return null; } @Override protected void onPostExecute(IOException exception) { super.onPostExecute(exception); if (exception != null) { handleSecurityTokenError(exception); return; } onSecurityTokenPostExecute(); } }.execute(); }
Source:
<code>@Override protected void beforeTestsStarted() throws Exception { super.beforeTestsStarted(); ctx = new AnnotationConfigApplicationContext(); ctx.register(ApplicationConfiguration.class); ctx.refresh(); repo = ctx.getBean(PersonRepository.class); repo2 = ctx.getBean(PersonSecondRepository.class); <START> for (int i = 0; i < CACHE_SIZE; i++) <END> repo.save(i, new Person("person" + Integer.toHexString(i), "lastName" + Integer.toHexString((i + 16) % 256))); }</code><technical_language>Need bracers for multistring for statement</technical_language>

Target:
@Override protected void beforeTestsStarted() throws Exception { super.beforeTestsStarted(); ctx = new AnnotationConfigApplicationContext(); ctx.register(ApplicationConfiguration.class); ctx.refresh(); repo = ctx.getBean(PersonRepository.class); repo2 = ctx.getBean(PersonSecondRepository.class); for (int i = 0; i < CACHE_SIZE; i++) { repo.save(i, new Person("person" + Integer.toHexString(i), "lastName" + Integer.toHexString((i + 16) % 256))); } }
Source:
<code>public Build extract(NpmProject npmProject) throws Exception { String resolutionRepository = npmProject.getResolutionRepository(); List<String> installationArgs = npmProject.getInstallationArgs(); Path workingDir = npmProject.getWorkingDir(); preparePrerequisites(resolutionRepository, workingDir); createTempNpmrc(workingDir, installationArgs); runInstall(workingDir, installationArgs); restoreNpmrc(workingDir); List<Dependency> dependencies = collectDependencies(workingDir); <START> String moduleId = org.apache.commons.lang.StringUtils.isNotBlank(module) ? module : npmPackageInfo.toString(); <END> return createBuild(dependencies,moduleId); }</code><technical_language>reason **org.apache.commons.lang.StringUtils** imported **StringUtils**</technical_language>

Target:
public Build extract(NpmProject npmProject) throws Exception { String resolutionRepository = npmProject.getResolutionRepository(); List<String> installationArgs = npmProject.getInstallationArgs(); Path workingDir = npmProject.getWorkingDir(); preparePrerequisites(resolutionRepository, workingDir); createTempNpmrc(workingDir, installationArgs); runInstall(workingDir, installationArgs); restoreNpmrc(workingDir); List<Dependency> dependencies = collectDependencies(workingDir); String moduleId = StringUtils.isNotBlank(module) ? module : npmPackageInfo.toString(); return createBuild(dependencies,moduleId); }
Source:
<code>public void tearDown() throws Exception { Intents.release(); baseActivityTestRule.finishActivity(); StorageOperations.deleteDir(tmpPath); <START> try { <END> StorageOperations.deleteDir(new File(PathBuilder.buildProjectPath(projectName))); } catch (IOException e) { Log.d(getClass().getSimpleName(), "couldnt clean up project"); } TestUtils.deleteProjects(this.getClass().getSimpleName()); }</code><technical_language>doesnt this do try catch block above</technical_language>

Target:
public void tearDown() throws Exception { Intents.release(); baseActivityTestRule.finishActivity(); StorageOperations.deleteDir(tmpPath); TestUtils.deleteProjects(this.getClass().getSimpleName()); }
Source:
<code>public static Uri getUriForFile(Context context, File file) { <START> return FileProvider.getUriForFile(context, "net.osmand.plus.fileprovider", file); <END> }</code><technical_language>correct</technical_language>

Target:
public static Uri getUriForFile(Context context, File file) { return FileProvider.getUriForFile(context, context.getPackageName() + ".fileprovider", file); }
Source:
<code><START> public static SQLDialect getDialect(String type) { <END> if (type.equalsIgnoreCase(H2_DIALECT.getDialectType())) { return H2_DIALECT; } else if (type.equalsIgnoreCase(HIVE_DIALECT.getDialectType())) { return HIVE_DIALECT; } else if (type.equalsIgnoreCase(PRESTO_DIALECT.getDialectType())) { return PRESTO_DIALECT; } else { throw new IllegalArgumentException("Unsupported SQL Dialect Type: " + type); } }</code><technical_language>Instead of instantiation string name, pass class name reflection load dialect a plugin</technical_language>

Target:
public static SQLDialect getDialect(String type) { if (type.equalsIgnoreCase(H2_DIALECT.getDialectType())) { return H2_DIALECT; } else if (type.equalsIgnoreCase(HIVE_DIALECT.getDialectType())) { return HIVE_DIALECT; } else if (type.equalsIgnoreCase(PRESTODB_DIALECT.getDialectType())) { return PRESTODB_DIALECT; } else { try { return (SQLDialect) Class.forName(type).getConstructor().newInstance(); } catch (ClassNotFoundException e) { throw new IllegalArgumentException("Unsupported SQL Dialect: " + type, e); } catch (Exception e) { throw new IllegalArgumentException("Failed to instantiate SQL Dialect: " + type, e); } } }
Source:
<code>public static Slice currentPath(ConnectorSession session) { <START> return utf8Slice(requireNonNull(session.getPath(), "session path is null")); <END> }</code><technical_language>session.getPath() null? If yes, instead of throwing a NPE (which requireNonNull do) do throw new PrestoException(INVALID_FUNCTION_ARGUMENT, "Session path is null");</technical_language>

Target:
public static Slice currentPath(ConnectorSession session) { if (session.getPath() == null) { throw new PrestoException(INVALID_FUNCTION_ARGUMENT, "Session path is null"); } return utf8Slice(session.getPath()); }
Source:
<code>public IpPermission(IpProtocol ipProtocol, int fromPort, int toPort, Multimap<String, String> tenantIdGroupNamePairs, Iterable<String> groupIds, <START> Iterable<String> cidrBlocks, RangeSet<Integer> ports) { <END> this.fromPort = fromPort; this.toPort = toPort; this.tenantIdGroupNamePairs = ImmutableMultimap.copyOf(checkNotNull(tenantIdGroupNamePairs, "tenantIdGroupNamePairs")); this.ipProtocol = checkNotNull(ipProtocol, "ipProtocol"); this.groupIds = ImmutableSet.copyOf(checkNotNull(groupIds, "groupIds")); this.cidrBlocks = ImmutableSet.copyOf(checkNotNull(cidrBlocks, "cidrBlocks")); this.ports = ports == null ? TreeRangeSet.<Integer>create() : ports; }</code><technical_language>a backwards-compatible constructor? OK breaking change here</technical_language>

Target:
public IpPermission(IpProtocol ipProtocol, int fromPort, int toPort, Multimap<String, String> tenantIdGroupNamePairs, Iterable<String> groupIds, Iterable<String> cidrBlocks, RangeSet<Integer> ports) { this.fromPort = fromPort; this.toPort = toPort; this.tenantIdGroupNamePairs = ImmutableMultimap.copyOf(checkNotNull(tenantIdGroupNamePairs, "tenantIdGroupNamePairs")); this.ipProtocol = checkNotNull(ipProtocol, "ipProtocol"); this.groupIds = ImmutableSet.copyOf(checkNotNull(groupIds, "groupIds")); this.cidrBlocks = ImmutableSet.copyOf(checkNotNull(cidrBlocks, "cidrBlocks")); this.ports = ImmutableRangeSet.copyOf(checkNotNull(ports, "ports")); }
Source:
<code><START> private Map<String, Object> convertOssToW3C(Map<String, Object> capabilities) { <END> if (capabilities == null) { return null; } Map<String, Object> toReturn = new TreeMap<>(); toReturn.putAll(capabilities); if (capabilities.containsKey(PLATFORM) && !capabilities.containsKey(PLATFORM_NAME)) { toReturn.put(PLATFORM_NAME, String.valueOf(capabilities.get(PLATFORM))); } return toReturn; }</code><technical_language>mark Nullable</technical_language>

Target:
private @Nullable Map<String, Object> convertOssToW3C(Map<String, Object> capabilities) { if (capabilities == null) { return null; } Map<String, Object> toReturn = new TreeMap<>(); toReturn.putAll(capabilities); if (capabilities.containsKey(PLATFORM) && !capabilities.containsKey(PLATFORM_NAME)) { toReturn.put(PLATFORM_NAME, String.valueOf(capabilities.get(PLATFORM))); } return toReturn; }
Source:
<code>public void TestMakeClassifiersWithNoInferredFieldsKey() { Parameters p = Parameters.getAllDefaultParameters(); MultiEncoder me = MultiEncoder.builder().name("").build(); Layer<Map<String, Object>> l = new Layer<>( p, me, new SpatialPooler(), new TemporalMemory(), true, null ); try { <START> NamedTuple nt = l.makeClassifiers(l.getEncoder()); <END> } catch (IllegalStateException e) { assertTrue(e.getMessage().contains("KEY.INFERRED_FIELDS")); assertTrue(e.getMessage().contains("null")); assertTrue(e.getMessage().contains("empty")); } }</code><technical_language>Please change to: l.makeClassifiers(l.getEncoder()); remove assignment local variable "unused" warning is removed</technical_language>

Target:
public void TestMakeClassifiersWithNoInferredFieldsKey() { Parameters p = Parameters.getAllDefaultParameters(); MultiEncoder me = MultiEncoder.builder().name("").build(); Layer<Map<String, Object>> l = new Layer<>( p, me, new SpatialPooler(), new TemporalMemory(), true, null ); try { l.makeClassifiers(l.getEncoder()); } catch (IllegalStateException e) { assertTrue(e.getMessage().contains("KEY.INFERRED_FIELDS")); assertTrue(e.getMessage().contains("null")); assertTrue(e.getMessage().contains("empty")); } }
Source:
<code>public URN urn() { try { return URN.create( <START> new JdkRequest(UriBuilder.fromUri(this.home).build()) <END> .header(HttpHeaders.ACCEPT, MediaType.APPLICATION_XML) .header(HttpHeaders.AUTHORIZATION, this.token) .method(Request.GET) .fetch() .as(RestResponse.class) .assertStatus(HttpURLConnection.HTTP_OK) .as(XmlResponse.class) .assertXPath("/page/identity") .xml() .xpath("/page/identity/urn/text()") .get(0) ); } catch (IOException ex) { throw new IllegalStateException(ex); } }</code><technical_language>need UriBuilder</technical_language>

Target:
public URN urn() { try { return URN.create( new JdkRequest(this.home) .header(HttpHeaders.ACCEPT, MediaType.APPLICATION_XML) .header(HttpHeaders.AUTHORIZATION, this.token) .fetch() .as(RestResponse.class) .assertStatus(HttpURLConnection.HTTP_OK) .as(XmlResponse.class) .assertXPath("/page/identity") .xml() .xpath("/page/identity/urn/text()") .get(0) ); } catch (IOException ex) { throw new IllegalStateException(ex); } }
Source:
<code>public void actionPerformed(ActionEvent actionEvent) { <START> int result = chooser.showOpenDialog(FittingMainView.this); <END> if (result == JFileChooser.APPROVE_OPTION) { try { controller.save(new FileOutputStream(chooser.getSelectedFile())); } catch(FileNotFoundException ex) { NarrowOptionPane.showMessageDialog(FittingMainView.this, ex.getMessage(), "Error", NarrowOptionPane.ERROR_MESSAGE); } } }</code><technical_language>chooser.showSaveDialog()</technical_language>

Target:
public void actionPerformed(ActionEvent actionEvent) { int result = chooser.showSaveDialog(FittingMainView.this); if (result == JFileChooser.APPROVE_OPTION) { try { controller.save(new FileOutputStream(chooser.getSelectedFile())); } catch(FileNotFoundException ex) { NarrowOptionPane.showMessageDialog(FittingMainView.this, ex.getMessage(), "Error", NarrowOptionPane.ERROR_MESSAGE); } } }
Source:
<code>private BackendProperties getBackendProperties(String backend) { BackendProperties properties = backends.get(backend); <START> if(properties.getSharedConfigName() != null && !properties.getSharedConfigName().isEmpty() ) { <END> return getSharedConfigProperties(properties.getSharedConfigName()); } return properties; }</code><technical_language>replace if(!StringUtils.isEmpty(backendProperties.getSharedConfigName())) { for code readability</technical_language>

Target:
private BackendProperties getBackendProperties(String backend) { BackendProperties backendProperties = backends.get(backend); if(!StringUtils.isEmpty(backendProperties.getSharedConfigName())) { return getSharedConfigProperties(backendProperties.getSharedConfigName()); } return backendProperties; }
Source:
<code>private void setResultsVisibleFromTime(FeedbackSessionAttributes newSession) { String type = getRequestParamValue(Const.ParamsNames.FEEDBACK_SESSION_RESULTSVISIBLEBUTTON); <START> switch (type) { <END> case Const.INSTRUCTOR_FEEDBACK_RESULTS_VISIBLE_TIME_CUSTOM: newSession.setResultsVisibleFromTime(TimeHelper.combineDateTime( getRequestParamValue(Const.ParamsNames.FEEDBACK_SESSION_PUBLISHDATE), getRequestParamValue(Const.ParamsNames.FEEDBACK_SESSION_PUBLISHTIME))); break; case Const.INSTRUCTOR_FEEDBACK_RESULTS_VISIBLE_TIME_ATVISIBLE: newSession.setResultsVisibleFromTime(Const.TIME_REPRESENTS_FOLLOW_VISIBLE); break; case Const.INSTRUCTOR_FEEDBACK_RESULTS_VISIBLE_TIME_LATER: newSession.setResultsVisibleFromTime(Const.TIME_REPRESENTS_LATER); break; case Const.INSTRUCTOR_FEEDBACK_RESULTS_VISIBLE_TIME_NEVER: newSession.setResultsVisibleFromTime(Const.TIME_REPRESENTS_NEVER); break; default: log.severe("Invalid resultsVisibleFrom setting in creating" + newSession.getIdentificationString()); break; } }</code><technical_language>type is once, I recommend inlining method call, e.g. switch (getRequestParamValue(Const.ParamsNames.FEEDBACK_SESSION_RESULTSVISIBLEBUTTON)). for other similar method</technical_language>

Target:
private void setResultsVisibleFromTime(FeedbackSessionAttributes newSession) { switch (getRequestParamValue(Const.ParamsNames.FEEDBACK_SESSION_RESULTSVISIBLEBUTTON)) { case Const.INSTRUCTOR_FEEDBACK_RESULTS_VISIBLE_TIME_CUSTOM: newSession.setResultsVisibleFromTime(TimeHelper.combineDateTime( getRequestParamValue(Const.ParamsNames.FEEDBACK_SESSION_PUBLISHDATE), getRequestParamValue(Const.ParamsNames.FEEDBACK_SESSION_PUBLISHTIME))); break; case Const.INSTRUCTOR_FEEDBACK_RESULTS_VISIBLE_TIME_ATVISIBLE: newSession.setResultsVisibleFromTime(Const.TIME_REPRESENTS_FOLLOW_VISIBLE); break; case Const.INSTRUCTOR_FEEDBACK_RESULTS_VISIBLE_TIME_LATER: newSession.setResultsVisibleFromTime(Const.TIME_REPRESENTS_LATER); break; case Const.INSTRUCTOR_FEEDBACK_RESULTS_VISIBLE_TIME_NEVER: newSession.setResultsVisibleFromTime(Const.TIME_REPRESENTS_NEVER); break; default: log.severe("Invalid resultsVisibleFrom setting in creating" + newSession.getIdentificationString()); break; } }
Source:
<code>public void setNoScroll(boolean value) { <START> if (value) { <END> contentScrollPanel.getElement().getStyle().setOverflow(Overflow.VISIBLE); } }</code><technical_language>if is false? e.g. calling setNoScroll(true) setNoScroll(false)</technical_language>

Target:
public void setNoScroll(boolean value) { if (value) { contentScrollPanel.getElement().getStyle().setOverflow(Overflow.VISIBLE); } else { contentScrollPanel.getElement().getStyle().setOverflow(Overflow.AUTO); } }
Source:
<code>private static Map<AbstractProject,DependencyChange> getDependencyChanges(Run<?,?> run) { <START> AbstractBuild<?,?> build = null; <END> if(run instanceof AbstractBuild) return ((AbstractBuild) run).getDependencyChanges((AbstractBuild)run); else return Maps.newHashMap(); }</code><technical_language>Unused</technical_language>

Target:
private static Map<AbstractProject,DependencyChange> getDependencyChanges(Run<?,?> run) { if(run instanceof AbstractBuild) return ((AbstractBuild) run).getDependencyChanges((AbstractBuild)run); else return Maps.newHashMap(); }
Source:
<code>public void customAuthoritiesMappingFunction() { populator.setAuthorityMapper(record -> { String dn = record.get(SpringSecurityLdapTemplate.DN_KEY).get(0); String role = record.get(populator.getGroupRoleAttribute()).get(0); return new LdapAuthority(role, dn); }); DirContextAdapter ctx = new DirContextAdapter(new DistinguishedName( "cn=mouse\\, jerry,ou=people,dc=springframework,dc=org")); <START> Set<String> authorities = AuthorityUtils.authorityListToSet(populator <END> .getGrantedAuthorities(ctx, "notused")); assertThat(authorities).allMatch(LdapAuthority.class::isInstance); }</code><technical_language>Right authorities transformed Strings instances of LdapAuthority. If remove AuthorityUtils.authorityListToSet test work correctly</technical_language>

Target:
public void customAuthoritiesMappingFunction() { populator.setAuthorityMapper(record -> { String dn = record.get(SpringSecurityLdapTemplate.DN_KEY).get(0); String role = record.get(populator.getGroupRoleAttribute()).get(0); return new LdapAuthority(role, dn); }); DirContextAdapter ctx = new DirContextAdapter(new DistinguishedName( "cn=mouse\\, jerry,ou=people,dc=springframework,dc=org")); Collection<GrantedAuthority> authorities = populator.getGrantedAuthorities(ctx, "notused"); assertThat(authorities).allMatch(LdapAuthority.class::isInstance); }
Source:
<code>public static ErlangSpecification getSpecification(@Nullable ErlangFunction function) { if (function == null) return null; List<ErlangSpecification> specifications = ((ErlangFile) function.getContainingFile()).getSpecifications(); for (ErlangSpecification spec : specifications) { ErlangSpecFun specFun = spec != null ? PsiTreeUtil.findChildOfType(spec, ErlangSpecFun.class) : null; String funName = specFun != null ? getAtomName(specFun.getQAtom()) : null; <START> if (function.getName().equals(funName)) return spec; <END> } return null; }</code><technical_language>wrong. Please org.intellij.erlang.psi.ErlangSpecFun#getReference isReferenceTo() method</technical_language>

Target:
public static ErlangSpecification getSpecification(@Nullable ErlangFunction function) { function = getOriginalErlangFunction(function); if (function == null) return null; List<ErlangSpecification> specifications = ((ErlangFile) function.getContainingFile()).getSpecifications(); for (ErlangSpecification spec : specifications) { ErlangSpecFun specFun = spec != null ? PsiTreeUtil.findChildOfType(spec, ErlangSpecFun.class) : null; if (specFun != null && specFun.getReference() != null && specFun.getReference().isReferenceTo(function)) { return spec; } } return null; }
Source:
<code>protected void readGeneralData(XmlNode content) { XmlNode node = content.SelectSingleNode("Name"); if (node != null) { _vmTemplate.setname(node.InnerText); name = _vmTemplate.getname(); } node = content.SelectSingleNode("TemplateId"); if (node != null) { if (!StringHelper.isNullOrEmpty(node.InnerText)) { _vmTemplate.setId(new Guid(node.InnerText)); } } node = content.SelectSingleNode("IsDisabled"); if (node != null) { <START> if (!StringUtils.isEmpty(node.InnerText)) { <END> _vmTemplate.setDisabled(Boolean.parseBoolean(node.InnerText)); } } }</code><technical_language>if clause is necessary Boolean.parseBoolean handle null empty strings</technical_language>

Target:
protected void readGeneralData(XmlNode content) { XmlNode node = content.SelectSingleNode("Name"); if (node != null) { _vmTemplate.setname(node.InnerText); name = _vmTemplate.getname(); } node = content.SelectSingleNode("TemplateId"); if (node != null) { if (!StringHelper.isNullOrEmpty(node.InnerText)) { _vmTemplate.setId(new Guid(node.InnerText)); } } node = content.SelectSingleNode("IsDisabled"); if (node != null) { _vmTemplate.setDisabled(Boolean.parseBoolean(node.InnerText)); } }
Source:
<code>protected static List<Integer> getEmptySpread() { <START> return Arrays.asList(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, <END> 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); }</code><technical_language>For sake of readability, write this way: return Collections.nCopies(96, 0);</technical_language>

Target:
protected static List<Integer> getEmptySpread() { return new ArrayList<Integer>(Collections.nCopies(96, 0)); }
Source:
<code>public int hashCode() { int prime = 14747; <START> int result = prime + ((fName == null) ? 0 : fName.hashCode()); <END> result = prime * result + fTestClass.hashCode(); return prime * result + fParameters.hashCode(); }</code><technical_language>fName null, this simpler</technical_language>

Target:
public int hashCode() { int prime = 14747; int result = prime + fName.hashCode(); result = prime * result + fTestClass.hashCode(); return prime * result + fParameters.hashCode(); }
Source:
<code>public void patchCanLoginMissingValue() throws Exception { context.turnOffAuthorisationSystem(); EPerson ePerson = EPersonBuilder.createEPerson(context) .withNameInMetadata("John", "Doe") .withEmail("Johndoe@fake-email.com") .build(); String token = getAuthToken(admin.getEmail(), password); List<Operation> ops = new ArrayList<Operation>(); <START> ReplaceOperation replaceOperation = new ReplaceOperation("/canLogin", "true"); <END> ops.add(replaceOperation); String patchBody = getPatchContent(ops); getClient(token).perform(patch("/api/eperson/epersons/" + ePerson.getID()) .content(patchBody) .contentType(MediaType.APPLICATION_JSON_PATCH_JSON)) .andExpect(status().isOk()) .andExpect(jsonPath("$.canLogIn", Matchers.is(true)));; List<Operation> ops2 = new ArrayList<Operation>(); ReplaceOperation replaceOperation2 = new ReplaceOperation("/canLogin", null); ops2.add(replaceOperation2); patchBody = getPatchContent(ops2); getClient(token).perform(patch("/api/eperson/epersons/" + ePerson.getID()) .content(patchBody) .contentType(MediaType.APPLICATION_JSON_PATCH_JSON)) .andExpect(status().isBadRequest()); getClient(token).perform(get("/api/eperson/epersons/" + ePerson.getID())) .andExpect(status().isOk()) .andExpect(jsonPath("$.canLogIn", Matchers.is(true))) .andExpect(jsonPath("$.email", Matchers.is("johndoe@fake-email.com"))) .andExpect(jsonPath("$.requireCertificate", Matchers.is(false))); }</code><technical_language>above, need support real boolean friendly textual boolean</technical_language>

Target:
public void patchCanLoginMissingValue() throws Exception { context.turnOffAuthorisationSystem(); EPerson ePerson = EPersonBuilder.createEPerson(context) .withNameInMetadata("John", "Doe") .withEmail("Johndoe@fake-email.com") .build(); String token = getAuthToken(admin.getEmail(), password); List<Operation> ops = new ArrayList<Operation>(); ReplaceOperation replaceOperation = new ReplaceOperation("/canLogin", true); ops.add(replaceOperation); String patchBody = getPatchContent(ops); getClient(token).perform(patch("/api/eperson/epersons/" + ePerson.getID()) .content(patchBody) .contentType(MediaType.APPLICATION_JSON_PATCH_JSON)) .andExpect(status().isOk()) .andExpect(jsonPath("$.canLogIn", Matchers.is(true)));; List<Operation> ops2 = new ArrayList<Operation>(); ReplaceOperation replaceOperation2 = new ReplaceOperation("/canLogin", null); ops2.add(replaceOperation2); patchBody = getPatchContent(ops2); getClient(token).perform(patch("/api/eperson/epersons/" + ePerson.getID()) .content(patchBody) .contentType(MediaType.APPLICATION_JSON_PATCH_JSON)) .andExpect(status().isBadRequest()); getClient(token).perform(get("/api/eperson/epersons/" + ePerson.getID())) .andExpect(status().isOk()) .andExpect(jsonPath("$.canLogIn", Matchers.is(true))) .andExpect(jsonPath("$.email", Matchers.is("johndoe@fake-email.com"))) .andExpect(jsonPath("$.requireCertificate", Matchers.is(false))); }
Source:
<code>private void readData( Node stepnode ) throws KettleXMLException { try { inputFileField = XMLHandler.getTagValue( stepnode, "input_file_field" ); outputFileField = XMLHandler.getTagValue( stepnode, "output_file_field" ); <START> inputFile = XMLHandler.getTagValue( stepnode, "input_file" ); <END> outputFile = XMLHandler.getTagValue( stepnode, "output_file" ); useValuesFromFields = "Y".equals( XMLHandler.getTagValue( stepnode, "use_values_from_fields" ) ) || XMLHandler.getTagValue( stepnode, "use_values_from_fields" ) == null; createParentfolder = "Y".equals( XMLHandler.getTagValue( stepnode, "create_parent_folder" ) ); parameterFieldMap = new HashMap<String, String>(); Node parsNode = XMLHandler.getSubNode( stepnode, XML_TAG_PARAMETERS ); List<Node> nodes = XMLHandler.getNodes( parsNode, XML_TAG_PARAMETER ); for ( Node node : nodes ) { String parameter = XMLHandler.getTagValue( node, "name" ); String fieldname = XMLHandler.getTagValue( node, "field" ); if ( !Utils.isEmpty( parameter ) && !Utils.isEmpty( fieldname ) ) { parameterFieldMap.put( parameter, fieldname ); } } outputProcessorType = ProcessorType.getProcessorTypeByCode( XMLHandler.getTagValue( stepnode, "processor_type" ) ); } catch ( Exception e ) { throw new KettleXMLException( BaseMessages.getString( PKG, "PentahoReportingOutputMeta.Exception.UnableToLoadStepInfo" ), e ); } }</code><technical_language>sure, if read transformation tags ? able read transformation</technical_language>

Target:
private void readData( Node stepnode ) throws KettleXMLException { try { inputFileField = XMLHandler.getTagValue( stepnode, XML_TAG_INPUT_FILE_FIELD ); outputFileField = XMLHandler.getTagValue( stepnode, XML_TAG_OUTPUT_FILE_FIELD ); inputFile = XMLHandler.getTagValue( stepnode, XML_TAG_INPUT_FILE ); outputFile = XMLHandler.getTagValue( stepnode, XML_TAG_OUTPUT_FILE ); useValuesFromFields = "Y".equals( XMLHandler.getTagValue( stepnode, XML_TAG_USE_VALUES_FROM_FIELDS ) ) || XMLHandler.getTagValue( stepnode, XML_TAG_USE_VALUES_FROM_FIELDS ) == null; createParentFolder = "Y".equals( XMLHandler.getTagValue( stepnode, XML_TAG_CREATE_PARENT_FOLDER ) ); parameterFieldMap = new HashMap<String, String>(); Node parsNode = XMLHandler.getSubNode( stepnode, XML_TAG_PARAMETERS ); List<Node> nodes = XMLHandler.getNodes( parsNode, XML_TAG_PARAMETER ); for ( Node node : nodes ) { String parameter = XMLHandler.getTagValue( node, XML_TAG_NAME ); String fieldname = XMLHandler.getTagValue( node, XML_TAG_FIELD ); if ( !Utils.isEmpty( parameter ) && !Utils.isEmpty( fieldname ) ) { parameterFieldMap.put( parameter, fieldname ); } } outputProcessorType = ProcessorType.getProcessorTypeByCode( XMLHandler.getTagValue( stepnode, XML_TAG_PROCESSOR_TYPE ) ); } catch ( Exception e ) { throw new KettleXMLException( BaseMessages.getString( PKG, "PentahoReportingOutputMeta.Exception.UnableToLoadStepInfo" ), e ); } }
Source:
<code>private static boolean isSchemaCompatibleWithRelObj(Object relObj, Schema unionSchema) { <START> if (unionSchema.getType() == Schema.Type.NULL) { <END> return relObj == null; } switch (unionSchema.getType()) { case RECORD: return relObj instanceof SamzaSqlRelRecord; case ARRAY: return relObj instanceof List; case MAP: return relObj instanceof Map; case FIXED: return relObj instanceof ByteString; case BYTES: return relObj instanceof ByteString; case FLOAT: return relObj instanceof Float || relObj instanceof Double; default: return true; } }</code><technical_language>verify/handle unionSchema != null</technical_language>

Target:
private static boolean isSchemaCompatibleWithRelObj(Object relObj, Schema unionSchema) { Validate.notNull(unionSchema, "Schema cannot be null"); if (unionSchema.getType() == Schema.Type.NULL) { return relObj == null; } switch (unionSchema.getType()) { case RECORD: return relObj instanceof SamzaSqlRelRecord; case ARRAY: return relObj instanceof List; case MAP: return relObj instanceof Map; case FIXED: return relObj instanceof ByteString; case BYTES: return relObj instanceof ByteString; case FLOAT: return relObj instanceof Float || relObj instanceof Double; default: return true; } }
Source:
<code><START> public static char[] getPolicyFriendlyRandomPassword(String username) throws UserStoreException { <END> return getPolicyFriendlyRandomPassword(username, 8); }</code><technical_language>This is API change AFAIK a Major Release (5.0.0) minor release (4.5.0)</technical_language>

Target:
public static String getPolicyFriendlyRandomPassword(String username) throws UserStoreException { return getPolicyFriendlyRandomPassword(username, 8); }
Source:
<code>protected DataSet(long id, long instrumentId, String name, LocalDateTime start, LocalDateTime end, int status, Properties properties, LocalDateTime lastTouched, int needsFlagCount, List<Message> messages) { this.id = id; this.instrumentId = instrumentId; this.name = name; this.start = start; this.end = end; this.status = status; this.properties = properties; this.lastTouched = lastTouched; this.needsFlagCount = needsFlagCount; <START> this.messages = new ArrayList<>(messages); <END> }</code><technical_language>= new ArrayList<**Message**>(messages);</technical_language>

Target:
protected DataSet(long id, long instrumentId, String name, LocalDateTime start, LocalDateTime end, int status, Properties properties, LocalDateTime lastTouched, int needsFlagCount, List<Message> messages) { this.id = id; this.instrumentId = instrumentId; this.name = name; this.start = start; this.end = end; this.status = status; this.properties = properties; this.lastTouched = lastTouched; this.needsFlagCount = needsFlagCount; this.messages = new ArrayList<Message>(messages); }
Source:
<code>protected ExtractionResult visitInPredicate(InPredicate node, Boolean complement) { if (!(node.getValueList() instanceof InListExpression)) { return super.visitInPredicate(node, complement); } InListExpression valueList = (InListExpression) node.getValueList(); checkState(!valueList.getValues().isEmpty(), "InListExpression should never be empty"); Iterator<Expression> expressionIterator = valueList.getValues().iterator(); <START> TupleDomain<Symbol> tupleDomain = process(new ComparisonExpression(EQUAL, node.getValue(), expressionIterator.next()), complement) <END> .getTupleDomain(); while (expressionIterator.hasNext() && !tupleDomain.isAll()) { ExtractionResult result = process(new ComparisonExpression(EQUAL, node.getValue(), expressionIterator.next()), complement); if (complement) { tupleDomain = tupleDomain.intersect(result.getTupleDomain()); } else { tupleDomain = TupleDomain.columnWiseUnion(tupleDomain, result .getTupleDomain()); } } if (tupleDomain.isAll()) { Expression originalPredicate = node; if (complement) { originalPredicate = new NotExpression(originalPredicate); } return new ExtractionResult(tupleDomain, originalPredicate); } return new ExtractionResult(tupleDomain, TRUE_LITERAL); }</code><technical_language>start TupleDomain.all() TupleDomain.none() for complement</technical_language>

Target:
protected ExtractionResult visitInPredicate(InPredicate node, Boolean complement) { if (!(node.getValueList() instanceof InListExpression)) { return super.visitInPredicate(node, complement); } InListExpression valueList = (InListExpression) node.getValueList(); checkState(!valueList.getValues().isEmpty(), "InListExpression should never be empty"); ExtractionResult extractionResult; if (complement) { ImmutableList.Builder<Expression> disjuncts = ImmutableList.builder(); for (Expression expression : valueList.getValues()) { disjuncts.add(new ComparisonExpression(EQUAL, node.getValue(), expression)); } extractionResult = process(or(disjuncts.build()), true); } else { TupleDomain<Symbol> tupleDomain = TupleDomain.none(); for (Expression expression : valueList.getValues()) { ExtractionResult result = process(new ComparisonExpression(EQUAL, node.getValue(), expression), complement); tupleDomain = TupleDomain.columnWiseUnion(tupleDomain, result.getTupleDomain()); if (tupleDomain.isAll() || !result.isFullyRewritten()) { return new ExtractionResult(tupleDomain, node); } } extractionResult = new ExtractionResult(tupleDomain, TRUE_LITERAL); } if (extractionResult.tupleDomain.isAll()) { Expression originalPredicate = node; if (complement) { originalPredicate = new NotExpression(originalPredicate); } return new ExtractionResult(extractionResult.tupleDomain, originalPredicate); } return extractionResult; }
Source:
<code>private void updateData(byte[] input, int offset, int len, boolean isFinal) throws IllegalBlockSizeException, BadPaddingException { inBuffer.clear(); inBuffer.put(input, offset, len); inBuffer.flip(); outBuffer.clear(); try { if (isFinal) { doFinal(inBuffer, outBuffer); } else { update(inBuffer, outBuffer); } <START> } catch (ShortBufferException e) { <END> } outBuffer.flip(); }</code><technical_language>happen, deal throwing out</technical_language>

Target:
private void updateData(byte[] input, int offset, int len, boolean isFinal) throws IllegalBlockSizeException, BadPaddingException, ShortBufferException { inBuffer.clear(); inBuffer.put(input, offset, len); inBuffer.flip(); outBuffer.clear(); if (isFinal) { doFinal(inBuffer, outBuffer); } else { update(inBuffer, outBuffer); } outBuffer.flip(); }