auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code><START> public RebaseCommand setUpstream(String upstream) <END> throws RefNotFoundException { try { ObjectId upstreamId = repo.resolve(upstream); if (upstreamId == null) throw new RefNotFoundException(MessageFormat.format(JGitText .get().refNotResolved, upstream)); upstreamCommit = new RevWalk(repo).parseCommit(repo .resolve(upstream)); return this; } catch (IOException ioe) { throw new JGitInternalException(ioe.getMessage(), ioe); } }</code><technical_language>Style-nit: This overload of setUpstream next other variant of setUpstream</technical_language>

Target:
public RebaseCommand setUpstream(String upstream) throws RefNotFoundException { try { ObjectId upstreamId = repo.resolve(upstream); if (upstreamId == null) throw new RefNotFoundException(MessageFormat.format(JGitText .get().refNotResolved, upstream)); upstreamCommit = walk.parseCommit(repo.resolve(upstream)); return this; } catch (IOException ioe) { throw new JGitInternalException(ioe.getMessage(), ioe); } }
Source:
<code>public RealmAsyncTask changePasswordAsync(final String newPassword, final Callback callback) { <START> checkLooperThread("Asynchronous changing password is only possible from looper threads."); <END> return new Request(SyncManager.NETWORK_POOL_EXECUTOR, callback) { @Override public SyncUser run() { changePassword(newPassword); return SyncUser.this; } }.start(); }</code><technical_language>throw exception if callback is null. Current code, NPE happen in Request#postSuccess() Request#postError() instead. a test case for that</technical_language>

Target:
public RealmAsyncTask changePasswordAsync(final String newPassword, final Callback callback) { checkLooperThread("Asynchronous changing password is only possible from looper threads."); if (callback == null) { throw new IllegalArgumentException("Non-null 'callback' required."); } return new Request(SyncManager.NETWORK_POOL_EXECUTOR, callback) { @Override public SyncUser run() { changePassword(newPassword); return SyncUser.this; } }.start(); }
Source:
<code>private CompositeByteBuf(ByteBufAllocator alloc, boolean direct, int maxNumComponents, int initSize) { super(AbstractByteBufAllocator.DEFAULT_MAX_CAPACITY); if (maxNumComponents < 1) { throw new IllegalArgumentException( "maxNumComponents: " + maxNumComponents + " (expected: >= 1)"); } <START> this.alloc = ObjectUtil.checkNotNull(alloc, "alloc"); <END> this.direct = direct; this.maxNumComponents = maxNumComponents; components = newCompArray(initSize, maxNumComponents); }</code><technical_language>@carryxyh lets move this check (and assignment) maxNumComponents check (just before)</technical_language>

Target:
private CompositeByteBuf(ByteBufAllocator alloc, boolean direct, int maxNumComponents, int initSize) { super(AbstractByteBufAllocator.DEFAULT_MAX_CAPACITY); this.alloc = ObjectUtil.checkNotNull(alloc, "alloc"); if (maxNumComponents < 1) { throw new IllegalArgumentException( "maxNumComponents: " + maxNumComponents + " (expected: >= 1)"); } this.direct = direct; this.maxNumComponents = maxNumComponents; components = newCompArray(initSize, maxNumComponents); }
Source:
<code>public Observable<Group> getGroup(final int groupId) { return Observable.defer(new Func0<Observable<Group>>() { @Override public Observable<Group> call() { Group group = SQLite.select() .from(Group.class) .where(Group_Table.id.eq(groupId)) .querySingle(); if (group != null) { group.setActivationDate(Arrays.asList(group.getGroupDate().getDay(), group.getGroupDate().getMonth(), group.getGroupDate().getYear())); } <START> return null; <END> } }); }</code><technical_language>returning null</technical_language>

Target:
public Observable<Group> getGroup(final int groupId) { return Observable.defer(new Func0<Observable<Group>>() { @Override public Observable<Group> call() { Group group = SQLite.select() .from(Group.class) .where(Group_Table.id.eq(groupId)) .querySingle(); if (group != null) { group.setActivationDate(Arrays.asList(group.getGroupDate().getDay(), group.getGroupDate().getMonth(), group.getGroupDate().getYear())); } return Observable.just(group); } }); }
Source:
<code>public int compareTo(ConceptSet cs) { int value = OpenmrsUtil.compareWithNullAsLowest(concept.isRetired(), cs.concept.isRetired()); if (value == 0) { <START> if ((getSortWeight() == null) && (cs.getSortWeight() != null)) { <END> return -1; } if ((getSortWeight() != null) && (cs.getSortWeight() == null)) { return 1; } if ((getSortWeight() == null) && (cs.getSortWeight() == null)) { return 0; } return (getSortWeight() < cs.getSortWeight()) ? -1 : (getSortWeight() > cs.getSortWeight()) ? 1 : 0; } return value; }</code><technical_language>code in this if clause replaced just: OpenmrsUtil.compareWithNullAsLowest(concept.getSortedWeight(), cs.getSortedWeight())</technical_language>

Target:
public int compareTo(ConceptSet cs) { int value = OpenmrsUtil.compareWithNullAsLowest(concept.isRetired(), cs.concept.isRetired()); if (value == 0) { value = OpenmrsUtil.compareWithNullAsLowest(this.getSortWeight(), cs.getSortWeight()); } return value; }
Source:
<code>protected MavenModuleSet getProject() { MavenModuleSet project = createJob(); <START> copyFilesToWorkspace(project, "checkstyle-qualitygate.xml"); <END> copyToWorkspace(project, "pom.xml"); return project; }</code><technical_language>s. Baseclass Kommentar</technical_language>

Target:
protected MavenModuleSet getProject() { MavenModuleSet project = createJob(); copyToWorkspace(project, "pom.xml"); return project; }
Source:
<code>public LoggerHandler() { update(null, null); <START> ExtensionsManager.getInstance().addObserver(this); <END> }</code><technical_language>switch order avoid race</technical_language>

Target:
public LoggerHandler() { ExtensionsManager.getInstance().addObserver(this); update(null, null); }
Source:
<code>public void execute_assertions_in_comments() throws IOException { <START> assertTrue(String.format( <END> "Last line in coverage data (%d) should be less or equal to number of lines in source file (%d)", source.getCoverage().getLastLine(), source.getLines().size()), source.getCoverage().getLastLine() <= source.getLines().size()); for (Line line : source.getLines()) { String exec = line.getComment(); if (exec != null) { StatementParser.parse(exec, new StatementExecutor(this, line), line.toString()); } } }</code><technical_language>Please move separate test case</technical_language>

