auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public InputStream getObject(String bucketName, String objectName, SecretKey key) throws InvalidBucketNameException, NoSuchAlgorithmException, InsufficientDataException, IOException, InvalidKeyException, NoResponseException, XmlPullParserException, ErrorResponseException, InternalException, InvalidArgumentException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException, InvalidAlgorithmParameterException, InvalidEncryptionMetadataException { if (key == null) { throw new InvalidArgumentException("empty decryption key not allowed"); } String keyDecryptionCipherMode = "AES/ECB/PKCS5Padding"; return getObject(bucketName, objectName, key, keyDecryptionCipherMode); <START> } <END></code><technical_language>Is good idea leave java runtime throw NullPointerException</technical_language>

Target:
public InputStream getObject(String bucketName, String objectName, SecretKey key) throws InvalidBucketNameException, NoSuchAlgorithmException, InsufficientDataException, IOException, InvalidKeyException, NoResponseException, XmlPullParserException, ErrorResponseException, InternalException, InvalidArgumentException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException, InvalidAlgorithmParameterException, InvalidEncryptionMetadataException { if (key == null) { throw new InvalidArgumentException("empty decryption key not allowed"); } return getObject(bucketName, objectName, key, "AES/ECB/PKCS5Padding"); }
Source:
<code>String generateSequenceName(int groupId) { <START> if (taskGroups.get(groupId) == null) { <END> log.warn("taskGroups does not contain groupId %s, returning null sequenceName", groupId); return null; } return generateSequenceName( taskGroups.get(groupId).partitionOffsets, taskGroups.get(groupId).minimumMessageTime, taskGroups.get(groupId).maximumMessageTime ); }</code><technical_language>this happen. elaborate more this happen</technical_language>

Target:
String generateSequenceName(int groupId) { return generateSequenceName( taskGroups.get(groupId).partitionOffsets, taskGroups.get(groupId).minimumMessageTime, taskGroups.get(groupId).maximumMessageTime ); }
Source:
<code>public void close() { cleanup(); for (OperationController oc : ocList) { try { oc.requestResponseHandlerThread.join(SHUTDOWN_WAIT_MS); } catch (InterruptedException e) { <START> Thread.currentThread().interrupt(); <END> } } }</code><technical_language>I understand this. explain this? InterruptedException I means thread interrupted. interrupting</technical_language>

Target:
public void close() { doClose(); waitForResponseHandlerThreadExit(); }
Source:
<code>public Object visit(ASTOrExpression node, Object data) { Context context = (Context) data; node.childrenAccept(this, context); BinaryOperation current = null; <START> LinkedList<ExpressionStatement> statements = new LinkedList<>(); <END> for (int i = 0; i < node.count() + 1; i++) { statements.addFirst((ExpressionStatement) context.objectStack.pop()); } int i = 2; for (int j = 0; j < node.count(); j++) { if (current == null) { current = new BinaryOperation(OperatorType.OR, statements.get(0), statements.get(1)); } else { current = new BinaryOperation(OperatorType.OR, current, statements.get(i)); i = i + 1; } } context.objectStack.push(current); node.setIrElement(current); return data; }</code><technical_language>code duplication expression (almost) :)</technical_language>

Target:
public Object visit(ASTOrExpression node, Object data) { Context context = (Context) data; node.childrenAccept(this, context); List<ExpressionStatement> statements = operatorStatements(context, node.count()); BinaryOperation operation = assembleBinaryOperation(statements, nCopies(node.count(), OperatorType.OR)); context.objectStack.push(operation); node.setIrElement(operation); return data; }
Source:
<code>public void update(Map<String, Object> properties) { logger.trace("Configuring ConfigurationManagerImpl..."); ConfigManagerConfiguration temp = ConfigManagerConfigurationBuilder.newBuilder() .properties(properties) .build(); if (!temp.equals(config)) { configure(config); <START> config = temp; <END> } }</code><technical_language>Update config, set config new config? this following: configure(temp); config = temp;</technical_language>

Target:
public void update(Map<String, Object> properties) { logger.trace("Configuring ConfigurationManagerImpl..."); ConfigManagerConfiguration newConfig = ConfigManagerConfigurationBuilder.newBuilder() .properties(properties) .build(); if (Compare.isDifferent(config, newConfig)) { configure(newConfig); config = newConfig; } }
Source:
<code>static Pair<ReadCountCollection, double[]> subsetReadCountsToUsableTargets(final ReadCountCollection readCounts, final double targetFactorPercentileThreshold, final Logger logger) { final double[] targetFactors = calculateTargetFactors(readCounts); final Percentile percentile = new Percentile(targetFactorPercentileThreshold); <START> final double threshold = percentile.evaluate(targetFactors); <END> final List<Target> targetByIndex = readCounts.targets(); final Set<Target> result = IntStream.range(0, targetFactors.length).filter(i -> targetFactors[i] >= threshold) .mapToObj(targetByIndex::get) .collect(Collectors.toCollection(LinkedHashSet::new)); if (result.size() == targetByIndex.size()) { logger.info(String.format("All %d targets are kept", targetByIndex.size())); return new ImmutablePair<>(readCounts, targetFactors); } else { final int discardedCount = targetFactors.length - result.size(); logger.info(String.format("Discarded %d target(s) out of %d with factors below %.2g (%.2f percentile)", discardedCount, targetFactors.length, threshold, targetFactorPercentileThreshold )); final double[] targetFactorSubset = DoubleStream.of(targetFactors).filter(i -> i >= threshold).toArray(); return new ImmutablePair<>(readCounts.subsetTargets(result), targetFactorSubset); } }</code><technical_language>I find clearer if threshold LHS targetFactorPercentileThreshold RHS final double threshold = new Percentile(targetFactorPercentileThreshold).evaluate(targetFactors);</technical_language>

