auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void shouldThrowExceptionIfNoTypeMappingWasFoundWithoutAccessingContentProviderAsSingle() { final StorIOContentResolver storIOContentResolver = mock(StorIOContentResolver.class); final StorIOContentResolver.Internal internal = mock(StorIOContentResolver.Internal.class); when(storIOContentResolver.internal()).thenReturn(internal); when(storIOContentResolver.get()).thenReturn(new PreparedGet.Builder(storIOContentResolver)); final TestSubscriber<List<TestItem>> testSubscriber = new TestSubscriber<List<TestItem>>(); storIOContentResolver .get() .listOfObjects(TestItem.class) .withQuery(Query.builder().uri(mock(Uri.class)).build()) .prepare() .asRxSingle() .subscribe(testSubscriber); testSubscriber.awaitTerminalEvent(); testSubscriber.assertNoValues(); assertThat(testSubscriber.getOnErrorEvents().get(0)) .isInstanceOf(StorIOException.class) <START> .hasCauseInstanceOf(IllegalStateException.class); <END> verify(storIOContentResolver).get(); verify(storIOContentResolver).internal(); verify(internal).typeMapping(TestItem.class); verify(internal, never()).query(any(Query.class)); verifyNoMoreInteractions(storIOContentResolver, internal); }</code><technical_language>Please check exception message</technical_language>

Target:
public void shouldThrowExceptionIfNoTypeMappingWasFoundWithoutAccessingContentProviderAsSingle() { final StorIOContentResolver storIOContentResolver = mock(StorIOContentResolver.class); final StorIOContentResolver.Internal internal = mock(StorIOContentResolver.Internal.class); when(storIOContentResolver.internal()).thenReturn(internal); when(storIOContentResolver.get()).thenReturn(new PreparedGet.Builder(storIOContentResolver)); final TestSubscriber<List<TestItem>> testSubscriber = new TestSubscriber<List<TestItem>>(); storIOContentResolver .get() .listOfObjects(TestItem.class) .withQuery(Query.builder().uri(mock(Uri.class)).build()) .prepare() .asRxSingle() .subscribe(testSubscriber); testSubscriber.awaitTerminalEvent(); testSubscriber.assertNoValues(); assertThat(testSubscriber.getOnErrorEvents().get(0)) .isInstanceOf(StorIOException.class) .hasCauseInstanceOf(IllegalStateException.class) .hasMessage(IllegalStateException.class.getName() + ": This type does not have type mapping: type = " + TestItem.class + ",ContentProvider was not touched by this operation, please add type mapping for this type"); verify(storIOContentResolver).get(); verify(storIOContentResolver).internal(); verify(internal).typeMapping(TestItem.class); verify(internal, never()).query(any(Query.class)); verifyNoMoreInteractions(storIOContentResolver, internal); }
Source:
<code>protected void updateExpiration(final String token, long expiration) { if (isUnknown(token)) { log.unknownToken(getTokenDisplayText(token)); <START> throw new IllegalArgumentException("Unknown or revoked token."); <END> } try { aliasService.removeAliasForCluster(AliasService.NO_CLUSTER_NAME, token); aliasService.addAliasForCluster(AliasService.NO_CLUSTER_NAME, token, String.valueOf(expiration)); } catch (AliasServiceException e) { log.failedToUpdateTokenExpiration(e); } }</code><technical_language>I continue treating simply "unknown", giving illusion of distinction</technical_language>

Target:
protected void updateExpiration(final String token, long expiration) { if (isUnknown(token)) { log.unknownToken(getTokenDisplayText(token)); throw new IllegalArgumentException("Unknown token."); } try { aliasService.removeAliasForCluster(AliasService.NO_CLUSTER_NAME, token); aliasService.addAliasForCluster(AliasService.NO_CLUSTER_NAME, token, String.valueOf(expiration)); } catch (AliasServiceException e) { log.failedToUpdateTokenExpiration(e); } }
Source:
<code>public String toGss() { try { CssStylesheet sheet = GenerateCssAst.exec(new PrintWriterTreeLogger(printWriter), cssFile); DefCollectorVisitor defCollectorVisitor = new DefCollectorVisitor(); defCollectorVisitor.accept(sheet); <START> Set<String> gssVarariableNames; <END> if (extractContantNames.isEmpty()) { gssVarariableNames = new HashSet<String>(defCollectorVisitor.getDefMapping().values()); } else { gssVarariableNames = extractContantNames; } ExternalClassesCollector externalClassesCollector = new ExternalClassesCollector(); externalClassesCollector.accept(sheet); SortedSet<String> classes = externalClassesCollector.getClasses(); removeWrongEntries(classes); new UndefinedConstantVisitor(gssVarariableNames, lenient).accept(sheet); new ElseNodeCreator().accept(sheet); new AlternateAnnotationCreatorVisitor().accept(sheet); new FontFamilyVisitor().accept(sheet); GssGenerationVisitor gssGenerationVisitor = new GssGenerationVisitor(new DefaultTextOutput (false), defCollectorVisitor.getDefMapping(), classes, lenient); gssGenerationVisitor.accept(sheet); return gssGenerationVisitor.getContent(); } catch (Exception e) { printWriter.flush(); throw new RuntimeException(e); } }</code><technical_language>typo gssVariableNames</technical_language>