Target:
public void execute_assertions_in_comments() throws IOException { for (Line line : source.getLines()) { String exec = line.getComment(); if (exec != null) { StatementParser.parse(exec, new StatementExecutor(this, line), line.toString()); } } }
Source:
<code>public Expression visitApp(AppExpression expr, NormalizationMode mode) { List<Expression> args = new ArrayList<>(); Expression function = expr; for (; expr != null; expr = function.cast(AppExpression.class)) { args.add(expr.getArgument()); function = expr.getFunction().accept(this, NormalizationMode.WHNF); } Collections.reverse(args); <START> LamExpression lam = function instanceof LamExpression ? (LamExpression) function : null; <END> if (lam != null) { return normalizeLam(lam, args).accept(this, mode); } if (mode == NormalizationMode.NF) { function = function.accept(this, mode); } for (Expression arg : args) { function = AppExpression.make(function, mode == NormalizationMode.WHNF ? arg : arg.accept(this, mode)); } return function; }</code><technical_language>do that? incorrect</technical_language>

Target:
public Expression visitApp(AppExpression expr, NormalizationMode mode) { List<Expression> args = new ArrayList<>(); Expression function = expr; for (; expr != null; expr = function.cast(AppExpression.class)) { args.add(expr.getArgument()); function = expr.getFunction().accept(this, NormalizationMode.WHNF); } Collections.reverse(args); LamExpression lam = function.cast(LamExpression.class); if (lam != null) { return normalizeLam(lam, args).accept(this, mode); } if (mode == NormalizationMode.NF) { function = function.accept(this, mode); } for (Expression arg : args) { function = AppExpression.make(function, mode == NormalizationMode.WHNF ? arg : arg.accept(this, mode)); } return function; }
Source:
<code>ResponseEntity<?> editTournament(@RequestBody Tournament tournament) { final Tournament finalTournament = tournament; tournamentService.getTournaments() .stream() .filter(dbTournament -> dbTournament.getId().equals(finalTournament.getId())) .findFirst() .orElseThrow(TournamentNotFoundException::new); <START> tournament = tournamentService.addTournament(tournament); <END> return createResponseEntity(HttpStatus.CREATED, "Tournament updated.", tournament); }</code><technical_language>Please move logic tournamentService a method replaceTournament(id, tournament)</technical_language>

Target:
ResponseEntity<?> editTournament(@RequestBody Tournament tournament) { tournament = tournamentService.replaceTournament(tournament); return createResponseEntity(HttpStatus.CREATED, "Tournament updated.", tournament); }
Source:
<code>private UsmUser getUsmUser(Profile profile) { OID authenticationProtocol = null; OctetString authenticationPassphrase = null; OID privacyProtocol = null; OctetString privacyPassphrase = null; switch(profile.securityLevel) { case SecurityLevel.AUTH_NOPRIV: <START> authenticationProtocol = AuthMD5.ID; <END> authenticationPassphrase = profile.authPassphrase; break; case SecurityLevel.AUTH_PRIV: authenticationProtocol = AuthMD5.ID; authenticationPassphrase = profile.authPassphrase; privacyProtocol = PrivAES128.ID; privacyPassphrase = profile.privacyPassphrase; break; } return new UsmUser(profile.username, authenticationProtocol, authenticationPassphrase, privacyProtocol, privacyPassphrase); }</code><technical_language>Is this in some standard? If not, allow user auth protocol</technical_language>

Target:
private UsmUser getUsmUser(Profile profile) { OID authenticationProtocol = null; OctetString authenticationPassphrase = null; OID privacyProtocol = null; OctetString privacyPassphrase = null; switch(profile.securityLevel) { case SecurityLevel.AUTH_NOPRIV: authenticationProtocol = profile.authProtocol; authenticationPassphrase = profile.authPassphrase; break; case SecurityLevel.AUTH_PRIV: authenticationProtocol = profile.authProtocol; authenticationPassphrase = profile.authPassphrase; privacyProtocol = profile.privProtocol; privacyPassphrase = profile.privacyPassphrase; break; } return new UsmUser(profile.username, authenticationProtocol, authenticationPassphrase, privacyProtocol, privacyPassphrase); }
Source:
<code>public List<HostAddress> getPreferredNodes(List<HostAddress> sortedCandidates) { <START> if (address.isPresent()) { <END> return ImmutableList.of(address.get()); } return ImmutableList.of(); }</code><technical_language>return address.map(ImmutableList::of).orElse(ImmutableList.of());</technical_language>

Target:
public List<HostAddress> getPreferredNodes(List<HostAddress> sortedCandidates) { return address.map(ImmutableList::of).orElse(ImmutableList.of()); }
Source:
<code>private void handleFunctionExit(ITmfStateSystemBuilder ss, ITmfEvent event) { Object functionExitState = functionExit(event); if (functionExitState != null) { long timestamp = event.getTimestamp().toNanos(); String processName = getProcessName(event); if (processName == null) { int processId = getProcessId(event); processName = (processId == UNKNOWN_PID) ? UNKNOWN : Integer.toString(processId); } String threadName = getThreadName(event); if (threadName == null) { threadName = Long.toString(getThreadId(event)); } int quark = ss.getQuarkAbsoluteAndAdd(PROCESSES, processName, threadName, InstrumentedCallStackAnalysis.CALL_STACK); <START> Object poppedValue = ss.popAttributeObject(timestamp, quark); <END> if (!functionExitState.equals(poppedValue)) { if (!fHasErrors ) { Activator.getInstance().logWarning(NLS.bind(Messages.CallStackStateProvider_EventDescription, event.getName(), event.getTimestamp().getValue()) + ": " + NLS.bind( Messages.CallStackStateProvider_UnmatchedPoppedValue, functionExitState, poppedValue)); fHasErrors = true; } } } }</code><technical_language>I right</technical_language>