Target:
static Pair<ReadCountCollection, double[]> subsetReadCountsToUsableTargets(final ReadCountCollection readCounts, final double targetFactorPercentileThreshold, final Logger logger) { final double[] targetFactors = calculateTargetFactors(readCounts); final double threshold = new Percentile(targetFactorPercentileThreshold).evaluate(targetFactors); final List<Target> targetByIndex = readCounts.targets(); final Set<Target> result = IntStream.range(0, targetFactors.length).filter(i -> targetFactors[i] >= threshold) .mapToObj(targetByIndex::get) .collect(Collectors.toCollection(LinkedHashSet::new)); if (result.size() == targetByIndex.size()) { logger.info(String.format("All %d targets are kept", targetByIndex.size())); return new ImmutablePair<>(readCounts, targetFactors); } else { final int discardedCount = targetFactors.length - result.size(); logger.info(String.format("Discarded %d target(s) out of %d with factors below %.2g (%.2f percentile)", discardedCount, targetFactors.length, threshold, targetFactorPercentileThreshold )); final double[] targetFactorSubset = DoubleStream.of(targetFactors).filter(i -> i >= threshold).toArray(); return new ImmutablePair<>(readCounts.subsetTargets(result), targetFactorSubset); } }
Source:
<code>public void testBehaviourWithZeroChecks() throws Exception { final TreeWalker treeWalker = new TreeWalker(); treeWalker.configure(new DefaultConfiguration("default config")); <START> treeWalker.processFiltered(temporaryFolder.newFile("file.java"), new ArrayList<>()); <END> }</code><technical_language>assert parse walk methods invoked. Mockito verify this fact</technical_language>

Target:
public void testBehaviourWithZeroChecks() throws Exception { final String errMsg = "No checks -> No parsing"; final TreeWalker treeWalkerSpy = spy(new TreeWalker()); final Class<?> classAstState = Class.forName("com.puppycrawl.tools.checkstyle.TreeWalker$AstState"); mockStatic(TreeWalker.class); when(TreeWalker.parse(any(FileContents.class))) .thenThrow(new IllegalStateException(errMsg)); doNothing().when(treeWalkerSpy, "walk", any(DetailAST.class), any(FileContents.class), any(classAstState)); treeWalkerSpy.processFiltered(temporaryFolder.newFile("file.java"), new ArrayList<>()); verifyPrivate(treeWalkerSpy, never()).invoke("walk", any(DetailAST.class), any(FileContents.class), any(classAstState)); }
Source:
<code>private void processLiteralThis(DetailAST ast) { final DetailAST nextSibling = ast.getNextSibling(); if (nextSibling != null && nextSibling.getType() == TokenTypes.IDENT) { final int parentType = ast.getParent().getParent().getType(); if (parentType == TokenTypes.METHOD_CALL) { if (checkMethods) { log(ast, MSG_METHOD, nextSibling.getText()); } } else { <START> if (checkFields) { <END> final AbstractFrame classFrame = getNearestClassFrame(); final AbstractFrame shadowingFrame = findFrame(nextSibling, false); if (classFrame.equals(shadowingFrame)) { log(ast, MSG_VARIABLE, nextSibling.getText()); } } } } }</code><technical_language>merged else if()</technical_language>

Target:
private void processLiteralThis(DetailAST ast) { final DetailAST nextSibling = ast.getNextSibling(); if (nextSibling != null && nextSibling.getType() == TokenTypes.IDENT) { final int parentType = ast.getParent().getParent().getType(); if (parentType == TokenTypes.METHOD_CALL) { if (checkMethods) { log(ast, MSG_METHOD, nextSibling.getText()); } } else if (checkFields) { final AbstractFrame classFrame = getNearestClassFrame(); final AbstractFrame shadowingFrame = findFrame(nextSibling, false); if (classFrame.equals(shadowingFrame)) { log(ast, MSG_VARIABLE, nextSibling.getText()); } } } }
Source:
<code>public void update(float delta) { switch (this.currentState) { case RUNNING: { frames.get(currentFrame).update(delta); if (frames.get(currentFrame).isFinished()) { currentFrame++; if (currentFrame >= frames.size()) { currentRepeatCount++; if (currentRepeatCount >= repeat || <START> currentRepeatCount >= -(repeat + 1)) { <END> end(); } else { currentFrame = 0; elapsedTime = 0; } } } break; } default: break; } }</code><technical_language>I this is true for repeat >= 0, is intended</technical_language>

Target:
public void update(float delta) { switch (this.currentState) { case RUNNING: { frames.get(currentFrame).update(delta); if (frames.get(currentFrame).isFinished()) { currentFrame++; if (currentFrame >= frames.size()) { currentRepeatCount++; switch (repeatMode) { case RUN_ONCE: end(); break; case REPEAT: case INVERSE: if (currentRepeatCount >= repeatCount) { end(); break; } if (repeatMode.equals(RepeatMode.INVERSE)) { flipFrames(); } currentFrame = 0; elapsedTime = 0; break; case REPEAT_INFINITE: case INVERSE_INFINITE: if (repeatMode.equals(RepeatMode.INVERSE) || repeatMode.equals(RepeatMode.INVERSE_INFINITE)) { flipFrames(); } currentFrame = 0; elapsedTime = 0; break; } } } break; } default: break; } }
Source:
<code>public static void initDefaults(final IPreferenceStore preferenceStore) { DiagramsPreferencePage.initDefaults(preferenceStore); preferenceStore.setDefault(SiriusDiagramUiInternalPreferencesKeys.PREF_AUTOSIZE_ON_ARRANGE.name(), true); preferenceStore.setDefault(SiriusDiagramUiInternalPreferencesKeys.PREF_AUTO_PIN_ON_MOVE.name(), true); preferenceStore.setDefault(SiriusDiagramUiInternalPreferencesKeys.PREF_REMOVE_HIDE_NOTE_WHEN_ANNOTED_ELEMENT_HIDDEN_OR_REMOVE.name(), true); preferenceStore.setDefault(SiriusDiagramUiPreferencesKeys.PREF_SHOW_SYNCHRONIZE_STATUS_DECORATOR.name(), false); preferenceStore.setDefault(SiriusDiagramUiPreferencesKeys.PREF_SCALE_DIAGRAMS_ON_EXPORT.name(), true); preferenceStore.setDefault(SiriusDiagramUiPreferencesKeys.PREF_SCALE_LEVEL_DIAGRAMS_ON_EXPORT.name(), <START> 100); <END> preferenceStore.setDefault(SiriusDiagramUiPreferencesKeys.PREF_MAXIMUM_EXPORT_BUFFER_SIZE.name(), 4125000); preferenceStore.setDefault(SiriusDiagramUiPreferencesKeys.PREF_MAXIMUM_EXPORT_BUFFER_SIZE_WINDOWS.name(), 50000000); }</code><technical_language>10</technical_language>