Target:
public String toGss() { try { CssStylesheet sheet = GenerateCssAst.exec(new PrintWriterTreeLogger(printWriter), cssFile); DefCollectorVisitor defCollectorVisitor = new DefCollectorVisitor(); defCollectorVisitor.accept(sheet); Set<String> gssVariableNames = new HashSet<String>(defCollectorVisitor.getDefMapping().values()); ExternalClassesCollector externalClassesCollector = new ExternalClassesCollector(); externalClassesCollector.accept(sheet); SortedSet<String> classes = externalClassesCollector.getClasses(); removeWrongEntries(classes); removeWrongEscaping(classes); new UndefinedConstantVisitor(gssVariableNames, lenient).accept(sheet); new ElseNodeCreator().accept(sheet); new AlternateAnnotationCreatorVisitor().accept(sheet); new FontFamilyVisitor().accept(sheet); ConstantsCollector constantsCollector = new ConstantsCollector(); constantsCollector.accept(sheet); GssGenerationVisitor gssGenerationVisitor = new GssGenerationVisitor( new DefaultTextOutput(false), defCollectorVisitor.getDefMapping(), classes, constantsCollector.getConstantNodes(), lenient); gssGenerationVisitor.accept(sheet); return gssGenerationVisitor.getContent(); } catch (Exception e) { printWriter.flush(); throw new RuntimeException(e); } }
Source:
<code>public EventType evolve(final EventType original, final EventTypeBase eventType) throws InvalidEventTypeException { final Optional<SchemaEvolutionIncompatibility> incompatibility = schemaEvolutionConstraints.stream() .map(c -> c.validate(original, eventType)).filter(Optional::isPresent).findFirst() .orElse(Optional.empty()); if (incompatibility.isPresent()) { throw new InvalidEventTypeException(incompatibility.get().getReason()); } final List<SchemaChange> changes = schemaDiff.collectChanges(schema(original), schema(eventType)); final Version.Level changeLevel = semanticOfChange(changes, original.getCompatibilityMode()); if (changeLevel == NO_CHANGES && !original.getSchema().getSchema().equals(eventType.getSchema().getSchema())) { LOG.error("undetected schema changes from to {}", original.getSchema().getSchema(), eventType.getSchema().getSchema()); <START> throw new MyNakadiRuntimeException1("undetected schema changes"); <END> } if (isForwardToCompatibleUpgrade(original, eventType)) { validateCompatibilityModeMigration(original, eventType, changes); } else if (original.getCompatibilityMode() != CompatibilityMode.NONE) { validateCompatibleChanges(original, changes, changeLevel); } return this.bumpVersion(original, eventType, changeLevel); }</code><technical_language>I throw MyNakadiRuntimeException1, name problem was. Also, if do a lot, difficult for caller find out from. I prefer subclass exception a clear name</technical_language>

Target:
public EventType evolve(final EventType original, final EventTypeBase eventType) throws InvalidEventTypeException { final Optional<SchemaEvolutionIncompatibility> incompatibility = schemaEvolutionConstraints.stream() .map(c -> c.validate(original, eventType)).filter(Optional::isPresent).findFirst() .orElse(Optional.empty()); if (incompatibility.isPresent()) { throw new InvalidEventTypeException(incompatibility.get().getReason()); } final List<SchemaChange> changes = schemaDiff.collectChanges(schema(original), schema(eventType)); final Version.Level changeLevel = semanticOfChange(changes, original.getCompatibilityMode()); if (changeLevel == NO_CHANGES && !original.getSchema().getSchema().equals(eventType.getSchema().getSchema())) { LOG.error("undetected schema changes from to {}", original.getSchema().getSchema(), eventType.getSchema().getSchema()); throw new UnexpectedSchemaChangeException("undetected schema changes"); } if (isForwardToCompatibleUpgrade(original, eventType)) { validateCompatibilityModeMigration(original, eventType, changes); } else if (original.getCompatibilityMode() != CompatibilityMode.NONE) { validateCompatibleChanges(original, changes, changeLevel); } return this.bumpVersion(original, eventType, changeLevel); }
Source:
<code>private void checkCreatingCustomHasher(AstNode classDef) { AstNode argList = classDef.getFirstChild(PythonGrammar.ARGLIST); if (argList != null) { argList.getDescendants(PythonGrammar.ATOM) <START> .forEach(atom -> { <END> if (questionableDjangoHashers.contains(getQualifiedName(atom))) { addIssue(atom, MESSAGE); } }); } }</code><technical_language>java .filter(atom -> questionableDjangoHashers.contains(getQualifiedName(atom))) .forEach(atom -> addIssue(atom, MESSAGE));</technical_language>

Target:
private void checkCreatingCustomHasher(AstNode classDef) { AstNode argList = classDef.getFirstChild(PythonGrammar.ARGLIST); if (argList != null) { argList.getDescendants(PythonGrammar.ATOM) .stream() .filter(atom -> questionableDjangoHashers.contains(getQualifiedName(atom))) .forEach(atom -> addIssue(atom, MESSAGE)); } }
Source:
<code>public String getAdbPort() { <START> return (String) getCapability(AndroidMobileCapabilityType.ADB_PORT); <END> }</code><technical_language>I handle numbers strings properly</technical_language>

Target:
public Integer getAdbPort() { return (Integer) getCapability(AndroidMobileCapabilityType.ADB_PORT); }
Source:
<code>public void visitReturnStatement(ReturnStatementTree returnStatement) { ExpressionTree expression = returnStatement.expression(); if (!checkNull(expression) && expression.is(Kind.CONDITIONAL_EXPRESSION)) { ConditionalExpressionTree conditionalExpression = (ConditionalExpressionTree)expression; checkNull(conditionalExpression.trueExpression()); checkNull(conditionalExpression.falseExpression()); } <START> } <END></code><technical_language>call super.visitReturnStatement(returnStatement) leaving method, catch cases : Optional<String> s = getValue(); return (s != null) ? optional.isEmpty() : s; // Noncompliant, null check s is wrong</technical_language>

Target:
public void visitReturnStatement(ReturnStatementTree returnStatement) { checkNull(returnStatement.expression()); super.visitReturnStatement(returnStatement); }
Source:
<code>Script(JavaScriptValidator validator, String name, String script) throws RedPenException { this.name = name; ScriptEngine engine = manager.getEngineByName("nashorn"); try { engine.put("redpenToBeBound", validator); engine.eval("var addError = Function.prototype.bind.call(redpenToBeBound.addError, redpenToBeBound);" + "var addErrorWithPosition = Function.prototype.bind.call(redpenToBeBound.addErrorWithPosition, redpenToBeBound);" + "var addLocalizedError = Function.prototype.bind.call(redpenToBeBound.addLocalizedError, redpenToBeBound);" + "var addLocalizedErrorFromToken = Function.prototype.bind.call(redpenToBeBound.addLocalizedErrorFromToken, redpenToBeBound);" + <START> "var addLocalizedErrorWithPosition = Function.prototype.bind.call(redpenToBeBound.addLocalizedErrorWithPosition, redpenToBeBound);"); <END> applySandbox(engine); CompiledScript compiledScript = ((Compilable) engine).compile(script); compiledScript.eval(); this.message = (String)engine.get("message"); this.invocable = (Invocable) engine; } catch (ScriptException e) { throw new RedPenException(e); } }</code><technical_language>adding "java = undefined; javax = undefined; Java = undefined; load = undefined; redpenToBeBound = undefined;"); this section, instead of introducing appllySandbox method UnconfinedScript</technical_language>