Target:
private void handleFunctionExit(ITmfStateSystemBuilder ss, ITmfEvent event) { Object functionExitState = functionExit(event); if (functionExitState != null) { long timestamp = event.getTimestamp().toNanos(); String processName = getProcessName(event); if (processName == null) { int processId = getProcessId(event); processName = (processId == UNKNOWN_PID) ? UNKNOWN : Integer.toString(processId); } String threadName = getThreadName(event); if (threadName == null) { threadName = Long.toString(getThreadId(event)); } int quark = ss.getQuarkAbsoluteAndAdd(PROCESSES, processName, threadName, InstrumentedCallStackAnalysis.CALL_STACK); Object poppedValue = ss.popAttributeObject(timestamp, quark); if (!fHasErrors && !functionExitState.equals(poppedValue)) { Activator.getInstance().logWarning(NLS.bind(Messages.CallStackStateProvider_EventDescription, event.getName(), event.getTimestamp().getValue()) + ": " + NLS.bind( Messages.CallStackStateProvider_UnmatchedPoppedValue, functionExitState, poppedValue)); fHasErrors = true; } } }
Source:
<code>private void handleErrorStatus(ProjectNegotiation.Status status, String errorMessage, JID peer) { switch (status) { case ERROR: log.error("ERROR running project negotiation: " + errorMessage); break; case REMOTE_ERROR: log.error( "REMOTE_ERROR running project negotiation: " + errorMessage + " at remote: " + peer.toString()); break; case CANCEL: log.info("Project negotiation was cancelled locally"); break; case REMOTE_CANCEL: <START> log.info("Project negotiation was cancelled by remote: " + peer.toString()); <END> break; } }</code><technical_language>a suggestion (as this noted Codacy): add a default case, throw exception if is unhandled case (which notice error type added this logic updated) add a catch-all logging statement (could serve purpose)</technical_language>

Target:
private void handleErrorStatus(ProjectNegotiation.Status status, String errorMessage, JID peer) { switch (status) { case ERROR: log.error("ERROR running project negotiation: " + errorMessage); break; case REMOTE_ERROR: log.error( "REMOTE_ERROR running project negotiation: " + errorMessage + " at remote: " + peer.toString()); break; case CANCEL: log.info("Project negotiation was cancelled locally"); break; case REMOTE_CANCEL: log.info("Project negotiation was cancelled by remote: " + peer.toString()); break; default: throw new UnsupportedOperationException( "Unknown ProjectNegotation.Status (" + status + "): " + errorMessage); } }
Source:
<code>public Result<BpmnNode> convert(org.eclipse.bpmn2.Gateway gateway) { return Match.of(org.eclipse.bpmn2.Gateway.class, Result.class) .when(org.eclipse.bpmn2.ParallelGateway.class, this::parallelGateway) .when(org.eclipse.bpmn2.ExclusiveGateway.class, this::exclusiveGateway) .when(org.eclipse.bpmn2.InclusiveGateway.class, this::inclusiveGateway) .ignore(EventBasedGateway.class) .defaultValue(Result.ignored("Gateway not found")) <START> .inputDecorator(BPMNElementDecorators.flowElementDecorator()) <END> .outputDecorator(BPMNElementDecorators.resultBpmnDecorator()) .mode(getMode()) .apply(gateway) .value() .get(); }</code><technical_language>MarshallingMessage + messageKey sense here</technical_language>