Target:
public static void initDefaults(final IPreferenceStore preferenceStore) { DiagramsPreferencePage.initDefaults(preferenceStore); preferenceStore.setDefault(SiriusDiagramUiInternalPreferencesKeys.PREF_AUTOSIZE_ON_ARRANGE.name(), true); preferenceStore.setDefault(SiriusDiagramUiInternalPreferencesKeys.PREF_AUTO_PIN_ON_MOVE.name(), true); preferenceStore.setDefault(SiriusDiagramUiInternalPreferencesKeys.PREF_REMOVE_HIDE_NOTE_WHEN_ANNOTED_ELEMENT_HIDDEN_OR_REMOVE.name(), true); preferenceStore.setDefault(SiriusDiagramUiPreferencesKeys.PREF_SHOW_SYNCHRONIZE_STATUS_DECORATOR.name(), false); preferenceStore.setDefault(SiriusDiagramUiPreferencesKeys.PREF_SCALE_DIAGRAMS_ON_EXPORT.name(), true); preferenceStore.setDefault(SiriusDiagramUiPreferencesKeys.PREF_SCALE_LEVEL_DIAGRAMS_ON_EXPORT.name(), 10); preferenceStore.setDefault(SiriusDiagramUiPreferencesKeys.PREF_MAXIMUM_EXPORT_BUFFER_SIZE.name(), 4125000); preferenceStore.setDefault(SiriusDiagramUiPreferencesKeys.PREF_MAXIMUM_EXPORT_BUFFER_SIZE_WINDOWS.name(), 50000000); }
Source:
<code>private void remove(ResponseTracking tracking, JsonNode id, JsonRpcResponse response) { try (LockWrapper wrapper = new LockWrapper(this.lock)) { JsonRpcCall call = this.runningCalls.remove(id); if (call != null) { call.addResponse(response); if (call.getCallback() != null && <START> executorService != <END> null) { executorService.schedule(() -> call.getCallback().onFailure(mapValues(response.getError())), 0, TimeUnit.SECONDS); } } removeRequestFromTracking(id); if (tracking != null && tracking.getClient() != null) { tracking.getCall().addResponse(response); if (tracking.getCall().getCallback() != null && executorService != null) { executorService.schedule(() -> tracking.getCall() .getCallback() .onFailure(mapValues(response.getError())), 0, TimeUnit.SECONDS); } } } }</code><technical_language>executorService shutdown ? is a need check status submitting a task</technical_language>

Target:
private void remove(ResponseTracking tracking, JsonNode id, JsonRpcResponse response) { try (LockWrapper wrapper = new LockWrapper(this.lock)) { JsonRpcCall call = this.runningCalls.remove(id); boolean callbackNotified = false; if (call != null) { call.addResponse(response); if (call.getCallback() != null && executorService != null) { callbackNotified = true; executorService.schedule(() -> call.getCallback().onFailure(mapValues(response.getError())), 0, TimeUnit.SECONDS); } } removeRequestFromTracking(id); if (!callbackNotified && tracking != null && tracking.getClient() != null) { tracking.getCall().addResponse(response); if (tracking.getCall().getCallback() != null && executorService != null) { executorService.schedule(() -> tracking.getCall() .getCallback() .onFailure(mapValues(response.getError())), 0, TimeUnit.SECONDS); } } } }
Source:
<code>public ImportMappingJob(File mappingFile) { <START> super("CallStackView function name mapping"); END> fMappingFile = mappingFile; }</code><technical_language>I this externalized, is user visible. Also, user class name, view referred name. I personally prefer verbs "Updating Call Stack view function mapping"</technical_language>

Target:
public ImportMappingJob(File mappingFile) { super(Messages.CallStackView_ImportMappingJobName); fMappingFile = mappingFile; }
Source:
<code>public static Properties loadPropertyFile(Resource f) throws IOException { InputStream in = f.in(); try { return loadUniversal(in); } finally { <START> in.close(); <END> } }</code><technical_language>a try-with-resources</technical_language>

Target:
public static Properties loadPropertyFile(Resource f) throws IOException { try (InputStream in = f.in()) { return loadUniversal(in); } }
Source:
<code>public void testV42PedigreeParsing() { final Path vcfWithPedigreeHeaderLine = TEST_PATH.resolve("vcf42HeaderLines.vcf"); final VCFHeader headerWithPedigree = new VCFFileReader(vcfWithPedigreeHeaderLine, false).getFileHeader(); final VCFHeaderLine vcf42PedigreeLine = headerWithPedigree.getMetaDataInInputOrder() <START> .stream().filter((l) -> l.getKey().equals("PEDIGREE")).findFirst().get(); <END> Assert.assertEquals(vcf42PedigreeLine.getClass(), VCFHeaderLine.class); Assert.assertEquals(vcf42PedigreeLine.getValue(), "<Derived=NA12891, Original=NA12878>"); }</code><technical_language>This VCFConstants.PEDIGREE_HEADER_KEY</technical_language>

Target:
public void testV42PedigreeParsing() { final Path vcfWithPedigreeHeaderLine = TEST_PATH.resolve("vcf42HeaderLines.vcf"); final VCFHeader headerWithPedigree = new VCFFileReader(vcfWithPedigreeHeaderLine, false).getFileHeader(); final VCFHeaderLine vcf42PedigreeLine = headerWithPedigree.getMetaDataInInputOrder() .stream().filter((l) -> l.getKey().equals(VCFConstants.PEDIGREE_HEADER_KEY)).findFirst().get(); Assert.assertEquals(vcf42PedigreeLine.getClass(), VCFHeaderLine.class); Assert.assertEquals(vcf42PedigreeLine.getValue(), "<Derived=NA12891, Original=NA12878>"); }
Source:
<code>public static void addAvgAndMaxToSensor(final Sensor sensor, final String group, final Map<String, String> tags, final String operation) { addAvgAndMaxToSensor( sensor, group, tags, operation, <START> "The average value of " + operation + ".", <END> "The maximum value of " + operation + "." ); }</code><technical_language>nit: this string static final variables</technical_language>

Target:
public static void addAvgAndMaxToSensor(final Sensor sensor, final String group, final Map<String, String> tags, final String operation) { addAvgAndMaxToSensor( sensor, group, tags, operation, AVG_VALUE_DOC + operation + ".", MAX_VALUE_DOC + operation + "." ); }
Source:
<code>public Material getItemMaterial() { <START> return Utils.getMaterialByConfig("specials.Arrow-Blocker.item", Material.BARRIER); <END> }</code><technical_language>Utils.getMaterialByConfig("specials.arrow-blocker.item", Material.ENDER_EYE);</technical_language>