Target:
Script(JavaScriptValidator validator, String name, String script) throws RedPenException { this.name = name; ScriptEngine engine = manager.getEngineByName("nashorn"); try { engine.put("redpenToBeBound", validator); engine.eval("var addError = Function.prototype.bind.call(redpenToBeBound.addError, redpenToBeBound);" + "var addErrorWithPosition = Function.prototype.bind.call(redpenToBeBound.addErrorWithPosition, redpenToBeBound);" + "var addLocalizedError = Function.prototype.bind.call(redpenToBeBound.addLocalizedError, redpenToBeBound);" + "var addLocalizedErrorFromToken = Function.prototype.bind.call(redpenToBeBound.addLocalizedErrorFromToken, redpenToBeBound);" + "var addLocalizedErrorWithPosition = Function.prototype.bind.call(redpenToBeBound.addLocalizedErrorWithPosition, redpenToBeBound);" + "var _JavaScriptValidatorTest = Java.type('cc.redpen.validator.JavaScriptValidatorTest');" + "java = undefined; javax = undefined; Java = undefined; load = undefined; redpenToBeBound = undefined;"); CompiledScript compiledScript = ((Compilable) engine).compile(script); compiledScript.eval(); this.message = (String)engine.get("message"); this.invocable = (Invocable) engine; } catch (ScriptException e) { throw new RedPenException(e); } }
Source:
<code>public void satisfiesEqualsContract() throws IOException { final List<String> dispositions = Arrays.asList( Joiner.on(RqMultipartTest.CRLF).join( "Content-Disposition: form-data; name=\"addres\"", "", "449 N Wolfe Rd, Sunnyvale, CA 94085" ), "Content-Disposition: form-data; name=\"data\"; filename=\"a.bin\"" ); <START> final String boundary = "AaB02x"; <END> final Collection<String> parts = new LinkedList<String>(); for (final String disposition : dispositions) { parts.add(String.format("--%s", boundary)); parts.add(disposition); } parts.add("Content-Transfer-Encoding: utf-8"); parts.add(String.format("--%s--", boundary)); final Request req = new RqFake( Arrays.asList( "POST /h?u=3 HTTP/1.1", "Host: www.example.com", "Content-Type: multipart/form-data; boundary=AaB02x", "Content-Length: 100001" ), Joiner.on(RqMultipartTest.CRLF).join(parts) ); MatcherAssert.assertThat( new RqMultipart.Base(req), Matchers.equalTo(new RqMultipart.Base(req)) ); }</code><technical_language>@erimerturk hm... RqMultipart.Fake instead</technical_language>

Target:
public void satisfiesEqualsContract() throws IOException { final Request req = new RqMultipart.Fake( Joiner.on(RqMultipartTest.CRLF).join( "Content-Disposition: form-data; name=\"addres\"", "", "449 N Wolfe Rd, Sunnyvale, CA 94085" ), "Content-Disposition: form-data; name=\"data\"; filename=\"a.bin\"" ); MatcherAssert.assertThat( new RqMultipart.Base(req), Matchers.equalTo(new RqMultipart.Base(req)) ); }
Source:
<code>public boolean equals(Object obj) { if (this == obj) { return true; } <START> if (obj == null || !(obj instanceof LazilyParsedNumber)) { <END> return false; } LazilyParsedNumber other = (LazilyParsedNumber) obj; return equals(value, other.value); }</code><technical_language>instanceof check includes a null check</technical_language>

Target:
public boolean equals(Object obj) { if (this == obj) { return true; } if (obj instanceof LazilyParsedNumber) { LazilyParsedNumber other = (LazilyParsedNumber) obj; return value == other.value || value.equals(other.value); } return false; }
Source:
<code>private void handleUpdatedFeedStatus(Feed feed) { if (feed != null) { if (DownloadRequester.getInstance().isDownloadingFile(feed.getDownload_url())) { viewBinding.subscribeButton.setEnabled(false); viewBinding.subscribeButton.setText(R.string.subscribing_label); if (UserPreferences.isEnableAutodownload()) { LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) viewBinding.subscribeButton.getLayoutParams(); layoutParams.setMargins(16, 16, 16, 0); viewBinding.subscribeButton.setLayoutParams(layoutParams); viewBinding.autoDownloadCheckBox.setVisibility(View.VISIBLE); <START> } <END> } else if (feedInFeedlist(feed)) { viewBinding.subscribeButton.setEnabled(true); viewBinding.subscribeButton.setText(R.string.open_podcast); if (didPressSubscribe) { didPressSubscribe = false; if (viewBinding.autoDownloadCheckBox.getVisibility() == View.VISIBLE) { Feed feed1 = DBReader.getFeed(getFeedId(feed)); FeedPreferences feedPreferences = feed1.getPreferences(); feedPreferences.setAutoDownload(viewBinding.autoDownloadCheckBox.isChecked()); feed1.savePreferences(); } openFeed(); } } else { if (UserPreferences.isEnableAutodownload()) { LinearLayout.LayoutParams layoutParams = (LinearLayout.LayoutParams) viewBinding.subscribeButton.getLayoutParams(); layoutParams.setMargins(16, 16, 16, 0); viewBinding.subscribeButton.setLayoutParams(layoutParams); viewBinding.autoDownloadCheckBox.setVisibility(View.VISIBLE); } viewBinding.subscribeButton.setEnabled(true); viewBinding.subscribeButton.setText(R.string.subscribe_label); } } }</code><technical_language>please move setting visibility central location? I a hard time understanding needs modified *and* in else branch</technical_language>

Target:
private void handleUpdatedFeedStatus(Feed feed) { if (feed != null) { if (DownloadRequester.getInstance().isDownloadingFile(feed.getDownload_url())) { viewBinding.subscribeButton.setEnabled(false); viewBinding.subscribeButton.setText(R.string.subscribing_label); } else if (feedInFeedlist(feed)) { viewBinding.subscribeButton.setEnabled(true); viewBinding.subscribeButton.setText(R.string.open_podcast); if (didPressSubscribe) { didPressSubscribe = false; if (UserPreferences.isEnableAutodownload()) { Feed feed1 = DBReader.getFeed(getFeedId(feed)); FeedPreferences feedPreferences = feed1.getPreferences(); feedPreferences.setAutoDownload(viewBinding.autoDownloadCheckBox.isChecked()); feed1.savePreferences(); } openFeed(); } } else { viewBinding.subscribeButton.setEnabled(true); viewBinding.subscribeButton.setText(R.string.subscribe_label); if (UserPreferences.isEnableAutodownload()) { viewBinding.autoDownloadCheckBox.setVisibility(View.VISIBLE); } } } }
Source:
<code><START> public void getAllPositionsShouldReturnEmptyListWhenThereAreNoPositions() { <END> given(positionRepository.findAll()).willReturn(EMPTY_POSITION_ENTITY_LIST); given(modelMapper.map(EMPTY_POSITION_ENTITY_LIST, POSITIONDTO_LIST_TYPE)) .willReturn(EMPTY_POSITION_DTO_LIST); Collection<PositionDTO> positions = positionService.getAllPositions(); assertThat(positions, notNullValue()); assertThat(positions.isEmpty(), is(true)); }</code><technical_language>getAllPositions tests expect findAll call</technical_language>