Target:
public Result<BpmnNode> convert(org.eclipse.bpmn2.Gateway gateway) { return Match.of(org.eclipse.bpmn2.Gateway.class, Result.class) .when(org.eclipse.bpmn2.ParallelGateway.class, this::parallelGateway) .when(org.eclipse.bpmn2.ExclusiveGateway.class, this::exclusiveGateway) .when(org.eclipse.bpmn2.InclusiveGateway.class, this::inclusiveGateway) .when(org.eclipse.bpmn2.EventBasedGateway.class, this::eventGateway) .defaultValue(Result.ignored("Gateway not found")) .inputDecorator(BPMNElementDecorators.flowElementDecorator()) .outputDecorator(BPMNElementDecorators.resultBpmnDecorator()) .mode(getMode()) .apply(gateway) .value(); }
Source:
<code>private void onFragmentLoaded(List<FeedItem> episodes) { listAdapter.notifyDataSetChanged(); if (episodes.size() == 0) { createRecycleAdapter(recyclerView, emptyView); } <START> if(feedItemFilter.getValues().length > 0) { <END> txtvInformation.setText("{fa-info-circle} " + this.getString(R.string.filtered_label)); Iconify.addIcons(txtvInformation); txtvInformation.setVisibility(View.VISIBLE); } else { txtvInformation.setVisibility(View.GONE); } restoreScrollPosition(); requireActivity().invalidateOptionsMenu(); }</code><technical_language>Please add a space if (. for other lines in this PR. I AntennaPod a consistent code style I want new code is consistent. (changing code style for project git history git blame ugly)</technical_language>

Target:
protected void onFragmentLoaded(List<FeedItem> episodes) { listAdapter.notifyDataSetChanged(); if (episodes.size() == 0) { createRecycleAdapter(recyclerView, emptyView); } if (feedItemFilter.getValues().length > 0) { txtvInformation.setText("{fa-info-circle} " + this.getString(R.string.filtered_label)); Iconify.addIcons(txtvInformation); txtvInformation.setVisibility(View.VISIBLE); } else { txtvInformation.setVisibility(View.GONE); } restoreScrollPosition(); requireActivity().invalidateOptionsMenu(); }
Source:
<code>protected void handleMessage(Message<?> message) { if (this.shouldTrack) { message = MessageHistory.write(message, this, this.getMessageBuilderFactory()); } try { this.messagingTemplate.send(getOutputChannel(), message); <START> if (this.source instanceof DeferredAcknowlegmentMessageSource) { <END> AcknowledgmentCallback callback = message.getHeaders() .get(IntegrationMessageHeaderAccessor.ACKNOWLEDGMENT_CALLBACK, AcknowledgmentCallback.class); if (callback != null && !callback.isAcknowledged()) { callback.acknlowledge(Status.ACCEPT); } } } catch (Exception e) { if (this.source instanceof DeferredAcknowlegmentMessageSource) { AcknowledgmentCallback callback = message.getHeaders() .get(IntegrationMessageHeaderAccessor.ACKNOWLEDGMENT_CALLBACK, AcknowledgmentCallback.class); if (callback != null && !callback.isAcknowledged()) { callback.acknlowledge(Status.REJECT); } } if (e instanceof MessagingException) { throw (MessagingException) e; } else { throw new MessagingException(message, "Failed to send Message", e); } } }</code><technical_language>do need this new abstraction enough get IntegrationMessageHeaderAccessor.ACKNOWLEDGMENT_CALLBACK header message perform logic if null</technical_language>

Target:
protected void handleMessage(Message<?> message) { if (this.shouldTrack) { message = MessageHistory.write(message, this, getMessageBuilderFactory()); } AcknowledgmentCallback ackCallback = StaticMessageHeaderAccessor.getAcknowledgmentCallback(message); try { this.messagingTemplate.send(getOutputChannel(), message); AckUtils.autoAck(ackCallback); } catch (Exception e) { AckUtils.autoNack(ackCallback); if (e instanceof MessagingException) { throw (MessagingException) e; } else { throw new MessagingException(message, "Failed to send Message", e); } } }
Source:
<code>protected long getPositionsSizeInBytes() <START> { <END> int positionsSizenBytes = Integer.BYTES * positionCount; if (mappedPositions != null) { positionsSizenBytes *= 2; } return positionsSizenBytes; }</code><technical_language>this remainingNullsCount? remainingNullsCount < 0, it</technical_language>

Target:
protected long getPositionsSizeInBytes() { if (mappedPositions != null) { return 2 * SIZE_OF_INT * positionCount; } return SIZE_OF_INT * positionCount; }
Source:
<code>static Optional<OrcDecompressor> createOrcDecompressor(OrcDataSourceId orcDataSourceId, CompressionKind compression, int bufferSize, boolean zstdJniDecompressionEnabled) throws OrcCorruptionException { if ((compression != NONE) && ((bufferSize <= 0) || (bufferSize > MAX_BUFFER_SIZE))) { throw new OrcCorruptionException(orcDataSourceId, "Invalid compression block size: " + bufferSize); } switch (compression) { case NONE: return Optional.empty(); case ZLIB: return Optional.of(new OrcZlibDecompressor(orcDataSourceId, bufferSize)); case SNAPPY: return Optional.of(new OrcSnappyDecompressor(orcDataSourceId, bufferSize)); case LZ4: return Optional.of(new OrcLz4Decompressor(orcDataSourceId, bufferSize)); case ZSTD: if (zstdJniDecompressionEnabled) { return Optional.of(new ZstdJniDecompressor(orcDataSourceId, bufferSize)); } <START> else { <END> return Optional.of(new OrcZstdDecompressor(orcDataSourceId, bufferSize)); } default: throw new OrcCorruptionException(orcDataSourceId, "Unknown compression type: " + compression); } }</code><technical_language>else { is redundant</technical_language>

Target:
static Optional<OrcDecompressor> createOrcDecompressor(OrcDataSourceId orcDataSourceId, CompressionKind compression, int bufferSize, boolean zstdJniDecompressionEnabled) throws OrcCorruptionException { if ((compression != NONE) && ((bufferSize <= 0) || (bufferSize > MAX_BUFFER_SIZE))) { throw new OrcCorruptionException(orcDataSourceId, "Invalid compression block size: " + bufferSize); } switch (compression) { case NONE: return Optional.empty(); case ZLIB: return Optional.of(new OrcZlibDecompressor(orcDataSourceId, bufferSize)); case SNAPPY: return Optional.of(new OrcSnappyDecompressor(orcDataSourceId, bufferSize)); case LZ4: return Optional.of(new OrcLz4Decompressor(orcDataSourceId, bufferSize)); case ZSTD: return Optional.of(new OrcZstdDecompressor(orcDataSourceId, bufferSize, zstdJniDecompressionEnabled)); default: throw new OrcCorruptionException(orcDataSourceId, "Unknown compression type: " + compression); } }
Source:
<code>public static List<Assignment> parseAssignments(JSONArray jsonArray) { List<Assignment> assignments = new ArrayList<Assignment>(); try { for(int i = 0; i < jsonArray.length(); i++) { JSONObject assignmentJson = jsonArray.getJSONObject(i); Assignment assignment = new Assignment(); assignment.setId(assignmentJson.getString("id")); assignment.setTeamRole(assignmentJson.getString("team_role")); <START> JSONObject location = assignmentJson.getJSONObject("location"); <END> assignment.setLatitude(location.getDouble("latitude")); assignment.setLongitude(location.getDouble("longitude")); assignment.setLocationZoom(assignmentJson.getInt("location_zoom")); Ministry ministry = MinistryJsonParser.parseMinistry(assignmentJson); if(assignmentJson.has("sub_ministries")) { JSONArray subMinistriesJson = assignmentJson.getJSONArray("sub_ministries"); List<Ministry> subMinistries = MinistryJsonParser.parseMinistriesJson(subMinistriesJson); ministry.setSubMinistries(subMinistries); } assignment.setMinistry(ministry); assignments.add(assignment); } } catch(Exception e) { Log.e(TAG, e.getMessage()); } return assignments; }</code><technical_language>This throw exception is location (when a leader). add a commit fix this</technical_language>

Target:
public static List<Assignment> parseAssignments(JSONArray jsonArray) { List<Assignment> assignments = new ArrayList<Assignment>(); try { for(int i = 0; i < jsonArray.length(); i++) { JSONObject assignmentJson = jsonArray.getJSONObject(i); Assignment assignment = new Assignment(); assignment.setId(assignmentJson.getString("id")); assignment.setTeamRole(assignmentJson.getString("team_role")); JSONObject location = assignmentJson.optJSONObject("location"); if(location != null) { assignment.setLatitude(location.getDouble("latitude")); assignment.setLongitude(location.getDouble("longitude")); assignment.setLocationZoom(assignmentJson.optInt("location_zoom")); } Ministry ministry = MinistryJsonParser.parseMinistry(assignmentJson); if(assignmentJson.has("sub_ministries")) { JSONArray subMinistriesJson = assignmentJson.getJSONArray("sub_ministries"); List<Ministry> subMinistries = MinistryJsonParser.parseMinistriesJson(subMinistriesJson); ministry.setSubMinistries(subMinistries); } assignment.setMinistry(ministry); assignments.add(assignment); } } catch(Exception e) { Log.e(TAG, e.getMessage()); } return assignments; }
Source:
<code>public void initialise() { <START> addDesiredStateChange(new SetViewportToSizeOf(new ResourceUrn("engine:sceneOpaquePingPong"), displayResolutionDependentFBOs)); <END> addDesiredStateChange(new EnableMaterial(DEFERRED_LIGHTING_MATERIAL.toString())); FBO sceneOpaqueFbo = displayResolutionDependentFBOs.get(new ResourceUrn("engine:sceneOpaque")); int textureSlot = 0; addDesiredStateChange(new SetInputTexture( textureSlot++, sceneOpaqueFbo.colorBufferTextureId, DEFERRED_LIGHTING_MATERIAL, "texSceneOpaque")); addDesiredStateChange(new SetInputTexture( textureSlot++, sceneOpaqueFbo.depthStencilTextureId, DEFERRED_LIGHTING_MATERIAL, "texSceneOpaqueDepth")); addDesiredStateChange(new SetInputTexture( textureSlot++, sceneOpaqueFbo.normalsBufferTextureId, DEFERRED_LIGHTING_MATERIAL, "texSceneOpaqueNormals")); addDesiredStateChange(new SetInputTexture( textureSlot, sceneOpaqueFbo.lightBufferTextureId, DEFERRED_LIGHTING_MATERIAL, "texSceneOpaqueLightBuffer")); }</code><technical_language>put new ResourceUrn() in a static final variable beginning of class. This is consistent done in other nodes</technical_language>

Target:
public void initialise() { sceneOpaqueFbo = displayResolutionDependentFBOs.get(READONLY_GBUFFER); sceneOpaquePingPongFbo = displayResolutionDependentFBOs.get(WRITEONLY_GBUFFER); refractiveReflectiveFbo = displayResolutionDependentFBOs.get(REFRACTIVE_REFLECTIVE); addDesiredStateChange(new SetViewportToSizeOf(WRITEONLY_GBUFFER, displayResolutionDependentFBOs)); addDesiredStateChange(new EnableMaterial(DEFERRED_LIGHTING_MATERIAL.toString())); int textureSlot = 0; addDesiredStateChange(new SetInputTexture( textureSlot++, sceneOpaqueFbo.colorBufferTextureId, DEFERRED_LIGHTING_MATERIAL, "texSceneOpaque")); addDesiredStateChange(new SetInputTexture( textureSlot++, sceneOpaqueFbo.depthStencilTextureId, DEFERRED_LIGHTING_MATERIAL, "texSceneOpaqueDepth")); addDesiredStateChange(new SetInputTexture( textureSlot++, sceneOpaqueFbo.normalsBufferTextureId, DEFERRED_LIGHTING_MATERIAL, "texSceneOpaqueNormals")); addDesiredStateChange(new SetInputTexture( textureSlot, sceneOpaqueFbo.lightBufferTextureId, DEFERRED_LIGHTING_MATERIAL, "texSceneOpaqueLightBuffer")); }
Source:
<code>public Void execute(K k, Rewriter rewriter, CompiledDefinition compiledDefinition) { KDebug debugger = new KoreKDebug(k, rewriter, checkpointInterval); ConsoleReader reader = getConsoleReader(); while (true) { try { String input = reader.readLine("KDebug> "); Command command = parseCommand(input); if (command instanceof Commands.QuitCommand) { break; } command.runCommand(debugger, compiledDefinition); <START> } catch (ParseException parseException) { <END> System.out.println(parseException.getMessage()); } catch (NumberFormatException numberException) { System.out.println("Error Formatting Number"); } catch (IOException inputException) { System.out.println("Error Interacting with Console"); } } return null; }</code><technical_language>catch a KEMException print it</technical_language>

Target:
public Void execute(K k, Rewriter rewriter, CompiledDefinition compiledDefinition) { KDebug debugger = new KoreKDebug(k, rewriter, checkpointInterval); ConsoleReader reader = getConsoleReader(); while (true) { try { String input = reader.readLine("KDebug> "); Command command = parseCommand(input); if (command instanceof Commands.QuitCommand) { break; } command.runCommand(debugger, compiledDefinition); } catch (KEMException e) { System.out.println(e.getMessage()); } catch (ParseException parseException) { System.out.println(parseException.getMessage()); } catch (NumberFormatException numberException) { System.out.println("Could not parse \"foo\" as number"); } catch (IOException inputException) { KEMException.criticalError("Failed to read input from console"); } } return null; }
Source:
<code>private void fillValues(IMarkerEvent marker) { Map<String, String> toolTips = fTimeGraphProvider.getEventHoverToolTipInfo(marker); String category = marker.getCategory(); String label = marker.getLabel(); addItem(category == null ? Messages.TimeGraphTooltipHandler_DefaultMarkerName : category, label == null ? "" : label); <START> Long timestamp <END> = marker.getTime(); long duration = marker.getDuration(); if (duration == 0) { addItem(MARKER_OFFSET + Messages.TimeGraphTooltipHandler_Timestamp, TmfTimestamp.fromNanos(timestamp).toString()); } else { addItem(MARKER_OFFSET + Messages.TimeGraphTooltipHandler_StartTime, TmfTimestamp.fromNanos(timestamp).toString()); addItem(MARKER_OFFSET + Messages.TimeGraphTooltipHandler_EndTime, TmfTimestamp.fromNanos(timestamp + duration).toString()); } if (toolTips != null) { for (Entry<String, String> tooltip : toolTips.entrySet()) { addItem(MARKER_OFFSET + tooltip.getKey(), tooltip.getValue()); } } }</code><technical_language>long</technical_language>

Target:
private void fillValues(IMarkerEvent marker) { Map<String, String> toolTips = fTimeGraphProvider.getEventHoverToolTipInfo(marker); String category = marker.getCategory(); String label = marker.getLabel(); addItem(category == null ? Messages.TimeGraphTooltipHandler_DefaultMarkerName : category, label == null ? "" : label); long timestamp = marker.getTime(); long duration = marker.getDuration(); if (duration == 0) { addItem(MARKER_OFFSET + Messages.TimeGraphTooltipHandler_Timestamp, TmfTimestamp.fromNanos(timestamp).toString()); } else { addItem(MARKER_OFFSET + Messages.TimeGraphTooltipHandler_StartTime, TmfTimestamp.fromNanos(timestamp).toString()); addItem(MARKER_OFFSET + Messages.TimeGraphTooltipHandler_EndTime, TmfTimestamp.fromNanos(timestamp + duration).toString()); } if (toolTips != null) { for (Entry<String, String> tooltip : toolTips.entrySet()) { addItem(MARKER_OFFSET + tooltip.getKey(), tooltip.getValue()); } } }
Source:
<code>private <START> String otherBranchCommit(Change <END> change, PatchSet patchSet) throws RepositoryNotFoundException, IOException, PatchSetInfoNotAvailableException { Repository git = repoManager.openRepository(change.getProject()); String targetBranch = change.getDest().get(); String commitBranchFlag = "different branch commit"; try { RefDatabase refDb = git.getRefDatabase(); Ref targetRef = refDb.getRef(targetBranch); Collection<Ref> branches = refDb.getRefs(Constants.R_HEADS).values(); RevWalk rw = new RevWalk(git); RevCommit pushedCommit = rw.parseCommit(ObjectId.fromString(patchSet.getRevision().get())); RevCommit target = rw.parseCommit(targetRef.getObjectId()); try { rw.markStart(pushedCommit); for (Ref branch : branches) { if (branch.getObjectId() != targetRef.getObjectId()) { rw.markUninteresting(rw.parseCommit(branch.getObjectId())); } } for (RevCommit n; (n = rw.next()) != null;) { if (n.equals(target)) { commitBranchFlag = "same branch commit"; break; } } } finally { rw.release(); } } finally { git.close(); } return commitBranchFlag; }</code><technical_language>return a boolean</technical_language>

Target:
private boolean otherBranchCommit(Change change, PatchSet patchSet) throws RepositoryNotFoundException, IOException, PatchSetInfoNotAvailableException { Repository git = repoManager.openRepository(change.getProject()); String targetBranch = change.getDest().get(); boolean commitBranchFlag = true; try { RefDatabase refDb = git.getRefDatabase(); Ref targetRef = refDb.getRef(targetBranch); Collection<Ref> branches = refDb.getRefs(Constants.R_HEADS).values(); RevWalk rw = new RevWalk(git); RevCommit pushedCommit = rw.parseCommit(ObjectId.fromString(patchSet.getRevision().get())); RevCommit target = rw.parseCommit(targetRef.getObjectId()); RevCommit mergeBase = null; RevFilter oldRevFilter = rw.getRevFilter(); try { rw.reset(); rw.setRevFilter(RevFilter.MERGE_BASE); rw.markStart(pushedCommit); rw.markStart(target); if (rw.next() != null) { mergeBase = rw.next(); } } finally { rw.reset(); rw.setRevFilter(oldRevFilter); } try { rw.markStart(pushedCommit); for (Ref branch : branches) { if (branch.getObjectId() != targetRef.getObjectId()) { rw.markUninteresting(rw.parseCommit(branch.getObjectId())); } } for (RevCommit n; (n = rw.next()) != null;) { if (n.equals(mergeBase)) { commitBranchFlag = false; break; } } } finally { rw.release(); } } finally { git.close(); } return commitBranchFlag; }
Source:
<code>public boolean isResolved() { <START> return resolveFuture == null || resolveFuture.isDone() || label != null; <END> }</code><technical_language>clear: if doResolve return null, means CodeMining require resolution, isResolved true. implementation erroneous here. This caused resolveFuture == null 2 things: future requested yet, future requested null returned (ie resolution required). I need some more details another state variable in class distinguish cases</technical_language>

Target:
public boolean isResolved() { return (resolveFuture != null && resolveFuture.isDone()); }
Source:
<code>public void updateJitter(long ssrc, StreamDirection direction, double jitter) { if (direction == StreamDirection.DOWNLOAD) { receiveStats.setJitter(jitter); ReceiveTrackStatsImpl receiveStat = receiveSsrcStats.get(ssrc); if (receiveStat != null) { receiveStat.setJitter(jitter); } } else if (direction == StreamDirection.UPLOAD) { sendStats.setJitter(jitter); SendTrackStatsImpl sendStats = sendSsrcStats.get(ssrc); if (sendStats != null) { sendStats.setJitter(jitter); <START> } <END> } }</code><technical_language>consistent naming (e.g. receiveSsrcStat, sendSsrcStat)</technical_language>

Target:
public void updateJitter(long ssrc, StreamDirection direction, double jitter) { if (direction == StreamDirection.DOWNLOAD) { receiveStats.setJitter(jitter); ReceiveTrackStatsImpl receiveSsrcStat = receiveSsrcStats.get(ssrc); if (receiveSsrcStat != null) { receiveSsrcStat.setJitter(jitter); } } else if (direction == StreamDirection.UPLOAD) { sendStats.setJitter(jitter); SendTrackStatsImpl sendSsrcStat = sendSsrcStats.get(ssrc); if (sendSsrcStat != null) { sendSsrcStat.setJitter(jitter); } } }
Source:
<code>public void start() throws Exception { MqttClientOptions options = new MqttClientOptions() .setPort(1883) .setHost("0.0.0.0"); MqttClient mqttClient = MqttClient.create(vertx, options); mqttClient.connect(ch -> { if(ch.succeeded()) { System.out.println("Connected to a server"); mqttClient.publish( MQTT_TOPIC, Buffer.buffer(MQTT_MESSAGE.getBytes()), MqttQoS.AT_MOST_ONCE, false, false, <START> s -> System.out.println("Publish sent to a server")); <END> } else { System.out.println("Failed to connect to a server"); System.out.println(ch.cause()); } }); }</code><technical_language>This example connects publishes clean disconnection showing clean disconnection MQTT clients do (after publishing)</technical_language>

Target:
public void start() throws Exception { MqttClientOptions options = new MqttClientOptions() .setPort(SERVER_PORT) .setHost(SERVER_HOST); MqttClient mqttClient = MqttClient.create(vertx, options); mqttClient.connect(ch -> { if (ch.succeeded()) { System.out.println("Connected to a server"); mqttClient.publish( MQTT_TOPIC, Buffer.buffer(MQTT_MESSAGE), MqttQoS.AT_MOST_ONCE, false, false, s -> mqttClient.disconnect(d -> System.out.println("Disconnected from server"))); } else { System.out.println("Failed to connect to a server"); System.out.println(ch.cause()); } }); }
Source:
<code>public void setNodeIdentifier(String nodeIdentifier) throws CoreEnvironmentBeanException { if (nodeIdentifier == null) { tsLogger.i18NLogger.fatal_nodename_null(); throw new CoreEnvironmentBeanException(tsLogger.i18NLogger.get_fatal_nodename_null()); } try { if (nodeIdentifier.getBytes("UTF-8").length > NODE_NAME_SIZE) { tsLogger.i18NLogger.fatal_nodename_too_long(nodeIdentifier, NODE_NAME_SIZE); throw new CoreEnvironmentBeanException(tsLogger.i18NLogger.get_fatal_nodename_too_long(nodeIdentifier, NODE_NAME_SIZE)); } } catch (UnsupportedEncodingException e) { <START> throw new AssertionError("UTF-8 is not supported"); <END> } this.nodeIdentifier = nodeIdentifier; }</code><technical_language>Lets throw a CoreEnvironmentBeanException</technical_language>

Target:
public void setNodeIdentifier(String nodeIdentifier) throws CoreEnvironmentBeanException { if (nodeIdentifier == null) { tsLogger.i18NLogger.fatal_nodename_null(); throw new CoreEnvironmentBeanException(tsLogger.i18NLogger.get_fatal_nodename_null()); } if (nodeIdentifier.getBytes(StandardCharsets.UTF_8).length > NODE_NAME_SIZE) { tsLogger.i18NLogger.fatal_nodename_too_long(nodeIdentifier, NODE_NAME_SIZE); throw new CoreEnvironmentBeanException(tsLogger.i18NLogger.get_fatal_nodename_too_long(nodeIdentifier, NODE_NAME_SIZE)); } this.nodeIdentifier = nodeIdentifier; }
Source:
<code>public void handleEvent(final ServiceController<?> controller, final LifecycleEvent event) { <START> if (event != LifecycleEvent.UP) return; <END> ServiceName serviceName = controller.getName(); if (!JBOSS_DEPLOYMENT.isParentOf(serviceName)) return; String simpleName = serviceName.getSimpleName(); if (simpleName.equals(Phase.DEPENDENCIES.toString())) { ServiceName parentName = serviceName.getParent(); ServiceController<?> parentController = controller.getServiceContainer().getService(parentName); DeploymentUnit depUnit = (DeploymentUnit) parentController.getValue(); ArquillianConfigBuilder.handleParseAnnotations(depUnit); } else if (simpleName.equals(Phase.INSTALL.toString())) { ServiceName parentName = serviceName.getParent(); ServiceController<?> parentController = controller.getServiceContainer().getService(parentName); DeploymentUnit depUnit = (DeploymentUnit) parentController.getValue(); Set<String> testClasses = ArquillianConfigBuilder.getClasses(depUnit); if (testClasses != null) { String duName = ArquillianConfigBuilder.getName(depUnit); ServiceName arqConfigSN = ServiceName.JBOSS.append("arquillian", "config", duName); ServiceBuilder<?> builder = serviceTarget.addService(arqConfigSN); ArquillianConfig arqConfig = new ArquillianConfig(arqConfigSN, testClasses, builder.requires(ArquillianService.SERVICE_NAME), builder.requires(parentController.getName())); builder.setInstance(arqConfig); builder.install(); log.infof("Arquillian deployment detected: %s", arqConfig); } } }</code><technical_language>LifecycleEvent.STARTING removed</technical_language>

Target:
public void handleEvent(final ServiceController<?> controller, final LifecycleEvent event) { if (event != LifecycleEvent.UP) return; ServiceName serviceName = controller.getName(); if (!JBOSS_DEPLOYMENT.isParentOf(serviceName)) return; String simpleName = serviceName.getSimpleName(); if (simpleName.equals(Phase.DEPENDENCIES.toString())) { ServiceName parentName = serviceName.getParent(); ServiceController<?> parentController = controller.getServiceContainer().getService(parentName); DeploymentUnit depUnit = (DeploymentUnit) parentController.getValue(); ArquillianConfigBuilder.handleParseAnnotations(depUnit); } else if (simpleName.equals(Phase.INSTALL.toString())) { ServiceName parentName = serviceName.getParent(); ServiceController<?> parentController = controller.getServiceContainer().getService(parentName); DeploymentUnit depUnit = (DeploymentUnit) parentController.getValue(); Set<String> testClasses = ArquillianConfigBuilder.getClasses(depUnit); if (testClasses != null) { String duName = ArquillianConfigBuilder.getName(depUnit); ServiceName arqConfigSN = ServiceName.JBOSS.append("arquillian", "config", duName); ServiceBuilder<ArquillianConfig> builder = (ServiceBuilder<ArquillianConfig>) serviceTarget.addService(arqConfigSN); ArquillianConfig arqConfig = new ArquillianConfig(arqConfigSN, testClasses, builder.requires(ArquillianService.SERVICE_NAME), builder.requires(parentController.getName())); arqConfig.addDeps(builder, controller); builder.setInstance(arqConfig); builder.install(); log.infof("Arquillian deployment detected: %s", arqConfig); } } }
Source:
<code>public void apply( E workspaceEnvironment, RuntimeIdentity runtimeID, Collection<PluginFQN> pluginFQNs) throws InfrastructureException { E brokerEnvironment = brokerEnvironmentFactory.create(pluginFQNs, runtimeID); Map<String, PodData> workspacePods = workspaceEnvironment.getPodsData(); if (workspacePods.size() != 1) { throw new InfrastructureException( "Che plugins tooling configuration can be applied to a workspace with one pod only."); } PodData workspacePod = workspacePods.values().iterator().next(); Map<String, PodData> brokerPods = brokerEnvironment.getPodsData(); if (brokerPods.size() != 1) { throw new InfrastructureException("Broker environment must have only one Pod."); } PodData brokerPod = brokerPods.values().iterator().next(); List<Container> brokerContainers = brokerPod.getSpec().getContainers(); for (Container container : brokerContainers) { InternalMachineConfig brokerMachine = brokerEnvironment.getMachines().get(Names.machineName(brokerPod, container)); if (brokerMachine == null) { throw new InfrastructureException( String.format( <START> "Could not find appropriate place for broker container %s", container.getName())); <END> } workspaceEnvironment .getMachines() .put(Names.machineName(workspacePod, container), brokerMachine); } workspaceEnvironment.getConfigMaps().putAll(brokerEnvironment.getConfigMaps()); workspacePod.getSpec().getInitContainers().addAll(brokerPod.getSpec().getContainers()); workspacePod.getSpec().getVolumes().addAll(brokerPod.getSpec().getVolumes()); }</code><technical_language>"Could retrieve specification of plugin broker container %s"</technical_language>

Target:
public void apply( E workspaceEnvironment, RuntimeIdentity runtimeID, Collection<PluginFQN> pluginFQNs) throws InfrastructureException { E brokerEnvironment = brokerEnvironmentFactory.create(pluginFQNs, runtimeID); Map<String, PodData> workspacePods = workspaceEnvironment.getPodsData(); if (workspacePods.size() != 1) { throw new InfrastructureException( "Che plugins tooling configuration can be applied to a workspace with one pod only."); } PodData workspacePod = workspacePods.values().iterator().next(); Map<String, PodData> brokerPods = brokerEnvironment.getPodsData(); if (brokerPods.size() != 1) { throw new InfrastructureException("Broker environment must have only one Pod."); } PodData brokerPod = brokerPods.values().iterator().next(); List<Container> brokerContainers = brokerPod.getSpec().getContainers(); for (Container container : brokerContainers) { InternalMachineConfig brokerMachine = brokerEnvironment.getMachines().get(Names.machineName(brokerPod, container)); if (brokerMachine == null) { throw new InfrastructureException( String.format( "Could not retrieve the specification of the plugin broker container %s", container.getName())); } workspaceEnvironment .getMachines() .put(Names.machineName(workspacePod, container), brokerMachine); } workspaceEnvironment.getConfigMaps().putAll(brokerEnvironment.getConfigMaps()); workspacePod.getSpec().getInitContainers().addAll(brokerPod.getSpec().getContainers()); workspacePod.getSpec().getVolumes().addAll(brokerPod.getSpec().getVolumes()); }
Source:
<code>protected void executeCommand() { DetachStorageDomainVDSCommandParameters detachParams = new DetachStorageDomainVDSCommandParameters(getVds().getStoragePoolId(), getParameters().getStorageDomainId(), <START> Guid.Empty, <END> 0); detachParams.setForce(true); VDSReturnValue returnValue = runVdsCommand(VDSCommandType.DetachStorageDomain, detachParams); if (!returnValue.getSucceeded()) { log.warnFormat("Detaching Storage Domain {0} from it's previous storage pool has failed. " + "The meta data of the Storage Domain might still indicating that it is attached to the previous Storage Pool.", getParameters().getStorageDomainId()); } if (StringUtils.isEmpty(getStorageDomain().getStorage())) { getStorageDomain().setStorage( (String) Backend .getInstance() .runInternalAction( VdcActionType.AddStorageServerConnection, new StorageServerConnectionParametersBase(getStorageDomain().getStorageStaticData() .getConnection(), getVds().getId())).getActionReturnValue()); } addStorageDomainInDb(); updateStorageDomainDynamicFromIrs(); setSucceeded(true); }</code><technical_language>relevant for import storage domain flow for execution of AddExistingStorageDomain</technical_language>

Target:
protected void executeCommand() { if (StringUtils.isEmpty(getStorageDomain().getStorage())) { getStorageDomain().setStorage( (String) Backend .getInstance() .runInternalAction( VdcActionType.AddStorageServerConnection, new StorageServerConnectionParametersBase(getStorageDomain().getStorageStaticData() .getConnection(), getVds().getId())).getActionReturnValue()); } addStorageDomainInDb(); updateStorageDomainDynamicFromIrs(); setSucceeded(true); }
Source:
<code>public void testBoletoExpirationDate() throws Throwable{ transaction = transactionFactory.createBoletoTransaction(); transaction.save(); Assert.assertEquals(transaction.getBoletoExpirationDate().toLocalDate(), DateTime.now().plusDays(4).toLocalDate() ); <START> } <END></code><technical_language>DateTime.now().plusDays(4).toLocalDate() a "magic number" clear from. set a expiration date testBoletoExpirationDate method explicit compare some constant</technical_language>

Target:
public void testBoletoExpirationDate() throws Throwable{ transaction = transactionFactory.createBoletoTransaction(); transaction.setBoletoExpirationDate(DateTime.now().plusDays(4)); transaction.save(); Assert.assertEquals(transaction.getBoletoExpirationDate().toLocalDate(), DateTime.now().plusDays(4).toLocalDate() ); }
Source:
<code>public void canCreateEmptyRange() { <START> assertThatCode(() -> new ColumnRangeSelection(BYTES_1, BYTES_1)).doesNotThrowAnyException(); <END> }</code><technical_language>This invalid column range, notably throw Cassandra; #3658</technical_language>

Target:
public void canCreateEmptyRange() { assertThatThrownBy(() -> new ColumnRangeSelection(BYTES_1, BYTES_1)) .isInstanceOf(IllegalArgumentException.class) .hasMessageContaining("do not form a valid range"); }
Source:
<code>private static void updateTestPointNumbersForAnntations(HashMap<String, Integer> idsToUpdate, JSONArray annotations, JSONObject discrepancies) throws JSONException { for (int j = 0; j < annotations.length(); j++) { JSONObject annotationAsJson = annotations.getJSONObject(j); DispoAnnotationData annotation = DispoUtil.jsonObjToDispoAnnotationData(annotationAsJson); JSONArray idsOfCoveredDiscrepancies = annotation.getIdsOfCoveredDiscrepancies(); <START> int length = idsOfCoveredDiscrepancies.length(); <END> for (int i = 0; i < length; i++) { String coveredId = idsOfCoveredDiscrepancies.getString(i); if (idsToUpdate.containsKey(coveredId)) { String newLocRef = rebuildLocRef(idsOfCoveredDiscrepancies, discrepancies, idsToUpdate); if (!newLocRef.isEmpty()) { annotation.setLocationRefs(newLocRef); } JSONObject updatedAnnotationAsJson = DispoUtil.annotationToJsonObj(annotation); annotations.put(annotation.getIndex(), updatedAnnotationAsJson); break; } } } }</code><technical_language>Nested loops hard follow in method. Suggest breaking this smaller methods</technical_language>

Target:
private static void updateTestPointNumbersForAnntations(HashMap<String, Integer> idsToUpdate, JSONArray annotations, JSONObject discrepancies) throws JSONException { for (int j = 0; j < annotations.length(); j++) { JSONObject annotationAsJson = annotations.getJSONObject(j); DispoAnnotationData annotation = DispoUtil.jsonObjToDispoAnnotationData(annotationAsJson); JSONArray idsOfCoveredDiscrepancies = annotation.getIdsOfCoveredDiscrepancies(); updateIdsCoveredDiscrepancies(idsToUpdate, idsOfCoveredDiscrepancies, annotations, discrepancies, annotation); } }
Source:
<code>public void init(CacheLoaderConfig config, Cache<?, ?> cache, StreamingMarshaller m) throws CacheLoaderException { super.init(config, cache, m); this.dbFactory = newDbFactory(); if (this.dbFactory == null) { <START> throw new CacheLoaderException("Could not load any LevelDB Factories: " + Arrays.toString(DB_FACTORY_CLASS_NAMES)); <END> } String dbFactoryClassName = this.dbFactory.getClass().getName(); if (dbFactoryClassName.equals("org.iq80.leveldb.impl.Iq80DBFactory")) { log.infoUsingJavaDbFactory(dbFactoryClassName); } else { log.infoUsingJNIDbFactory(dbFactoryClassName); } this.config = (LevelDBCacheStoreConfig) config; }</code><technical_language>Please a proper log message throw log.cannotLoadlevelDBFactories(...)</technical_language>

Target:
public void init(CacheLoaderConfig config, Cache<?, ?> cache, StreamingMarshaller m) throws CacheLoaderException { super.init(config, cache, m); this.config = (LevelDBCacheStoreConfig) config; this.dbFactory = newDbFactory(); if (this.dbFactory == null) { throw log.cannotLoadlevelDBFactories(Arrays.toString(DB_FACTORY_CLASS_NAMES)); } String dbFactoryClassName = this.dbFactory.getClass().getName(); if (dbFactoryClassName.equals("org.iq80.leveldb.impl.Iq80DBFactory")) { log.infoUsingJavaDbFactory(dbFactoryClassName); } else { log.infoUsingJNIDbFactory(dbFactoryClassName); } }