Target:
public Material getItemMaterial() { return Utils.getMaterialByConfig("specials.arrow-blocker.item", Material.EYE_OF_ENDER); }
Source:
<code><START> private void onUnrecoverableError(EventProducer eventProducer) { <END> List<DatastreamTask> tasks = findTasksUsingEventProducer(eventProducer); LOG.warn(String.format("Producer %s failed with unrecoverable error, shutting down the producer " + ", creating a new producer and assigning them to the tasks %s", eventProducer.getProducerid(), tasks)); boolean customCheckpointing = eventProducer.getCheckpointPolicy() == EventProducer.CheckpointPolicy.CUSTOM; _producerPool.get(customCheckpointing).remove(eventProducer); TransportProvider transport = _transportProviderFactory.createTransportProvider(_transportProviderConfig); EventProducer newEventProducer = new EventProducer(transport, _checkpointProvider, _eventProducerConfig, customCheckpointing, this::onUnrecoverableError); tasks.forEach(t -> assignEventProducerToTask(newEventProducer, t)); eventProducer.shutdown(); }</code><technical_language>this called concurrently? If yes, need protection</technical_language>

Target:
private synchronized void onUnrecoverableError(EventProducer eventProducer) { List<DatastreamTask> tasks = findTasksUsingEventProducer(eventProducer); LOG.warn(String.format("Producer %s failed with unrecoverable error, shutting down the producer " + ", creating a new producer and assigning them to the tasks %s", eventProducer.getProducerid(), tasks)); boolean customCheckpointing = eventProducer.getCheckpointPolicy() == EventProducer.CheckpointPolicy.CUSTOM; _producerPool.get(customCheckpointing).remove(eventProducer); TransportProvider transport = _transportProviderFactory.createTransportProvider(_transportProviderConfig); EventProducer newEventProducer = new EventProducer(transport, _checkpointProvider, _eventProducerConfig, customCheckpointing, this::onUnrecoverableError); tasks.forEach(t -> assignEventProducerToTask(newEventProducer, t)); eventProducer.shutdown(); }
Source:
<code>public boolean isAuthorized(final WebContext context, final List<CommonProfile> profiles) { final boolean checkRequest = !onlyCheckPostRequest || ContextHelper.isPost(context); if (checkRequest) { final String parameterToken = context.getRequestParameter(parameterName); final String headerToken = context.getRequestHeader(headerName); <START> final String sessionToken = (String) context.getSessionStore().get(context, Pac4jConstants.CSRF_TOKEN).get(); <END> return sessionToken != null && (sessionToken.equals(parameterToken) || sessionToken.equals(headerToken)); } else { return true; } }</code><technical_language>hm, a get optional is a good idea if check if is present</technical_language>

Target:
public boolean isAuthorized(final WebContext context, final List<CommonProfile> profiles) { final boolean checkRequest = !onlyCheckPostRequest || ContextHelper.isPost(context); if (checkRequest) { final String parameterToken = context.getRequestParameter(parameterName).orElse(null); final String headerToken = context.getRequestHeader(headerName).orElse(null); final Optional<String> sessionToken = context.getSessionStore().get(context, Pac4jConstants.CSRF_TOKEN); return sessionToken.isPresent() && (sessionToken.get().equals(parameterToken) || sessionToken.get().equals(headerToken)); } else { return true; } }
Source:
<code><START> public void executeSuppressed() throws SystemException, InvalidTransactionException { <END> transactionManagerReturnsTransaction(); suspendReturnsTransaction(); assertTrue(TransactionSupport.executeInScope(TransactionScopeOption.Suppress, tm)); verify(mgr).suspend(); verify(mgr).resume(transaction); }</code><technical_language>too, inOrder verification handy</technical_language>

Target:
public void executeSuppressed() throws SystemException, InvalidTransactionException { transactionManagerReturnsTransaction(); suspendReturnsTransaction(); assertTrue(TransactionSupport.executeInScope(TransactionScopeOption.Suppress, tm)); InOrder inOrder = inOrder(mgr); inOrder.verify(mgr).suspend(); inOrder.verify(mgr).resume(transaction); }
Source:
<code>private List<Trigger> filterTriggers(List<Trigger> triggers) { Resource resource = getResource(); List<Trigger> filteredTriggers = new ArrayList<>(); for (Trigger trigger : triggers) { <START> if ( trigger.getTags()!=null && trigger.getTags().containsKey("resourceId") && trigger.getTags().get <END> ("resourceId").equals(resource.getId())) { filteredTriggers.add(trigger); } } return filteredTriggers; }</code><technical_language>indentation odd</technical_language>

Target:
private List<Trigger> filterTriggers(List<Trigger> triggers) { Resource resource = getResource(); List<Trigger> filteredTriggers = new ArrayList<>(); for (Trigger trigger : triggers) { if (trigger.getTags() != null && trigger.getTags().get("resourceId").equals(resource.getId())) { filteredTriggers.add(trigger); } } return filteredTriggers; }
Source:
<code>public void testSimpleStatedump() { Path dir = null; try <START> { dir = checkNotNull(Files.createTempDirectory("ss-serialization-test")); <END> String ssid = "test-ssid"; final int nbAttributes = 6; final int version = 0; List<String @NonNull []> initialAttributes = Arrays.asList( new String[] { "Threads" }, new String[] { "Threads", "1000" }, new String[] { "Threads", "1000", "Status" }, new String[] { "Threads", "2000" }, new String[] { "Threads", "2000", "Status" }, new String[] { "Threads", "2000", "PPID" }); List<@NonNull ITmfStateValue> initialValues = Arrays.asList( TmfStateValue.nullValue(), TmfStateValue.nullValue(), TmfStateValue.newValueString("Running"), TmfStateValue.nullValue(), TmfStateValue.newValueInt(1), TmfStateValue.newValueLong(1000L)); Statedump statedump = new Statedump(initialAttributes, initialValues, version); statedump.dumpState(dir, ssid); Statedump results = Statedump.loadState(dir, ssid); assertNotNull(results); assertEquals(version, results.getVersion()); List<String[]> newAttributes = results.getAttributes(); List<ITmfStateValue> newValues = results.getStates(); assertEquals(nbAttributes, newAttributes.size()); assertEquals(nbAttributes, newValues.size()); for (int i = 0; i < nbAttributes; i++) { assertArrayEquals(initialAttributes.get(i), newAttributes.get(i)); assertEquals(initialValues.get(i), newValues.get(i)); } } catch (IOException e) { fail(e.getMessage()); } finally { if (dir != null) { FileUtils.deleteQuietly(dir.toFile()); } } }</code><technical_language>line declare, checkNotNull -> assertNotNull</technical_language>