Target:
public void getAllPositionsShouldReturnEmptyListWhenThereAreNoPositions() { given(positionRepository.findAll()).willReturn(EMPTY_POSITION_ENTITY_LIST); given(modelMapper.map(EMPTY_POSITION_ENTITY_LIST, POSITIONDTO_LIST_TYPE)) .willReturn(EMPTY_POSITION_DTO_LIST); Collection<PositionDTO> positions = positionService.getAllPositions(); assertThat(positions, notNullValue()); assertThat(positions.isEmpty(), is(true)); then(positionRepository).should(times(1)).findAll(); }
Source:
<code>public String getHostName() { byte[] hostnameBuffer = new byte[4097]; int result = LibC.INSTANCE.gethostname(hostnameBuffer, hostnameBuffer.length); if (result != 0) { <START> throw new RuntimeException("gethostname call failed"); <END> } return Native.toString(hostnameBuffer); }</code><technical_language>throw exception here. I suggest returning super.getHostName() (and other 3 implementations)</technical_language>

Target:
public String getHostName() { byte[] hostnameBuffer = new byte[HOST_NAME_MAX + 1]; if (0 != SYS.gethostname(hostnameBuffer, hostnameBuffer.length)) { return super.getHostName(); } return Native.toString(hostnameBuffer); }
Source:
<code>private List<TriggerAction> createActions(SlaOption sla, int execId) { List<TriggerAction> actions = new ArrayList<>(); List<String> slaActions = sla.getActions(); for (String act : slaActions) { TriggerAction action = null; switch (act) { <START> case SlaOption.ACTION_ALERT: <END> action = new SlaAlertAction("slaAlert", sla, execId); break; case SlaOption.ACTION_CANCEL_FLOW: action = new KillExecutionAction("killExecution", execId); break; default: break; } if (action != null) { actions.add(action); } } return actions; }</code><technical_language>swtich is a bit hacky here, TriggerActionFactory() for producing TriggerActions</technical_language>

Target:
private List<TriggerAction> createActions(SlaOption sla, int execId) { List<TriggerAction> actions = new ArrayList<>(); List<String> slaActions = sla.getActions(); for (String act : slaActions) { TriggerAction action = null; switch (act) { case SlaOption.ACTION_ALERT: action = new SlaAlertAction("slaAlert", sla, execId); break; case SlaOption.ACTION_CANCEL_FLOW: action = new KillExecutionAction("killExecution", execId); break; default: logger.info("Unknown action type " + act); break; } if (action != null) { actions.add(action); } } return actions; }
Source:
<code>private void addSpinnerToGraph(WebView graphView, ViewGroup graphLayout) { final ProgressBar spinner = new ProgressBar(this.getContext(), null, android.R.attr.progressBarStyleLarge); spinner.setLayoutParams(new FrameLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT, Gravity.CENTER)); GraphLoader graphLoader = new GraphLoader((Activity) this.getContext(), spinner); <START> ((WebView)graphView).addJavascriptInterface(graphLoader, "Android"); <END> Timer spinnerTimer = new Timer(); spinnerTimer.schedule(graphLoader, 10000); graphLayout.addView(spinner); }</code><technical_language>((WebView)graphView) -> graphView</technical_language>

Target:
private void addSpinnerToGraph(WebView graphView, ViewGroup graphLayout) { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.JELLY_BEAN) { return; } final ProgressBar spinner = new ProgressBar(this.getContext(), null, android.R.attr.progressBarStyleLarge); spinner.setLayoutParams(new FrameLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT, ViewGroup.LayoutParams.WRAP_CONTENT, Gravity.CENTER)); GraphLoader graphLoader = new GraphLoader((Activity) this.getContext(), spinner); graphView.addJavascriptInterface(graphLoader, "Android"); Timer spinnerTimer = new Timer(); spinnerTimer.schedule(graphLoader, 10000); graphLayout.addView(spinner); }
Source:
<code>Mono<EncryptResult> encrypt(EncryptionAlgorithm algorithm, byte[] plaintext, Context context, byte[] iv, byte[] authenticationData) { Objects.requireNonNull(algorithm); if(key == null){ this.key = getKey().block().value().keyMaterial(); <START> } <END> if (!checkKeyPermissions(this.key.keyOps(), KeyOperation.ENCRYPT)){ return Mono.error(new UnsupportedOperationException(String.format("Encrypt Operation is not supported for key with id %s", key.kid()))); } switch(key.kty()){ case RSA: case RSA_HSM: return rsaKeyCryptographyClient.encryptAsync(algorithm, plaintext, iv, authenticationData, context, key); case EC: case EC_HSM: return ecKeyCryptographyClient.encryptAsync(algorithm, plaintext, iv, authenticationData, context, key); case OCT: return symmetricKeyCryptographyClient.encryptAsync(algorithm, plaintext, iv, authenticationData, context, key); default: throw new UnsupportedOperationException(String.format("Encrypt Async is not allowed for Key Type: %s", key.kty().toString())); } }</code><technical_language>getKey fail if calling principal key_get permission. This handled default calling service for crypto calls key is avialable</technical_language>

Target:
Mono<EncryptResult> encrypt(EncryptionAlgorithm algorithm, byte[] plaintext, Context context, byte[] iv, byte[] authenticationData) { Objects.requireNonNull(algorithm, "Encryption algorithm cannot be null."); Objects.requireNonNull(plaintext, "Plain text content to be encrypted cannot be null."); boolean keyAvailableLocally = ensureValidKeyAvailable(); if (!keyAvailableLocally) { return cryptographyServiceClient.encrypt(algorithm, plaintext, context); } if (!checkKeyPermissions(this.key.keyOps(), KeyOperation.ENCRYPT)) { return Mono.error(new UnsupportedOperationException(String.format("Encrypt Operation is missing permission/not supported for key with id %s", key.kid()))); } return localKeyCryptographyClient.encryptAsync(algorithm, plaintext, iv, authenticationData, context, key); }
Source:
<code>public void handle(Message req, org.jgroups.blocks.Response response) throws Exception { if (isValid(req)) { ReplicableCommand cmd = null; try { cmd = (ReplicableCommand) req_marshaller.objectFromBuffer(req.getRawBuffer(), req.getOffset(), req.getLength()); if (cmd == null) throw new NullPointerException("Unable to execute a null command! Message was " + req); JGroupsAsyncInvocationRequest callback = fromJGroupsResponse(response); Object retVal; if (req.getSrc() instanceof SiteAddress) { retVal = executeCommandFromRemoteSite(cmd, (SiteAddress)req.getSrc(), callback); } else { retVal = executeCommandFromLocalCluster(cmd, req, callback); } if (!cmd.isProcessedAsynchronously()) { <START> transport.sendResponse(cmd, null, callback, retVal, false); <END> } } catch (InterruptedException e) { log.warnf("Shutdown while handling command %s", cmd); if (response != null) { response.send(new ExceptionResponse(new CacheException("Cache is shutting down")), false); } } catch (Throwable x) { if (cmd == null) log.warnf(x, "Problems unmarshalling remote command from byte buffer"); else log.warnf(x, "Problems invoking command %s", cmd); if (response != null) { response.send(new ExceptionResponse(new CacheException("Problems invoking command.", x)), false); } } } else if (response != null) { response.send(null, false); } }</code><technical_language>response.send transport.sendResponse in method? InboundInvocationHandler responses own, this method deal exceptional cases</technical_language>

Target:
public void handle(Message req, org.jgroups.blocks.Response response) throws Exception { if (isValid(req)) { boolean cannotBeReordered = !req.isFlagSet(Message.Flag.OOB); ReplicableCommand cmd = null; try { cmd = (ReplicableCommand) req_marshaller.objectFromBuffer(req.getRawBuffer(), req.getOffset(), req.getLength()); if (cmd == null) throw new NullPointerException("Unable to execute a null command! Message was " + req); if (req.getSrc() instanceof SiteAddress) { executeCommandFromRemoteSite(cmd, (SiteAddress) req.getSrc(), response, cannotBeReordered); } else { executeCommandFromLocalCluster(cmd, req, response, cannotBeReordered); } } catch (InterruptedException e) { log.warnf("Shutdown while handling command %s", cmd); reply(response, new ExceptionResponse(new CacheException("Cache is shutting down"))); } catch (Throwable x) { if (cmd == null) log.warnf(x, "Problems unmarshalling remote command from byte buffer"); else log.warnf(x, "Problems invoking command %s", cmd); reply(response, new ExceptionResponse(new CacheException("Problems invoking command.", x))); } } else { reply(response, null); } }
Source:
<code>private void handleErrors(List<Throwable> tooLargemessageException, List<Throwable> otherMessageException) { StringBuffer messageExceptionForDialog = new StringBuffer(); if (!tooLargemessageException.isEmpty()) { messageExceptionForDialog.append(Messages.ExportAction_imagesTooLargeMessage); } for (Throwable thr : tooLargemessageException) { messageExceptionForDialog.append("\n"); <START> messageExceptionForDialog.append(" - <END> "); messageExceptionForDialog.append(thr.getMessage()); } for (Throwable thr : otherMessageException) { messageExceptionForDialog.append("\n"); messageExceptionForDialog.append(" - "); messageExceptionForDialog.append(thr.getMessage()); } final Shell shell = Display.getCurrent().getActiveShell(); MessageDialog.openError(shell, Messages.ExportAction_exportImpossibleTitle, messageExceptionForDialog.toString()); SiriusPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, SiriusPlugin.ID, messageExceptionForDialog.toString())); }</code><technical_language>dash is nice is exeption</technical_language>

Target:
private void handleErrors(List<Throwable> tooLargemessageException, List<Throwable> otherMessageException) { StringBuffer messageExceptionForDialog = new StringBuffer(); if (!tooLargemessageException.isEmpty()) { messageExceptionForDialog.append(Messages.ExportAction_imagesTooLargeMessage); } for (Throwable thr : tooLargemessageException) { messageExceptionForDialog.append("\n"); messageExceptionForDialog.append(" - "); messageExceptionForDialog.append(thr.getMessage()); } for (Throwable thr : otherMessageException) { if (!tooLargemessageException.isEmpty()) { messageExceptionForDialog.append("\n"); } if (tooLargemessageException.size() > 1) { messageExceptionForDialog.append(" - "); } messageExceptionForDialog.append(thr.getMessage()); } final Shell shell = Display.getCurrent().getActiveShell(); MessageDialog.openError(shell, Messages.ExportAction_exportImpossibleTitle, messageExceptionForDialog.toString()); SiriusPlugin.getDefault().getLog().log(new Status(IStatus.ERROR, SiriusPlugin.ID, messageExceptionForDialog.toString())); }
Source:
<code>public void shouldReturnListOfExistingNamespacesIfUserDefinedIsAllowed() throws Exception { prepareListedNamespaces( Arrays.asList( createNamespace("my-for-ws", "Active"), createNamespace("experimental", "Terminating"))); namespaceFactory = new KubernetesNamespaceFactory("predefined", "", "", null, true, clientFactory); List<KubernetesNamespaceMeta> availableNamespaces = namespaceFactory.list(); assertEquals(availableNamespaces.size(), 2); KubernetesNamespaceMeta forWS = availableNamespaces.get(0); assertEquals(forWS.getName(), "my-for-ws"); <START> assertEquals(forWS.getAttributes().get(PHASE_ATTRIBUTE), "Active"); <END> KubernetesNamespaceMeta experimental = availableNamespaces.get(1); assertEquals(experimental.getName(), "experimental"); assertEquals(experimental.getAttributes().get(PHASE_ATTRIBUTE), "Terminating"); }</code><technical_language>For completeness, assert DEFAULT_ATTRIBUTE is null in PVCs</technical_language>