Target:
public void testSimpleStatedump() { Path dir = null; try { dir = checkNotNull(Files.createTempDirectory("ss-serialization-test")); String ssid = "test-ssid"; final int version = 0; ImmutableMap.Builder<String @NonNull [], @Nullable Object> initialStates = new Builder<>(); initialStates.put(new String[] { "Threads" },null); initialStates.put(new String[] { "Threads", "1000" }, null); initialStates.put(new String[] { "Threads", "1000", "Status" },"Running"); initialStates.put(new String[] { "Threads", "2000" },null); initialStates.put(new String[] { "Threads", "2000", "Status" },Integer.valueOf(1)); initialStates.put(new String[] { "Threads", "2000", "PPID" },Long.valueOf(1000)); ImmutableMap<String @NonNull [], @Nullable Object> expected = initialStates.build(); StateSnapshot snapshot = new StateSnapshot(expected,ssid, version); snapshot.write(dir); StateSnapshot results = StateSnapshot.read(dir, ssid); assertNotNull(results); assertEquals(version, results.getVersion()); assertEquals(ssid, results.getSsid()); assertEquals(expected, results.getStates()); } catch (IOException e) { fail(e.getMessage()); } finally { if (dir != null) { FileUtils.deleteQuietly(dir.toFile()); } } }
Source:
<code>public CompletableFuture<Void> visitEntrySetCommand(InvocationContext ctx, EntrySetCommand command) throws Throwable { if (ctx.isOriginLocal()) { TypeConverter<Object, Object, Object, Object> converter = determineTypeConverter(command.getFlags()); CacheSet<CacheEntry<K, V>> set = (CacheSet<CacheEntry<K, V>>) ctx.forkInvocationSync(command); return ctx.shortCircuit(new AbstractDelegatingEntryCacheSet<K, V>(Caches.getCacheWithFlags(cache, command), set) { @Override public CloseableIterator<CacheEntry<K, V>> iterator() { return new TypeConverterIterator<>(super.iterator(), converter, entryFactory); } @Override public CloseableSpliterator<CacheEntry<K, V>> spliterator() { return new IteratorAsSpliterator.Builder<>(iterator()) .setEstimateRemaining(super.spliterator().estimateSize()) .setCharacteristics(Spliterator.CONCURRENT | Spliterator.DISTINCT | Spliterator.NONNULL) .get(); } protected CacheStream<CacheEntry<K, V>> getStream(boolean parallel) { DistributionManager dm = cache.getAdvancedCache().getDistributionManager(); CloseableSpliterator<CacheEntry<K, V>> closeableSpliterator = super.spliterator(); CacheStream<CacheEntry<K, V>> stream = new LocalCacheStream<>(new EntryStreamSupplier<>(cache, dm != null ? dm.getConsistentHash() : null, () -> StreamSupport.stream(closeableSpliterator, parallel)), parallel, cache.getAdvancedCache().getComponentRegistry()); <START> stream.onClose(() -> closeableSpliterator.close()); <END> return new TypeConverterStream(stream, converter, entryFactory); } }); } return ctx.continueInvocation(); }</code><technical_language>related this PR :)</technical_language>

Target:
public CompletableFuture<Void> visitEntrySetCommand(InvocationContext ctx, EntrySetCommand command) throws Throwable { if (ctx.isOriginLocal()) { TypeConverter<Object, Object, Object, Object> converter = determineTypeConverter(command.getFlags()); CacheSet<CacheEntry<K, V>> set = (CacheSet<CacheEntry<K, V>>) ctx.forkInvocationSync(command); return ctx.shortCircuit(new AbstractDelegatingEntryCacheSet<K, V>(Caches.getCacheWithFlags(cache, command), set) { @Override public CloseableIterator<CacheEntry<K, V>> iterator() { return new TypeConverterIterator<>(super.iterator(), converter, entryFactory); } @Override public CloseableSpliterator<CacheEntry<K, V>> spliterator() { return new IteratorAsSpliterator.Builder<>(iterator()) .setEstimateRemaining(super.spliterator().estimateSize()) .setCharacteristics(Spliterator.CONCURRENT | Spliterator.DISTINCT | Spliterator.NONNULL) .get(); } protected CacheStream<CacheEntry<K, V>> getStream(boolean parallel) { DistributionManager dm = cache.getAdvancedCache().getDistributionManager(); CloseableSpliterator<CacheEntry<K, V>> closeableSpliterator = super.spliterator(); CacheStream<CacheEntry<K, V>> stream = new LocalCacheStream<>(new EntryStreamSupplier<>(cache, dm != null ? dm.getConsistentHash() : null, () -> StreamSupport.stream(closeableSpliterator, parallel)), parallel, cache.getAdvancedCache().getComponentRegistry()); stream.onClose(closeableSpliterator::close); return new TypeConverterStream(stream, converter, entryFactory); } }); } return ctx.continueInvocation(); }
Source:
<code>protected IndentLevel getChildrenExpectedIndent() { IndentLevel expectedIndent = new IndentLevel(getIndent(), getIndentCheck().getArrayInitIndent(), getIndentCheck().getLineWrappingIndentation()); final int firstLine = getFirstLine(Integer.MAX_VALUE, getListChild()); final int lcurlyPos = expandedTabsColumnNo(getLeftCurly()); final int firstChildPos = getNextFirstNonBlankOnLineAfter(firstLine, lcurlyPos); <START> final int notExist = -1; <END> if (firstChildPos != notExist) { expectedIndent = IndentLevel.addAcceptable(expectedIndent, firstChildPos, lcurlyPos + getLineWrappingIndentation()); } return expectedIndent; }</code><technical_language>Please torn a constant field in getNextFirstNonBlankOnLineAfter method</technical_language>

Target:
protected IndentLevel getChildrenExpectedIndent() { IndentLevel expectedIndent = new IndentLevel(getIndent(), getIndentCheck().getArrayInitIndent(), getIndentCheck().getLineWrappingIndentation()); final int firstLine = getFirstLine(Integer.MAX_VALUE, getListChild()); final int lcurlyPos = expandedTabsColumnNo(getLeftCurly()); final int firstChildPos = getNextFirstNonBlankOnLineAfter(firstLine, lcurlyPos); if (firstChildPos != NOT_EXIST) { expectedIndent = IndentLevel.addAcceptable(expectedIndent, firstChildPos, lcurlyPos + getLineWrappingIndentation()); } return expectedIndent; }
Source:
<code>public boolean matchesPrefix(Optional<QualifiedName> prefix) { if (!prefix.isPresent() || relationAlias.isPresent() && relationAlias.get().hasSuffix(prefix.get())) { return true; } if (!originTable.isPresent()) { return false; } int idx = 0; boolean match = true; QualifiedObjectName origin = originTable.get(); List<String> prefixes = prefix.get().getParts(); <START> switch (prefixes.size()) { <END> case 3: match = origin.getCatalogName().equalsIgnoreCase(prefixes.get(idx++)); case 2: match = match && origin.getSchemaName().equalsIgnoreCase(prefixes.get(idx++)); case 1: match = match && origin.getObjectName().equalsIgnoreCase(prefixes.get(idx++)); } return idx > 0 && match; }</code><technical_language>implicit loop is unexpected for a switch statement, hard follow error prone. change a series of if statements instead? e.g. if (prefixes.size = 0) { return false; } if(prefixes.size() = 3 && !origin.getCatalogName()...) { return false; } if (prefixes.size() >= 2 && origin.getSchemaName()...) { return false; } return origin.getObjectName()...;</technical_language>