Target:
public void shouldReturnListOfExistingNamespacesIfUserDefinedIsAllowed() throws Exception { prepareListedNamespaces( Arrays.asList( createNamespace("my-for-ws", "Active"), createNamespace("experimental", "Terminating"))); namespaceFactory = new KubernetesNamespaceFactory("predefined", "", "", null, true, clientFactory); List<KubernetesNamespaceMeta> availableNamespaces = namespaceFactory.list(); assertEquals(availableNamespaces.size(), 2); KubernetesNamespaceMeta forWS = availableNamespaces.get(0); assertEquals(forWS.getName(), "my-for-ws"); assertEquals(forWS.getAttributes().get(PHASE_ATTRIBUTE), "Active"); assertNull(forWS.getAttributes().get(DEFAULT_ATTRIBUTE)); KubernetesNamespaceMeta experimental = availableNamespaces.get(1); assertEquals(experimental.getName(), "experimental"); assertEquals(experimental.getAttributes().get(PHASE_ATTRIBUTE), "Terminating"); }
Source:
<code>public void testDeleteLoadBalancer() throws SerializationException, StateAccessException, <START> MappingStatusException, Rule.RuleIndexOutOfBoundsException { <END> Router r = new Router(UUID.randomUUID(), "TENANT", "NAME", true, null, null); this.plugin.createRouter(r); Pool p = new Pool(UUID.randomUUID(), "TENANT", UUID.randomUUID(), "NAME", "TCP", "ROUND_ROBIN", true, r.id); this.plugin.createPool(p); HealthMonitor hm = new HealthMonitor(); hm.id = UUID.randomUUID(); hm.adminStateUp = true; hm.delay = 1; hm.maxRetries = 1; this.plugin.createHealthMonitor(hm); PoolHealthMonitor phm = new PoolHealthMonitor(); phm.id = hm.id; this.plugin.createPoolHealthMonitor(p.id, phm); Assert.assertTrue(this.zk.exists( pb.getPoolHealthMonitorMappingsPath(p.id, hm.id))); UUID lbId = this.dataClient.loadBalancersGetAll().get(0).getId(); this.dataClient.loadBalancerDelete(lbId); Assert.assertFalse(this.zk.exists( pb.getPoolHealthMonitorMappingsPath(p.id, hm.id))); }</code><technical_language>I this test minimized a lines re-using parent's router/pool</technical_language>

Target:
public void testDeleteLoadBalancer() throws SerializationException, StateAccessException, MappingStatusException, Rule.RuleIndexOutOfBoundsException { String path = pb.getPoolHealthMonitorMappingsPath(pool.id, healthMonitor.id); Assert.assertTrue(this.zk.exists(path)); UUID lbId = this.dataClient.loadBalancersGetAll().get(0).getId(); this.dataClient.loadBalancerDelete(lbId); Assert.assertFalse(this.zk.exists(path)); }
Source:
<code>public synchronized void releaseWakeLock() { <START> if (wakelock != null) { <END> wakelock.release(); wakelock = null; } }</code><technical_language>this check for wakelock.isHeld(), call release() in acquireWakeLock</technical_language>

Target:
public synchronized void releaseWakeLock() { if (wakelock != null && wakelock.isHeld()) { wakelock.release(); } wakelock = null; }
Source:
<code>public ArrayList<Sequence> getToBeKeptFromArrayList(ArrayList<Sequence> sequences) { <START> ArrayList<Sequence> deletableSequences = new ArrayList<Sequence>(); <END> for (Sequence s : sequences) { if (s.getType().equals(Sequence.TYPE_BEGIN_QUESTIONNAIRE) ) { deletableSequences.add(s); } } return deletableSequences; }</code><technical_language>Rename this variable</technical_language>

Target:
public ArrayList<Sequence> getToBeKeptFromArrayList(ArrayList<Sequence> sequences) { ArrayList<Sequence> toBeKeptQuestionnaires = new ArrayList<Sequence>(); for (Sequence s : sequences) { if (s.getType().equals(Sequence.TYPE_BEGIN_QUESTIONNAIRE) ) { toBeKeptQuestionnaires.add(s); } } return toBeKeptQuestionnaires; }
Source:
<code>public List<MetadataValue> getMetadata(Item item, String schema, String element, String qualifier, String lang) { <START> if (StringUtils.equals(schema, "relation") && !StringUtils.equals(element, "type")) { <END> List<MetadataValue> relationMetadata = getRelationshipMetadata(item, false); List<MetadataValue> listToReturn = new LinkedList<>(); for (MetadataValue metadataValue : relationMetadata) { if (StringUtils.equals(metadataValue.getMetadataField().getElement(), element)) { listToReturn.add(metadataValue); } } return listToReturn; } else { List<MetadataValue> dbMetadataValues = super.getMetadata(item, schema, element, qualifier, lang); if (!(StringUtils.equals(schema, "*") && StringUtils.equals(element, "*") && StringUtils.equals(qualifier, "*") && StringUtils.equals(lang, "*"))) { return dbMetadataValues; } List<MetadataValue> fullMetadataValueList = getRelationshipMetadata(item, true); fullMetadataValueList.addAll(dbMetadataValues); return fullMetadataValueList; } }</code><technical_language>I this configurable. need a configuration holds schema element for relation</technical_language>

Target:
public List<MetadataValue> getMetadata(Item item, String schema, String element, String qualifier, String lang) { if (StringUtils.equals(schema, MetadataSchemaEnum.RELATION.getName()) && !StringUtils.equals(element, "type")) { List<MetadataValue> relationMetadata = getRelationshipMetadata(item, false); List<MetadataValue> listToReturn = new LinkedList<>(); for (MetadataValue metadataValue : relationMetadata) { if (StringUtils.equals(metadataValue.getMetadataField().getElement(), element)) { listToReturn.add(metadataValue); } } return listToReturn; } else { List<MetadataValue> dbMetadataValues = super.getMetadata(item, schema, element, qualifier, lang); if (!(StringUtils.equals(schema, "*") && StringUtils.equals(element, "*") && StringUtils.equals(qualifier, "*") && StringUtils.equals(lang, "*"))) { return dbMetadataValues; } List<MetadataValue> fullMetadataValueList = getRelationshipMetadata(item, true); fullMetadataValueList.addAll(dbMetadataValues); return fullMetadataValueList; } }
Source:
<code>private static StepVideoThumbnail parseVideoThumbnail(JSONObject jVideoThumb) throws JSONException { String guid = jVideoThumb.getString("guid"); int imageid = jVideoThumb.getInt("imageid"); String ratio = jVideoThumb.getString("ratio"); int width = jVideoThumb.getInt("width"); int height = jVideoThumb.getInt("height"); String url = jVideoThumb.getString("medium"); url = url.substring(0, url.lastIndexOf(".")); <START> Log.w("StepVideoThumbnail URL:", " >>> " + url); <END> return new StepVideoThumbnail(guid, imageid, url, ratio, width, height); }</code><technical_language>Debug Log</technical_language>