Target:
public boolean matchesPrefix(Optional<QualifiedName> prefix) { if (!prefix.isPresent() || relationAlias.isPresent() && relationAlias.get().hasSuffix(prefix.get())) { return true; } if (!originTable.isPresent()) { return false; } QualifiedObjectName origin = originTable.get(); List<String> prefixes = prefix.get().getParts(); if (prefixes.size() == 3 && (!origin.getCatalogName().equalsIgnoreCase(prefixes.get(0)) || !origin.getSchemaName().equalsIgnoreCase(prefixes.get(1)))) { return false; } else if (prefixes.size() == 2 && !origin.getSchemaName().equalsIgnoreCase(prefixes.get(0))) { return false; } return origin.getObjectName().equalsIgnoreCase(prefixes.get(prefixes.size() - 1)); }
Source:
<code>public String getPossibleValuesDisplayName(Object possibleValue) { if (!isAPossibleValue(possibleValue)) { throw new TalendRuntimeException(CommonErrorCodes.UNEXPECTED_ARGUMENT, ExceptionContext.build().put("argument", "possibleValues").put("value", possibleValue)); } if (possibleValue != null) { String displayName = possibleValue.toString(); if (NamedThing.class.isAssignableFrom(possibleValue.getClass())) { displayName = ((NamedThing) possibleValue).getDisplayName(); } String i18nMessage = getI18nMessage( <START> I18N_PROPERTY_POSSIBLE_VALUE_PREFIX + displayName + NamedThing.I18N_DISPLAY_NAME_SUFFIX); <END> if (i18nMessage.endsWith(NamedThing.I18N_DISPLAY_NAME_SUFFIX)) { return displayName; } else { return i18nMessage; } } else { return "null"; } }</code><technical_language>displayName find i18n message, message keys defined *name* *displayName* is supposed i18n already</technical_language>

Target:
public String getPossibleValuesDisplayName(Object possibleValue) { if (!isAPossibleValue(possibleValue)) { throw new TalendRuntimeException(CommonErrorCodes.UNEXPECTED_ARGUMENT, ExceptionContext.build().put("argument", "possibleValues").put("value", possibleValue)); } if (possibleValue != null) { String possibleValueDisplayName = possibleValue.toString(); if (NamedThing.class.isAssignableFrom(possibleValue.getClass())) { possibleValueDisplayName = ((NamedThing) possibleValue).getDisplayName(); } String i18nMessage = getI18nMessage( I18N_PROPERTY_POSSIBLE_VALUE_PREFIX + possibleValueDisplayName + NamedThing.I18N_DISPLAY_NAME_SUFFIX); if (i18nMessage.endsWith(NamedThing.I18N_DISPLAY_NAME_SUFFIX)) { return possibleValueDisplayName; } else { return i18nMessage; } } else { return "null"; } }
Source:
<code>private Hashtable<String, XMLObject> initializeSession() { Hashtable<String, XMLObject> messages = (Hashtable<String, XMLObject>) context.getSessionStore().get(context, SAML_STORAGE_KEY).orElse(null); if (messages == null) { synchronized (context) { <START> messages = (Hashtable<String, XMLObject>) context.getSessionStore().get(context, SAML_STORAGE_KEY).orElse(null); <END> if (messages == null) { messages = new Hashtable<>(); updateSession(messages); } } } return messages; }</code><technical_language>orElse(null)</technical_language>

Target:
private Hashtable<String, XMLObject> initializeSession() { return getMessagesFromSession().orElseGet( () -> { synchronized (context) { return getMessagesFromSession().orElseGet( () -> { Hashtable<String, XMLObject> messagesHashtable = new Hashtable<>(); updateSession(messagesHashtable); return messagesHashtable; } ); } } ); }
Source:
<code>public void unsubscribe() { synchronized (this) { <START> if (unsubscribed || subscriptions == null) { <END> return; } else { unsubscribed = true; } } unsubscribeFromAll(subscriptions); }</code><technical_language>If chain is added, this set chain unsubscribed = true</technical_language>

Target:
public void unsubscribe() { synchronized (this) { if (unsubscribed) { return; } unsubscribed = true; } unsubscribeFromAll(subscriptions); }
Source:
<code>public synchronized Optional<InboxMessage> oldestMessageToDeliver(ShardIndex index) { TenantInboxRecords storage = multitenantStorage.currentSlice(); Optional<InboxMessage> result = storage.readAll() .stream() .filter((r) -> index.equals(r.getShardIndex()) && <START> r.getStatus() == InboxMessageStatus.TO_DELIVER) <END> .min(InMemoryInboxStorage::compareMessages); return result; }</code><technical_language>Please extract a method a variable a lambda alignment better</technical_language>

Target:
public Optional<InboxMessage> oldestMessageToDeliver(ShardIndex index) { TenantInboxRecords storage = multitenantStorage.currentSlice(); Optional<InboxMessage> result = storage.readAll() .stream() .filter((r) -> index.equals(r.getShardIndex()) && isToDeliver(r)) .min(InMemoryInboxStorage::compareMessages); return result; }
Source:
<code>protected String getOutputNameFromSettings(IServerAttributes server, IModule module) { String ret = super.getOutputNameFromSettings(server, module); if (ret == null && module.equals(findProjectModule(server))) { String suffix = ServerModelUtilities.getDefaultSuffixForModule(module); <START> ret = module.getName() + suffix; <END> } return ret; }</code><technical_language>fix for EAP 7.1 for 7.0 OpenShift profile is set get proper module name. test EAP 7.0</technical_language>