Target:
private static StepVideoThumbnail parseVideoThumbnail(JSONObject jVideoThumb) throws JSONException { String guid = jVideoThumb.getString("guid"); int imageid = jVideoThumb.getInt("imageid"); String ratio = jVideoThumb.getString("ratio"); int width = jVideoThumb.getInt("width"); int height = jVideoThumb.getInt("height"); String url = jVideoThumb.getString("medium"); url = url.substring(0, url.lastIndexOf(".")); return new StepVideoThumbnail(guid, imageid, url, ratio, width, height); }
Source:
<code>public void testUpdateFeed_AddMoreItems() { DocumentFile documentFile1 = DocumentFile.fromFile(localFeedDir1); try (MockedStatic<DocumentFile> dfMock = Mockito.mockStatic(DocumentFile.class)) { dfMock.when(() -> DocumentFile.fromTreeUri(any(), any())).thenReturn(documentFile1); Feed feed = new Feed(FEED_URL, null); LocalFeedUpdater.updateFeed(feed, context); <START> } <END> DocumentFile documentFile2 = DocumentFile.fromFile(localFeedDir2); try (MockedStatic<DocumentFile> dfMock = Mockito.mockStatic(DocumentFile.class)) { dfMock.when(() -> DocumentFile.fromTreeUri(any(), any())).thenReturn(documentFile2); Feed feed = new Feed(FEED_URL, null); LocalFeedUpdater.updateFeed(feed, context); } List<Feed> feedListAfter = DBReader.getFeedList(); assertEquals(1, feedListAfter.size()); Feed feedAfter = feedListAfter.get(0); List<FeedItem> feedItems = DBReader.getFeedItemList(feedAfter); assertEquals(2, feedItems.size()); }</code><technical_language>Adding items pretty repetitive code. creating a function for that</technical_language>

Target:
public void testUpdateFeed_AddMoreItems() { callUpdateFeed(LOCAL_FEED_DIR1); callUpdateFeed(LOCAL_FEED_DIR2); verifySingleFeedInDatabaseAndItemCount(2); }
Source:
<code>public void startStripe(InputStreamSources dictionaryStreamSources, List<ColumnEncoding> encodings) throws IOException { presentStreamSource = missingStreamSource(BooleanInputStream.class); inMapStreamSources.clear(); valueStreamDescriptors.clear(); valueStreamReaders.clear(); ColumnEncoding encoding = encodings.get(baseValueStreamDescriptor.getStreamId()); <START> Map<Integer, DwrfSequenceEncoding> <END> additionalSequenceEncodings = encoding.getAdditionalSequenceEncodings().orElse(Collections.emptyMap()); for (int sequence : additionalSequenceEncodings.keySet()) { inMapStreamSources.add(missingStreamSource(BooleanInputStream.class)); StreamDescriptor valueStreamDescriptor = copyStreamDescriptorWithSequence(baseValueStreamDescriptor, sequence); valueStreamDescriptors.add(valueStreamDescriptor); StreamReader valueStreamReader = StreamReaders.createStreamReader(valueStreamDescriptor, hiveStorageTimeZone, systemMemoryContext); valueStreamReader.startStripe(dictionaryStreamSources, encodings); valueStreamReaders.add(valueStreamReader); } keyBlockTemplate = getKeyBlockTemplate(additionalSequenceEncodings.values()); readOffset = 0; nextBatchSize = 0; presentStream = null; rowGroupOpen = false; }</code><technical_language>nit: merge next line</technical_language>

Target:
public void startStripe(InputStreamSources dictionaryStreamSources, List<ColumnEncoding> encodings) throws IOException { presentStreamSource = missingStreamSource(BooleanInputStream.class); inMapStreamSources.clear(); valueStreamDescriptors.clear(); valueStreamReaders.clear(); ColumnEncoding encoding = encodings.get(baseValueStreamDescriptor.getStreamId()); Map<Integer, DwrfSequenceEncoding> additionalSequenceEncodings = encoding.getAdditionalSequenceEncodings().orElse(Collections.emptySortedMap()); for (int sequence : additionalSequenceEncodings.keySet()) { inMapStreamSources.add(missingStreamSource(BooleanInputStream.class)); StreamDescriptor valueStreamDescriptor = copyStreamDescriptorWithSequence(baseValueStreamDescriptor, sequence); valueStreamDescriptors.add(valueStreamDescriptor); StreamReader valueStreamReader = StreamReaders.createStreamReader(valueStreamDescriptor, hiveStorageTimeZone, systemMemoryContext); valueStreamReader.startStripe(dictionaryStreamSources, encodings); valueStreamReaders.add(valueStreamReader); } keyBlockTemplate = getKeyBlockTemplate(additionalSequenceEncodings.values()); readOffset = 0; nextBatchSize = 0; presentStream = null; rowGroupOpen = false; }
Source:
<code><START> public JsonResponse addUserToGroup(@PathVariable long userID, @PathVariable long groupID){ <END> try { JCUser jcUser = userService.get(userID); jcUser.addGroup(groupService.get(groupID)); userService.updateUser(jcUser); return new JsonResponse(JsonResponseStatus.SUCCESS); } catch (Exception e) { return new JsonResponse(JsonResponseStatus.FAIL); } }</code><technical_language>authorization? registered user invoke methods</technical_language>

Target:
public JsonResponse addUserToGroup(@PathVariable long userID, @PathVariable long groupID){ try { long forumId = componentService.getComponentOfForum().getId(); userService.addUserToGroup(forumId, userID, groupID); return new JsonResponse(JsonResponseStatus.SUCCESS); } catch (Exception e) { return new JsonResponse(JsonResponseStatus.FAIL); } }
Source:
<code>public String translate(final Case aCase) { String elseString = ""; if (aCase.getFalseAction() != null) { inject(aCase.getFalseAction()); elseString = String.format("ELSE %s", aCase.getFalseAction().translate()); } return String.format("CASE %s %s END", <START> aCase.whens.stream() <END> .peek(this::inject) .map(When::translate) .collect(Collectors.joining(" ")), elseString); }</code><technical_language>want a variable for this? call</technical_language>

Target:
public String translate(final Case aCase) { String elseString = ""; if (aCase.getFalseAction() != null) { inject(aCase.getFalseAction()); elseString = String.format("ELSE %s", aCase.getFalseAction().translate()); } final String whens = aCase.whens.stream() .peek(this::inject) .map(When::translate) .collect(Collectors.joining(" ")); return String.format("CASE %s %s END", whens, elseString); }
Source:
<code>public void refreshCustomizedViewMap(final HelixDataAccessor accessor) { List<String> stateTypes = accessor.getChildNames(accessor.keyBuilder().customizedViews()); if (_propertyDataChangedMap.get(HelixConstants.ChangeType.CUSTOMIZED_VIEW).getAndSet(false)) { for (String stateType: stateTypes) { <START> _customizedViewCacheMap.get(stateType).refresh(accessor); <END> } } for (String stateType : _customizedViewCacheMap.keySet()) { if (!stateTypes.contains(stateType)) { logger.info("Remove customizedView for state: " + stateType); _customizedViewCacheMap.remove(stateType); } } }</code><technical_language>map is initialized en empty map. Do need check for NPE here</technical_language>

Target:
public void refreshCustomizedViewMap(final HelixDataAccessor accessor) { List<String> newStateTypes = accessor.getChildNames(accessor.keyBuilder().customizedViews()); if (_propertyDataChangedMap.get(HelixConstants.ChangeType.CUSTOMIZED_VIEW).getAndSet(false)) { for (String stateType : newStateTypes) { if (!_customizedViewCacheMap.containsKey(stateType)) { CustomizedViewCache newCustomizedViewCache = new CustomizedViewCache(getClusterName(), stateType); _customizedViewCacheMap.put(stateType, newCustomizedViewCache); } _customizedViewCacheMap.get(stateType).refresh(accessor); } Set<String> previousCachedStateTypes = _customizedViewCacheMap.keySet(); previousCachedStateTypes.removeAll(newStateTypes); logger.info("Remove customizedView for state: " + previousCachedStateTypes); removeCustomizedViewTypes(new ArrayList<>(previousCachedStateTypes)); } }
Source:
<code>public String getDisplayName(int tokenType) { <START> if (tokenType >= Token.MIN_USER_TOKEN_TYPE && tokenType < displayNames.length) { <END> String displayName = displayNames[tokenType]; if (displayName != null) { return displayName; } } String literalName = getLiteralName(tokenType); if (literalName != null) { return literalName; } String symbolicName = getSymbolicName(tokenType); if (symbolicName != null) { return symbolicName; } return Integer.toString(tokenType); }</code><technical_language>This prevents a user assigning a custom display name Token.INVALID_TYPE. Adding this a restriction provide benefit user</technical_language>

Target:
public String getDisplayName(int tokenType) { if (tokenType >= 0 && tokenType < displayNames.length) { String displayName = displayNames[tokenType]; if (displayName != null) { return displayName; } } String literalName = getLiteralName(tokenType); if (literalName != null) { return literalName; } String symbolicName = getSymbolicName(tokenType); if (symbolicName != null) { return symbolicName; } return Integer.toString(tokenType); }
Source:
<code>public boolean process(final Set<? extends TypeElement> annotations, final RoundEnvironment roundEnvironment) { if ( !roundEnvironment.processingOver() ) { RoundContext roundContext = new RoundContext( annotationProcessorContext ); Set<TypeElement> deferredMappers = getAndResetDeferredMappers(); processMapperElements( deferredMappers, roundContext ); Set<TypeElement> mappers = getMappers( annotations, roundEnvironment ); processMapperElements( mappers, roundContext ); } else if ( !deferredMappers.isEmpty() ) { for ( DeferredMapper deferredMapper : deferredMappers ) { TypeElement deferredMapperElement = deferredMapper.deferredMapperElement; Element erroneousElement = deferredMapper.erroneousElement; String erroneousElementName; if ( erroneousElement instanceof QualifiedNameable ) { erroneousElementName = ( (QualifiedNameable) erroneousElement ).getQualifiedName().toString(); } else { erroneousElementName = erroneousElement.getSimpleName().toString(); } processingEnv.getMessager() .printMessage( Kind.ERROR, "No implementation was created for " + deferredMapperElement.getSimpleName() + " due to having a problem in the type hierarchy with " + erroneousElementName, <START> deferredMapperElement <END> ); } } return ANNOTATIONS_CLAIMED_EXCLUSIVELY; }</code><technical_language>is figure out annotatiotion processors in compilation cycle? If so, list them. If not: error message needs point more underlying in a more generic way. lines now, a hint another ap (not generating classes) problem</technical_language>

Target:
public boolean process(final Set<? extends TypeElement> annotations, final RoundEnvironment roundEnvironment) { if ( !roundEnvironment.processingOver() ) { RoundContext roundContext = new RoundContext( annotationProcessorContext ); Set<TypeElement> deferredMappers = getAndResetDeferredMappers(); processMapperElements( deferredMappers, roundContext ); Set<TypeElement> mappers = getMappers( annotations, roundEnvironment ); processMapperElements( mappers, roundContext ); } else if ( !deferredMappers.isEmpty() ) { for ( DeferredMapper deferredMapper : deferredMappers ) { TypeElement deferredMapperElement = deferredMapper.deferredMapperElement; Element erroneousElement = deferredMapper.erroneousElement; String erroneousElementName; if ( erroneousElement instanceof QualifiedNameable ) { erroneousElementName = ( (QualifiedNameable) erroneousElement ).getQualifiedName().toString(); } else { erroneousElementName = erroneousElement.getSimpleName().toString(); } deferredMapperElement = annotationProcessorContext.getElementUtils() .getTypeElement( deferredMapperElement.getQualifiedName() ); processingEnv.getMessager() .printMessage( Kind.ERROR, "No implementation was created for " + deferredMapperElement.getSimpleName() + " due to having a problem in the erroneous element " + erroneousElementName + "." + " Hint: this often means that some other annotation processor was supposed to" + " process the erroneous element. You can also enable MapStruct verbose mode by setting" + " -Amapstruct.verbose=true as a compilation argument.", deferredMapperElement ); } } return ANNOTATIONS_CLAIMED_EXCLUSIVELY; }