Target:
protected String getOutputNameFromSettings(IServerAttributes server, IModule module) { String ret = super.getOutputNameFromSettings(server, module); if (ret == null && module.equals(findProjectModule(server))) { String suffix = ServerModelUtilities.getDefaultSuffixForModule(module); String deployName = getDeployName(module); ret = deployName + suffix; } return ret; }
Source:
<code>protected AbstractProjectFoldersGenerator getProjectFoldersGenerator() { String groupId = project.getGroupId(); String artifactId = project.getArtifactId(); PackagingType packagingType = PackagingType.fromString(project.getPackaging()); <START> if (packagingType.equals(PackagingType.MULE_DOMAIN_BUNDLE)) { <END> return new BundleDomainProjectFoldersGenerator(groupId, artifactId, packagingType); } return new MuleProjectFoldersGenerator(groupId, artifactId, packagingType); }</code><technical_language>Please create a ProjectFolderGeneratorFactory.create(packagingType)</technical_language>

Target:
public AbstractProjectFoldersGenerator getProjectFoldersGenerator() { return ProjectFoldersGeneratorFactory.create(getProjectInformation()); }
Source:
<code>public Integer call() { int subsequentEmptyBatches = 0; do { try { final Span span = queue.poll(5, TimeUnit.SECONDS); if (span == null) { subsequentEmptyBatches++; } else { <START> notificationsHandler.onQueueSizeChanged(queue.size()); <END> logEntries.add(create(span)); } if (subsequentEmptyBatches >= MAX_SUBSEQUENT_EMPTY_BATCHES && !logEntries.isEmpty() || logEntries.size() >= maxBatchSize || !logEntries.isEmpty() && stop) { log(logEntries); logEntries.clear(); subsequentEmptyBatches = 0; } } catch (final Exception e) { LOGGER.log(Level.WARNING, "Unexpected exception flushing spans", e); } } while (stop == false); return processedSpans; }</code><technical_language>if ran a benchmark, this pop depending type of queue in use. This is I increment instead</technical_language>

Target:
public Integer call() { int subsequentEmptyBatches = 0; do { try { final Span span = queue.poll(5, TimeUnit.SECONDS); if (span == null) { subsequentEmptyBatches++; } else { logEntries.add(create(span)); } if (subsequentEmptyBatches >= MAX_SUBSEQUENT_EMPTY_BATCHES && !logEntries.isEmpty() || logEntries.size() >= maxBatchSize || !logEntries.isEmpty() && stop) { log(logEntries); logEntries.clear(); subsequentEmptyBatches = 0; } } catch (final Exception e) { LOGGER.log(Level.WARNING, "Unexpected exception flushing spans", e); } } while (stop == false); return processedSpans; }
Source:
<code>private void logRequest(OCSPReq ocspRequest) { <START> StringBuffer logbuff = new StringBuffer(); <END> logbuff.append("OCSP Request:\n"); logbuff.append(" TBSRequest:\n"); logbuff.append(" version: " + getValueOrDefault(ocspRequest.getVersionNumber(), "") + "\n"); logbuff.append( " requestorName: " + getValueOrDefault(ocspRequest.getRequestorName(), "").toString() + "\n"); logbuff.append(" requestList:\n"); Req[] requests = ocspRequest.getRequestList(); if (requests != null) { int i = 0; for (Req req : requests) { logbuff.append(" Certificate " + i++ + "\n"); CertificateID cert = req.getCertID(); if (cert != null) { logbuff.append( " hashAlgorithm: " + getValueOrDefault(cert.getHashAlgOID(), "").toString() + "\n"); logbuff.append( " issuerNameHash: " + getValueOrDefault(Arrays.toString(cert.getIssuerNameHash()), "") + "\n"); logbuff.append( " issuerKeyHash: " + getValueOrDefault(Arrays.toString(cert.getIssuerKeyHash()), "") + "\n"); logbuff.append( " cert serial number: " + getValueOrDefault(cert.getSerialNumber(), "").toString() + "\n"); } } } LOGGER.trace(logbuff.toString()); }</code><technical_language>Generally StringBuilder instead of StringBuffer in single-threaded situations</technical_language>

Target:
private void logRequest(OCSPReq ocspRequest) { StringBuilder logBuilder = new StringBuilder(); logBuilder.append("OCSP Request:\n"); logBuilder.append(" TBSRequest:\n"); logBuilder.append( " version: " + getValueOrDefault(ocspRequest.getVersionNumber(), "") + "\n"); logBuilder.append( " requestorName: " + getValueOrDefault(ocspRequest.getRequestorName(), "").toString() + "\n"); logBuilder.append(" requestList:\n"); Req[] requests = ocspRequest.getRequestList(); if (requests != null) { for (int i = 0; i < requests.length; i++) { logBuilder.append(" Certificate " + i + "\n"); CertificateID cert = requests[i].getCertID(); if (cert != null) { logBuilder.append( " hashAlgorithm: " + getValueOrDefault(cert.getHashAlgOID(), "").toString() + "\n"); logBuilder.append( " issuerNameHash: " + getValueOrDefault(Arrays.toString(cert.getIssuerNameHash()), "") + "\n"); logBuilder.append( " issuerKeyHash: " + getValueOrDefault(Arrays.toString(cert.getIssuerKeyHash()), "") + "\n"); logBuilder.append( " cert serial number: " + getValueOrDefault(cert.getSerialNumber(), "").toString() + "\n"); } } } LOGGER.trace(logBuilder.toString()); }
Source:
<code>private static void parseTimeout(Builder builder, String queryParam) { int index = queryParam.indexOf('='); if (index < 0) { return; } <START> String timeoutString = queryParam.substring(index + 1); <END> int numbersEnd = 0; while (numbersEnd < timeoutString.length() && Character.isDigit(timeoutString.charAt(numbersEnd))) { numbersEnd++; } if (numbersEnd == 0) { if (timeoutString.startsWith("-")) { builder.withTimeout(0, TimeUnit.MILLISECONDS); } else { } } else { long timeoutValue = Long.parseLong(timeoutString, 0, numbersEnd, 10); builder.withTimeout(timeoutValue, TimeUnit.MILLISECONDS); String suffix = timeoutString.substring(numbersEnd); TimeUnit timeoutUnit; if ("ns".equals(suffix)) { timeoutUnit = TimeUnit.NANOSECONDS; } else if ("us".equals(suffix)) { timeoutUnit = TimeUnit.MICROSECONDS; } else if ("ms".equals(suffix)) { timeoutUnit = TimeUnit.MILLISECONDS; } else if ("s".equals(suffix)) { timeoutUnit = TimeUnit.SECONDS; } else if ("m".equals(suffix)) { timeoutUnit = TimeUnit.MINUTES; } else if ("h".equals(suffix)) { timeoutUnit = TimeUnit.HOURS; } else if ("d".equals(suffix)) { timeoutUnit = TimeUnit.DAYS; } else { timeoutUnit = TimeUnit.MILLISECONDS; } builder.withTimeout(timeoutValue, timeoutUnit); } }</code><technical_language>decoding part URLDecoder.decode</technical_language>

Target:
private static void parseTimeout(Builder builder, String queryParam) { int index = queryParam.indexOf('='); if (index < 0) { return; } String timeoutString = queryParam.substring(index + 1); int numbersEnd = 0; while (numbersEnd < timeoutString.length() && Character.isDigit(timeoutString.charAt(numbersEnd))) { numbersEnd++; } if (numbersEnd == 0) { if (timeoutString.startsWith("-")) { builder.withTimeout(0, TimeUnit.MILLISECONDS); } else { } } else { String timeoutValueString = timeoutString.substring(0, numbersEnd); long timeoutValue = Long.parseLong(timeoutValueString); builder.withTimeout(timeoutValue, TimeUnit.MILLISECONDS); String suffix = timeoutString.substring(numbersEnd); TimeUnit timeoutUnit = TIME_UNIT_MAP.get(suffix); if (timeoutUnit == null) { timeoutUnit = TimeUnit.MILLISECONDS; } builder.withTimeout(timeoutValue, timeoutUnit); } }
Source:
<code>private void createAndEmailErrorReport(List<PDPBadEmailRecord> badEmailRecords) { if (CollectionUtils.isNotEmpty(badEmailRecords)) { <START> LOG.info("createBadEmailReport, there are " + badEmailRecords.size() + " bad email records to report"); <END> File reportFile = cuAchAdviceNotificationWrrorReportService.createBadEmailReport(badEmailRecords); cuAchAdviceNotificationWrrorReportService.emailBadEmailReport(reportFile); } else { LOG.info("createBadEmailReport, there were no bad email addresses to report."); } }</code><technical_language>records changed addresses is in else block below</technical_language>

Target:
private void createAndEmailErrorReport(List<PDPBadEmailRecord> badEmailRecords) { if (CollectionUtils.isNotEmpty(badEmailRecords)) { LOG.info("createBadEmailReport, there are " + badEmailRecords.size() + " bad email addresses to report"); File reportFile = cuAchAdviceNotificationErrorReportService.createBadEmailReport(badEmailRecords); cuAchAdviceNotificationErrorReportService.emailBadEmailReport(reportFile); } else { LOG.info("createBadEmailReport, there were no bad email addresses to report."); } }
Source:
<code>public void requestAccess(final Callback<String> callback, final String username, final String password, final URL url) { AsyncTask<Void, Void, HeaderAndBody> task = new AsyncTask<Void, Void, HeaderAndBody>() { private Exception exception; @Override protected HeaderAndBody doInBackground(Void... params) { HeaderAndBody result; try { <START> HttpProvider provider = <END> new HttpRestProvider(new URL(url.toString() + AuthData.Endpoints.ACCESS)); provider.setDefaultHeader("Accept", "application/json"); provider.setDefaultHeader("Authorization", "Basic " + buildLoginData(username, password)); result = provider.post(""); Timber.d("Called with POST to: ", new String(provider.getUrl().toString())); Timber.d("Result of the POST: ", new String(result.getBody())); } catch (MalformedURLException e) { Timber.d(SecretStoreAuthzModule.class.getSimpleName(), "Error with URL", e); exception = e; return null; } catch (HttpException e) { if (e.getStatusCode() == HttpsURLConnection.HTTP_UNAUTHORIZED) { Timber.e(SecretStoreAuthzModule.class.getSimpleName(), "Wrong Credentials", e); } if (e.getStatusCode() == HttpsURLConnection.HTTP_INTERNAL_ERROR) { Timber.e(SecretStoreAuthzModule.class.getSimpleName(), "Server Error", e); } if (e.getStatusCode() == HttpsURLConnection.HTTP_NOT_FOUND) { Timber.e(SecretStoreAuthzModule.class.getSimpleName(), "Wrong URL", e); } if (e.getStatusCode() == HttpsURLConnection.HTTP_BAD_METHOD) { Timber.e(SecretStoreAuthzModule.class.getSimpleName(), "Bad Method", e); } exception = e; return null; } return result; } @Override protected void onPostExecute(HeaderAndBody headerAndBody) { if (exception == null) { callback.onSuccess(new String(headerAndBody.getBody())); } else { callback.onFailure(exception); } } }.executeOnExecutor(AsyncTask.THREAD_POOL_EXECUTOR); }</code><technical_language>curious - do a HttpProvider of pipes? (bear if I confusing things)</technical_language>

Target:
public void requestAccess(final Callback<String> callback, final String username, final String password, final URL url) { new Thread(new Runnable() { @Override public void run() { HeaderAndBody result; try { HttpProvider provider = new HttpRestProvider(new URL(url.toString() + AuthData.Endpoints.ACCESS)); provider.setDefaultHeader("Accept", "application/json"); provider.setDefaultHeader("Authorization", "Basic " + buildLoginData(username, password)); result = provider.post(""); callback.onSuccess(new String(result.getBody())); } catch (MalformedURLException e) { Timber.d(SecretStoreAuthzModule.class.getSimpleName(), "Error with URL", e); callback.onFailure(e); } catch (HttpException e) { Timber.d(SecretStoreAuthzModule.class.getSimpleName(), "HTTP error", e); callback.onFailure(e); } catch (RuntimeException e) { Timber.d(SecretStoreAuthzModule.class.getSimpleName(), "Connection Exception", e); callback.onFailure(e); } } }).start(); }
Source:
<code>public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } TlsAuthenticationConfig other = (TlsAuthenticationConfig) obj; <START> if (roleAttribute == null) { if (other.roleAttribute != null) { return false; } } else if (!roleAttribute.equals(other.roleAttribute)) { return false; } <END> return true; }</code><technical_language>Josef.equals()</technical_language>

Target:
public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (getClass() != obj.getClass()) { return false; } TlsAuthenticationConfig other = (TlsAuthenticationConfig) obj; return Objects.equals(roleAttribute, other.roleAttribute); }
Source:
<code>public NetworkInterface getNetworkInterface() { <START> throw new UnsupportedOperationException("Retrieval of network interface not supported"); <END> }</code><technical_language>code this is a "breaking" change</technical_language>

Target:
public NetworkInterface getNetworkInterface() { return null; }