auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private boolean identifyAPI(API api, MessageContext synCtx, List defaultStrategyApiSet) { API defaultAPI = null; api.setLogSetterValue(); if ("/".equals(api.getContext())) { defaultAPI = api; } else if (api.getVersionStrategy().getClass().getName().equals(DefaultStrategy.class.getName())) { defaultStrategyApiSet.add(api); } else if (api.getVersionStrategy().getClass().getName().equals(ContextVersionStrategy.class.getName()) || api.getVersionStrategy().getClass().getName().equals(URLBasedVersionStrategy.class.getName())) { api.setLogSetterValue(); if (api.canProcess(synCtx)) { if (log.isDebugEnabled()) { log.debug("Located specific API: " + api.getName() + " for processing message"); } apiProcessNonDefaultStrategy(synCtx, api); return true; } } else if (api.canProcess(synCtx)) { if (log.isDebugEnabled()) { log.debug("Located specific API: " + api.getName() + " for processing message"); } synCtx.setProperty(RESTConstants.PROCESSED_API, api); api.process(synCtx); return true; } return false; }

Target:
private boolean identifyAPI(API api, MessageContext synCtx, List defaultStrategyApiSet) { API defaultAPI = null; api.setLogSetterValue(); if ("/".equals(api.getContext())) { defaultAPI = api; } else if (api.getVersionStrategy().getClass().getName().equals(DefaultStrategy.class.getName())) { defaultStrategyApiSet.add(api); } else if (api.getVersionStrategy().getClass().getName().equals(ContextVersionStrategy.class.getName()) || api.getVersionStrategy().getClass().getName().equals(URLBasedVersionStrategy.class.getName())) { api.setLogSetterValue(); if (api.canProcess(synCtx)) { if (log.isDebugEnabled()) { log.debug("Located specific API: " + api.getName() + " for processing message"); } apiProcessNonDefaultStrategy(synCtx, api); return true; } } else if (api.canProcess(synCtx)) { if (log.isDebugEnabled()) { log.debug("Located specific API: " + api.getName() + " for processing message"); } api.process(synCtx); return true; } return false; }
Source:
public PolyglotScriptEngine(PhoenicisSandbox phoenicisSandbox, String language, Map<String, String> options) { super(); this.phoenicisSandbox = phoenicisSandbox; this.errorHandlers = new ArrayList<>(); this.language = language; this.context = Context.newBuilder(language) .allowExperimentalOptions(true) .allowHostClassLookup(phoenicisSandbox::isSafe) .options(options).allowHostAccess(true).build(); }

Target:
public PolyglotScriptEngine(PhoenicisSandbox phoenicisSandbox, String language, Map<String, String> options) { super(); this.errorHandlers = new ArrayList<>(); this.language = language; this.context = Context.newBuilder(language) .allowExperimentalOptions(true) .allowHostClassLookup(phoenicisSandbox::isSafe) .options(options).allowHostAccess(true).build(); }
Source:
protected void selectedItemsChanged() { super.onSelectedItemChanged(); updateActionAvailability(); }

Target:
protected void selectedItemsChanged() { super.selectedItemsChanged(); updateActionAvailability(); }
Source:
public String toString() { StringBuilder sb = new StringBuilder("interpret_args("); boolean first = true; sb.append("noteId:"); if (this.noteId == null) { sb.append("null"); } else { sb.append(this.noteId); } first = false; if (!first) sb.append(", "); sb.append("className:"); if (this.className == null) { sb.append("null"); } else { sb.append(this.className); } first = false; if (!first) sb.append(", "); sb.append("st:\n"); if (this.st == null) { sb.append("null"); } else { sb.append(this.st); } first = false; if (!first) sb.append(", "); sb.append("interpreterContext:"); if (this.interpreterContext == null) { sb.append("null"); } else { sb.append(this.interpreterContext); } first = false; sb.append(")"); return sb.toString(); }

Target:
public String toString() { StringBuilder sb = new StringBuilder("interpret_args("); boolean first = true; sb.append("noteId:"); if (this.noteId == null) { sb.append("null"); } else { sb.append(this.noteId); } first = false; if (!first) sb.append(", "); sb.append("className:"); if (this.className == null) { sb.append("null"); } else { sb.append(this.className); } first = false; if (!first) sb.append(", "); sb.append("st:"); if (this.st == null) { sb.append("null"); } else { sb.append(this.st); } first = false; if (!first) sb.append(", "); sb.append("interpreterContext:"); if (this.interpreterContext == null) { sb.append("null"); } else { sb.append(this.interpreterContext); } first = false; sb.append(")"); return sb.toString(); }
Source:
public SegmentRef toRef() { return new SegmentRef(checkNotNull(this.getId().toString(), "Can't create reference for segment without ID")); }

Target:
public SegmentRef toRef() { return new SegmentRef(checkNotNull(this.getId(), "Can't create reference for segment without ID")); }
Source:
public List<ResponseInfo> sendAndPoll(List<RequestInfo> allRequestsToSend, Set<Integer> allRequestsToDrop, int pollTimeoutMs) { Function<ReplicaType, Pair<List<RequestInfo>, Set<Integer>>> pairBuilder = replicaType -> new Pair<>(new ArrayList<>(), new HashSet<>()); EnumMap<ReplicaType, Pair<List<RequestInfo>, Set<Integer>>> requestsToSendAndDropByType = new EnumMap<>(ReplicaType.class); for (RequestInfo requestInfo : allRequestsToSend) { ReplicaType replicaType = requestInfo.getReplicaId().getReplicaType(); requestsToSendAndDropByType.computeIfAbsent(replicaType, pairBuilder).getFirst().add(requestInfo); correlationIdToReplicaType.put(requestInfo.getRequest().getCorrelationId(), replicaType); } for (Integer correlationId : allRequestsToDrop) { ReplicaType replicaType = correlationIdToReplicaType.get(correlationId); if (replicaType != null) { requestsToSendAndDropByType.computeIfAbsent(replicaType, pairBuilder).getSecond().add(correlationId); } } List<ResponseInfo> responses = new ArrayList<>(); requestsToSendAndDropByType.forEach((replicaType, requestsToSendAndDrop) -> { NetworkClient client = childNetworkClients.get(replicaType); if (client == null) { throw new IllegalStateException("No NetworkClient configured for replica type: " + replicaType); } responses.addAll( client.sendAndPoll(requestsToSendAndDrop.getFirst(), requestsToSendAndDrop.getSecond(), pollTimeoutMs)); }); responses.forEach( response -> correlationIdToReplicaType.remove(response.getRequestInfo().getRequest().getCorrelationId())); return responses; }

Target:
public List<ResponseInfo> sendAndPoll(List<RequestInfo> allRequestsToSend, Set<Integer> allRequestsToDrop, int pollTimeoutMs) { Function<ReplicaType, Pair<List<RequestInfo>, Set<Integer>>> pairBuilder = replicaType -> { if (!childNetworkClients.containsKey(replicaType)) { throw new IllegalStateException("No NetworkClient configured for replica type: " + replicaType); } return new Pair<>(new ArrayList<>(), new HashSet<>()); }; EnumMap<ReplicaType, Pair<List<RequestInfo>, Set<Integer>>> requestsToSendAndDropByType = new EnumMap<>(ReplicaType.class); for (RequestInfo requestInfo : allRequestsToSend) { ReplicaType replicaType = requestInfo.getReplicaId().getReplicaType(); requestsToSendAndDropByType.computeIfAbsent(replicaType, pairBuilder).getFirst().add(requestInfo); correlationIdToReplicaType.put(requestInfo.getRequest().getCorrelationId(), replicaType); } for (Integer correlationId : allRequestsToDrop) { ReplicaType replicaType = correlationIdToReplicaType.get(correlationId); if (replicaType != null) { requestsToSendAndDropByType.computeIfAbsent(replicaType, pairBuilder).getSecond().add(correlationId); } } List<ResponseInfo> responses = new ArrayList<>(); requestsToSendAndDropByType.forEach((replicaType, requestsToSendAndDrop) -> { NetworkClient client = childNetworkClients.get(replicaType); responses.addAll( client.sendAndPoll(requestsToSendAndDrop.getFirst(), requestsToSendAndDrop.getSecond(), pollTimeoutMs)); }); responses.forEach( response -> correlationIdToReplicaType.remove(response.getRequestInfo().getRequest().getCorrelationId())); return responses; }
Source:
private static Talk example(final Repo repo, final Issue issue) throws IOException { final Talk result = new Talk.InFile(); result.modify( new Directives().xpath("/talk").add("wire") .add("href").set("http://test").up() .add("github-repo").set(repo.coordinates().toString()).up() .add("github-issue").set(Integer.toString(issue.number())).up() .up() .add("request").attr("id", "1") .add("msec").set("1234567").up() .add("success").set("true").up() .add("type").set("something").up() .add("args") ); return result; }

Target:
private static Talk example(final Repo repo, final Issue issue) throws IOException { final Talk result = new Talk.InFile(); result.modify( new Directives().xpath("/talk").add("wire") .add("href").set("http://test").up() .add("github-repo").set(repo.coordinates().toString()).up() .add("github-issue").set(Integer.toString(issue.number())).up() .up() .add("request").attr("id", "1") .add("msec").set(DURATION).up() .add("success").set("true").up() .add("type").set("something").up() .add("args") ); return result; }
Source:
public Response suggest(String vocabularyId, String input, @DefaultValue("10") int maxResults, String sort, String customFilter) { if (StringUtils.isEmpty(input) || StringUtils.isEmpty(vocabularyId)) { throw new WebApplicationException(Response.Status.BAD_REQUEST); } Vocabulary vocabulary = this.vm.getVocabulary(vocabularyId); if (vocabulary == null) { throw new WebApplicationException(Response.Status.NOT_FOUND); } List<VocabularyTerm> termSuggestions = vocabulary.search(input, maxResults, sort, customFilter); JSONObject rep = new JSONObject(); JSONArray trms = new JSONArray(); for (VocabularyTerm term : termSuggestions) { JSONObject trm = term.toJSON(); trm.put("links", this.autolinker.get().forSecondaryResource(VocabularyTermResource.class, this.uriInfo)); trms.put(trm); } rep.put("rows", trms); rep.put("links", this.autolinker.get().forResource(getClass(), this.uriInfo).build()); return Response.ok(rep, MediaType.APPLICATION_JSON_TYPE).build(); }

Target:
public Response suggest(String vocabularyId, String input, @DefaultValue("10") int maxResults, String sort, String customFilter) { if (StringUtils.isEmpty(input) || StringUtils.isEmpty(vocabularyId)) { throw new WebApplicationException(Response.Status.BAD_REQUEST); } Vocabulary vocabulary = this.vm.getVocabulary(vocabularyId); if (vocabulary == null) { throw new WebApplicationException(Response.Status.NOT_FOUND); } List<VocabularyTerm> termSuggestions = vocabulary.search(input, maxResults, sort, customFilter); JSONObject rep = new JSONObject(); JSONArray trms = new JSONArray(); for (VocabularyTerm term : termSuggestions) { JSONObject trm = term.toJSON(); trm.put("links", this.autolinker.get().forSecondaryResource(VocabularyTermResource.class, this.uriInfo).build()); trms.put(trm); } rep.put("rows", trms); rep.put("links", this.autolinker.get().forResource(getClass(), this.uriInfo).build()); return Response.ok(rep, MediaType.APPLICATION_JSON_TYPE).build(); }
Source:
public static BooleanExpression isFilePresentForSelectedEntry(StateManager stateManager, PreferencesService preferencesService) { List<LinkedFile> files = stateManager.getSelectedEntries().get(0).getFiles(); return Bindings.createBooleanBinding(() -> { if ((files.size() > 0) && stateManager.getActiveDatabase().isPresent()) { return FileHelper.expandFilename( stateManager.getActiveDatabase().get(), files.get(0).getLink(), preferencesService.getFilePreferences()).isPresent(); } else { return false; } }, stateManager.getSelectedEntries().get(0).getFieldBinding(StandardField.FILE)); }

Target:
public static BooleanExpression isFilePresentForSelectedEntry(StateManager stateManager, PreferencesService preferencesService) { return Bindings.createBooleanBinding(() -> { List<LinkedFile> files = stateManager.getSelectedEntries().get(0).getFiles(); if ((files.size() > 0) && stateManager.getActiveDatabase().isPresent()) { Optional<Path> filename = FileHelper.expandFilename( stateManager.getActiveDatabase().get(), files.get(0).getLink(), preferencesService.getFilePreferences()); return filename.isPresent(); } else { return false; } }, stateManager.getSelectedEntries(), stateManager.getSelectedEntries().get(0).getFieldBinding(StandardField.FILE)); }
Source:
public void process(WatchedEvent event) { ReplyHeader h = new ReplyHeader(-1, -1L, 0); if (LOG.isTraceEnabled()) { ZooTrace.logTraceMessage(LOG, ZooTrace.EVENT_DELIVERY_TRACE_MASK, "Deliver event " + event + " to 0x" + Long.toHexString(this.sessionId) + " through " + this); } WatcherEvent e = event.getWrapper(); try { sendResponse(h, e, "notification"); } catch (IOException ex) { LOG.debug("Problem sending to " + getRemoteSocketAddress(), ex); close(); } }

Target:
public void process(WatchedEvent event) { ReplyHeader h = new ReplyHeader(-1, -1L, 0); if (LOG.isTraceEnabled()) { ZooTrace.logTraceMessage(LOG, ZooTrace.EVENT_DELIVERY_TRACE_MASK, "Deliver event " + event + " to 0x" + Long.toHexString(this.sessionId) + " through " + this); } WatcherEvent e = event.getWrapper(); try { sendResponse(h, e, "notification"); } catch (IOException ex) { LOG.debug("Problem sending to " + getRemoteSocketAddress(), ex); } }
Source:
public static Economy getEconomy() { return econ; }

Target:
public Economy getEconomy() { return econ; }
Source:
public static String getReplPolicyIdString(Database db) { if (db != null) { Map<String, String> m = db.getParameters(); if ((m != null) && (m.containsKey(SOURCE_OF_REPLICATION))) { String replPolicyId = m.get(SOURCE_OF_REPLICATION); LOG.debug("repl policy for database is {}", db.getName(), replPolicyId); return replPolicyId; } LOG.info("Repl policy is not set for database ", db.getName()); } return null; }

Target:
public static String getReplPolicyIdString(Database db) { if (db != null) { Map<String, String> m = db.getParameters(); if ((m != null) && (m.containsKey(SOURCE_OF_REPLICATION))) { String replPolicyId = m.get(SOURCE_OF_REPLICATION); LOG.debug("repl policy for database is {}", db.getName(), replPolicyId); return replPolicyId; } LOG.debug("Repl policy is not set for database ", db.getName()); } return null; }
Source:
void onGetBlobError(Exception e, GetBlobOptions options) { GetOperationType type = options != null && options.getGetOperationType() != null ? options.getGetOperationType() : GetOperationType.All; switch (type) { case All: case Data: onGetBlobDataError(e, options); break; case BlobInfo: onGetBlobInfoError(e); break; } }

Target:
void onGetBlobError(Exception e, GetBlobOptions options) { if (options.getOperationType() == GetBlobOptions.OperationType.BlobInfo) { onGetBlobInfoError(e); } else { onGetBlobDataError(e, options); } }
Source:
public void findActions() throws DotDataException, DotSecurityException { List<WorkflowStep> steps = workflowAPI.findSteps(workflowScheme3); assertNotNull(steps); assertEquals(2, steps.size()); List<WorkflowAction> actions = workflowAPI.findActions(steps, user); assertNotNull(actions); assertEquals(3, actions.size()); User contributorUser = roleAPI.findUsersForRole(contributor).get(0); assertTrue(null != contributorUser && UtilMethods.isSet(contributorUser.getUserId())); actions = workflowAPI.findActions(steps, contributorUser); assertTrue(null != actions && actions.size() == 1); User reviewerUser = roleAPI.findUsersForRole(reviewer).get(0); assertTrue(null != contributorUser && UtilMethods.isSet(contributorUser.getUserId())); actions = workflowAPI.findActions(steps, reviewerUser); assertTrue(null != actions && actions.size() == 2); actions = workflowAPI.findActions(workflowScheme1Step2, reviewer); assertTrue(null != actions && actions.size() == 1); actions = workflowAPI.findActions(workflowScheme3Step2, contributor); assertTrue(null != actions && actions.size() == 1); }

Target:
public void findActions() throws DotDataException, DotSecurityException { List<WorkflowStep> steps = workflowAPI.findSteps(workflowScheme3); assertNotNull(steps); assertEquals(2, steps.size()); List<WorkflowAction> actions = workflowAPI.findActions(steps, user); assertNotNull(actions); assertEquals(3, actions.size()); User contributorUser = roleAPI.findUsersForRole(contributor).get(0); assertTrue(null != contributorUser && UtilMethods.isSet(contributorUser.getUserId())); actions = workflowAPI.findActions(steps, contributorUser); assertTrue(null != actions && actions.size() == 1); User reviewerUser = roleAPI.findUsersForRole(reviewer).get(0); assertTrue(null != contributorUser && UtilMethods.isSet(contributorUser.getUserId())); actions = workflowAPI.findActions(steps, reviewerUser); assertTrue(null != actions && actions.size() == 2); actions = workflowAPI.findActions(workflowScheme1Step2, reviewer); assertNotNull(actions); assertTrue(actions.size() == 1); actions = workflowAPI.findActions(workflowScheme3Step2, contributor); assertNotNull(actions); assertTrue(actions.size() == 1); }
Source:
public void storeWorkerMetrics(final String workerId, final WorkerMetrics metrics) { if (metricCollectionEnabled) { final int numDataBlocksOnWorker = metrics.getNumDataBlocks(); if (numBlockByEvalIdForWorker != null && numBlockByEvalIdForWorker.containsKey(workerId)) { final int numDataBlocksOnDriver = numBlockByEvalIdForWorker.get(workerId); if (numDataBlocksOnWorker == numDataBlocksOnDriver) { final DataInfo dataInfo = new DataInfoImpl(numDataBlocksOnWorker); final EvaluatorParameters evaluatorParameters = new WorkerEvaluatorParameters(workerId, dataInfo, metrics); synchronized (workerEvalParams) { if (!workerEvalParams.containsKey(workerId)) { workerEvalParams.put(workerId, new ArrayList<>()); } workerEvalParams.get(workerId).add(evaluatorParameters); } } else { LOG.log(Level.FINE, "{0} contains {1} blocks, driver says {2} blocks. Dropping metric.", new Object[]{workerId, numDataBlocksOnWorker, numDataBlocksOnDriver}); } } else { LOG.log(Level.FINE, "No information about {0}. Dropping metric.", workerId); } } else { LOG.log(Level.FINE, "Metric collection disabled. Dropping metric from {0}", workerId); } if (this.dashboardEnabled) { try { metricsRequestQueue.put(String.format("id=%s&metrics=%s&time=%d", workerId, metrics, System.currentTimeMillis())); } catch (InterruptedException e) { LOG.log(Level.WARNING, "Dashboard: Interrupted while taking metrics to send from the queue - ", e); } } }

Target:
public void storeWorkerMetrics(final String workerId, final WorkerMetrics metrics) { if (metricCollectionEnabled) { final int numDataBlocksOnWorker = metrics.getNumDataBlocks(); if (numBlockByEvalIdForWorker != null && numBlockByEvalIdForWorker.containsKey(workerId)) { final int numDataBlocksOnDriver = numBlockByEvalIdForWorker.get(workerId); if (numDataBlocksOnWorker == numDataBlocksOnDriver) { final DataInfo dataInfo = new DataInfoImpl(numDataBlocksOnWorker); final EvaluatorParameters evaluatorParameters = new WorkerEvaluatorParameters(workerId, dataInfo, metrics); synchronized (workerEvalParams) { if (!workerEvalParams.containsKey(workerId)) { workerEvalParams.put(workerId, new ArrayList<>()); } workerEvalParams.get(workerId).add(evaluatorParameters); } } else { LOG.log(Level.FINE, "{0} contains {1} blocks, driver says {2} blocks. Dropping metric.", new Object[]{workerId, numDataBlocksOnWorker, numDataBlocksOnDriver}); } } else { LOG.log(Level.FINE, "No information about {0}. Dropping metric.", workerId); } } else { LOG.log(Level.FINE, "Metric collection disabled. Dropping metric from {0}", workerId); } if (dashboardSetupStatus.dashboardEnabled) { try { metricsRequestQueue.put(String.format("id=%s&metrics=%s&time=%d", workerId, metrics, System.currentTimeMillis())); } catch (InterruptedException e) { LOG.log(Level.WARNING, "Dashboard: Interrupted while taking metrics to send from the queue.", e); } } }
Source:
InsertSourceFromCells(TransactionContext txnCtx, Functions functions, DocTableInfo table, String indexName, GeneratedColumns.Validation validation, List<Reference> targets) { this.targets = new ArrayList<>(targets); this.defaultValues = addDefaults( this.targets, table, new EvaluatingNormalizer( functions, RowGranularity.CLUSTER, null, null), txnCtx); ReferencesFromInputRow referenceResolver = new ReferencesFromInputRow(this.targets, table.partitionedByColumns(), indexName); InputFactory inputFactory = new InputFactory(functions); if (table.generatedColumns().isEmpty()) { generatedColumns = GeneratedColumns.empty(); } else { generatedColumns = new GeneratedColumns<>( inputFactory, txnCtx, validation, referenceResolver, this.targets, table.generatedColumns() ); } checks = new CheckConstraints<>(txnCtx, inputFactory, referenceResolver, table); }

Target:
InsertSourceFromCells(TransactionContext txnCtx, Functions functions, DocTableInfo table, String indexName, GeneratedColumns.Validation validation, List<Reference> targets) { Tuple<List<Reference>, Object[]> allTargetColumnsAndDefaults = addDefaults(targets, table, txnCtx, functions); this.targets = allTargetColumnsAndDefaults.v1(); this.defaultValues = allTargetColumnsAndDefaults.v2(); ReferencesFromInputRow referenceResolver = new ReferencesFromInputRow(this.targets, table.partitionedByColumns(), indexName); InputFactory inputFactory = new InputFactory(functions); if (table.generatedColumns().isEmpty()) { generatedColumns = GeneratedColumns.empty(); } else { generatedColumns = new GeneratedColumns<>( inputFactory, txnCtx, validation, referenceResolver, this.targets, table.generatedColumns() ); } checks = new CheckConstraints<>(txnCtx, inputFactory, referenceResolver, table); }
Source:
public void addPage(Page page) { if (canProcessDictionary(page)) { boolean done = new AddDictionaryWork(page).process(); verify(done); return; } boolean done = new AddPageWork(page).process(); verify(done); }

Target:
public Work<?> addPage(Page page) { currentPageSizeInBytes = page.getRetainedSizeInBytes(); return canProcessDictionary(page) ? new AddDictionaryPageWork(page) : new AddNonDictionaryPageWork(page); }
Source:
private void closeSession(KeycloakSession session) { KeycloakTransactionManager transactionManager = session.getTransactionManager(); if (transactionManager != null) { if ((transactionManager instanceof SupportsPostponedCommit) && ((SupportsPostponedCommit) transactionManager).isPostponedCommit()) { transactionManager.commit(); } else if (transactionManager.isActive()){ transactionManager.rollback(); } } session.close(); Resteasy.clearContextData(); }

Target:
private void closeSession(KeycloakSession session) { KeycloakTransactionManager transactionManager = session.getTransactionManager(); try { if (transactionManager != null && transactionManager.isActive()) { if ((transactionManager instanceof SupportsPostponedCommit) && ((SupportsPostponedCommit) transactionManager).isPostponedCommit()) { transactionManager.commit(); } else { transactionManager.rollback(); } } } finally { session.close(); Resteasy.clearContextData(); } }
Source:
public BloomFilter readBloomFilter(ColumnChunkMetaData meta) throws IOException { long bloomFilterOffset = meta.getBloomFilterOffset(); f.seek(bloomFilterOffset); BloomFilterHeader bloomFilterHeader = Util.readBloomFilterHeader(f); int numBytes = bloomFilterHeader.getNumBytes(); if ( numBytes <= 0 || numBytes > BlockSplitBloomFilter.DEFAULT_MAXIMUM_BYTES) { return null; } if (!bloomFilterHeader.getHash().isSetXXHASH() || !bloomFilterHeader.getAlgorithm().isSetBLOCK() || !bloomFilterHeader.getCompression().isSetUNCOMPRESSED()) { return null; } byte[] bitset = new byte[numBytes]; f.readFully(bitset); return new BlockSplitBloomFilter(bitset); }

Target:
public BloomFilter readBloomFilter(ColumnChunkMetaData meta) throws IOException { long bloomFilterOffset = meta.getBloomFilterOffset(); f.seek(bloomFilterOffset); BloomFilterHeader bloomFilterHeader; try { bloomFilterHeader = Util.readBloomFilterHeader(f); } catch (IOException e) { LOG.warn("read no bloom filter"); return null; } int numBytes = bloomFilterHeader.getNumBytes(); if (numBytes <= 0 || numBytes > BlockSplitBloomFilter.UPPER_BOUND_BYTES) { LOG.warn("the read bloom filter size is wrong, size is {}", bloomFilterHeader.getNumBytes()); return null; } if (!bloomFilterHeader.getHash().isSetXXHASH() || !bloomFilterHeader.getAlgorithm().isSetBLOCK() || !bloomFilterHeader.getCompression().isSetUNCOMPRESSED()) { LOG.warn("the read bloom filter is not supported yet, algorithm = {}, hash = {}, compression = {}", bloomFilterHeader.getAlgorithm(), bloomFilterHeader.getHash(), bloomFilterHeader.getCompression()); return null; } byte[] bitset = new byte[numBytes]; f.readFully(bitset); return new BlockSplitBloomFilter(bitset); }
Source:
public Response add(Step step) { validateParameters(step, "Type", "status" , "description"); String id; if (step.isSetParentStep()) { id = step.getParentStep().getId(); } else { id = jobId.toString(); } return performCreate(VdcActionType.AddExternalStep, new AddExternalStepParameters(Guid.createGuidFromString(id), step.getDescription(),StepMapper.map(step.getType()), JobMapper.map(step.getStatus(), null)), new QueryIdResolver<Guid>(VdcQueryType.GetStepByStepId, IdQueryParameters.class)); }

Target:
public Response add(Step step) { validateParameters(step, "type", "status.state" , "description"); String id; if (step.isSetParentStep() && step.getParentStep().getId() != null) { id = step.getParentStep().getId(); } else { id = jobId.toString(); } return performCreate(VdcActionType.AddExternalStep, new AddExternalStepParameters(asGuid(id), step.getDescription(),StepMapper.map(StepEnum.fromValue(step.getType())), JobMapper.map(step.getStatus(), null)), new QueryIdResolver<Guid>(VdcQueryType.GetStepByStepId, IdQueryParameters.class)); }
Source:
public boolean updateNode(Node n) throws IOException { if ( nodes.updateNode(n) ){ getQueue().scheduleMaintenance(); return true; }; return false; }

Target:
public boolean updateNode(Node n) throws IOException { return nodes.updateNode(n); }
Source:
public int hashCode() { return Objects .hash(id, containerName, command, entrypoint, image, dependsOn, environment, expose, ports, labels, links, volumes, volumesFrom, memLimit, build, networks); }

Target:
public int hashCode() { return Objects.hash(getId(), getContainerName(), getCommand(), getEntrypoint(), getImage(), getDependsOn(), getEnvironment(), getExpose(), getPorts(), getLabels(), getLinks(), getVolumes(), getVolumesFrom(), getMemLimit(), getBuild(), getNetworks()); }
Source:
public void evaluateFastReplyTo() { this.usingFastReplyTo = false; if (this.replyQueue == null || AddressUtils.AMQ_RABBITMQ_REPLY_TO.equals(this.replyQueue.getName())) { try { execute(new ChannelCallback<Void>() { @Override public Void doInRabbit(Channel channel) throws Exception { channel.queueDeclarePassive(AddressUtils.AMQ_RABBITMQ_REPLY_TO); return null; } }); this.usingFastReplyTo = true; } catch (Exception e) { if (replyQueue != null) { logger.error("Broker does not support fast replies via 'amq.rabbitmq.reply-to', temporary " + "queues will be used:" + e.getMessage() + "."); } else { if (logger.isDebugEnabled()) { logger.debug("Broker does not support fast replies via 'amq.rabbitmq.reply-to', temporary " + "queues will be used:" + e.getMessage() + "."); } } RabbitTemplate.this.replyQueue = null; } } this.evaluatedFastReplyTo = true; }

Target:
private void evaluateFastReplyTo() { this.usingFastReplyTo = false; if (this.replyQueue == null || AddressUtils.AMQ_RABBITMQ_REPLY_TO.equals(this.replyQueue.getName())) { try { execute(new ChannelCallback<Void>() { @Override public Void doInRabbit(Channel channel) throws Exception { channel.queueDeclarePassive(AddressUtils.AMQ_RABBITMQ_REPLY_TO); return null; } }); this.usingFastReplyTo = true; } catch (Exception e) { if (replyQueue != null) { logger.error("Broker does not support fast replies via 'amq.rabbitmq.reply-to', temporary " + "queues will be used:" + e.getMessage() + "."); } else { if (logger.isDebugEnabled()) { logger.debug("Broker does not support fast replies via 'amq.rabbitmq.reply-to', temporary " + "queues will be used:" + e.getMessage() + "."); } } RabbitTemplate.this.replyQueue = null; } } this.evaluatedFastReplyTo = true; }
Source:
public void testValidationFailsDiskConnectedToRunningVm() { VM vm = new VM(); vm.setStatus(VMStatus.Up); VmDevice vmDevice = new VmDevice(); vmDevice.setPlugged(true); List<Pair<VM, VmDevice>> vms = Collections.singletonList(new Pair(vm, vmDevice)); doReturn(vms).when(vmDao).getVmsWithPlugInfo(diskId); ValidateTestUtils.runAndAssertValidateFailure(command, EngineMessage.ACTION_TYPE_FAILED_VM_IS_NOT_DOWN); }

Target:
public void testValidationFailsDiskConnectedToRunningVm() { VM vm = new VM(); vm.setStatus(VMStatus.Up); VmDevice vmDevice = new VmDevice(); vmDevice.setPlugged(true); List<Pair<VM, VmDevice>> vms = Collections.singletonList(new Pair<>(vm, vmDevice)); doReturn(vms).when(vmDao).getVmsWithPlugInfo(diskId); ValidateTestUtils.runAndAssertValidateFailure(command, EngineMessage.ACTION_TYPE_FAILED_VM_IS_NOT_DOWN); }
Source:
public static void init() { if (!initialized_ && !loading_) { scrollers_ = new HashMap<>(); loading_ = true; virtualScrollerLoader_.addCallback(() -> { try { initialized_ = true; loading_ = false; } catch (JavaScriptException e) { Debug.log(e.getMessage()); } }); } }

Target:
public static void init() { if (!initialized_ && !loading_) { scrollers_ = new HashMap<>(); loading_ = true; virtualScrollerLoader_.addCallback(() -> { loading_ = false; try { initialized_ = true; } catch (JavaScriptException e) { Debug.log(e.getMessage()); } }); } }
Source:
private void execute() { if (fFinishedLatch.getCount() == 0) { return; } synchronized (syncObj) { if (fStarted) { return; } fStarted = true; } if (fTrace != null) { fTrace.notifyPendingRequest(true); } fJob = new Job(NLS.bind(Messages.TmfAbstractAnalysisModule_RunningAnalysis, getName())) { @Override protected IStatus run(final IProgressMonitor monitor) { try { monitor.beginTask("", IProgressMonitor.UNKNOWN); broadcast(new TmfStartAnalysisSignal(TmfAbstractAnalysisModule.this, TmfAbstractAnalysisModule.this)); fAnalysisCancelled = !executeAnalysis(monitor); if (fTrace != null) { fTrace.notifyPendingRequest(false); } } catch (TmfAnalysisException e) { Activator.logError("Error executing analysis with trace " + getTrace().getName(), e); } finally { synchronized (syncObj) { monitor.done(); setAnalysisCompleted(); } } if (!fAnalysisCancelled) { return Status.OK_STATUS; } return Status.CANCEL_STATUS; } @Override protected void canceling() { TmfAbstractAnalysisModule.this.canceling(); } }; fJob.schedule(); }

Target:
private void execute() { if (fFinishedLatch.getCount() == 0) { return; } synchronized (syncObj) { if (fStarted) { return; } fStarted = true; } if (fTrace != null) { fTrace.notifyPendingRequest(true); setNotifyRequestNeeded(true); } fJob = new Job(NLS.bind(Messages.TmfAbstractAnalysisModule_RunningAnalysis, getName())) { @Override protected IStatus run(final IProgressMonitor monitor) { try { monitor.beginTask("", IProgressMonitor.UNKNOWN); broadcast(new TmfStartAnalysisSignal(TmfAbstractAnalysisModule.this, TmfAbstractAnalysisModule.this)); fAnalysisCancelled = !executeAnalysis(monitor); if ((fTrace != null) && isNotifyRequestNeeded()) { fTrace.notifyPendingRequest(false); setNotifyRequestNeeded(false); } } catch (TmfAnalysisException e) { Activator.logError("Error executing analysis with trace " + getTrace().getName(), e); } finally { synchronized (syncObj) { monitor.done(); setAnalysisCompleted(); } } if (!fAnalysisCancelled) { return Status.OK_STATUS; } return Status.CANCEL_STATUS; } @Override protected void canceling() { TmfAbstractAnalysisModule.this.canceling(); } }; fJob.schedule(); }
Source:
protected IResource getResource(IPath path) { if (path != null) { IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); if (path.getDevice() == null) { return root.findMember(path); } IFile file = root.getFileForLocation(path); if (file != null) { return file; } if (!"jar".equalsIgnoreCase(path.getFileExtension())) { IContainer container = root.getContainerForLocation(path); if (container != null) { return container; } } } return null; }

Target:
protected IResource getResource(IPath path) { if (path != null) { IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot(); IFile file = root.getFileForLocation(path); if (file != null) { return file; } if (getType() != ARCHIVE) { IContainer container = root.getContainerForLocation(path); if (container != null) { return container; } } if (path.getDevice() == null) { return root.findMember(path); } } return null; }
Source:
HashMap<String, Object> deleteClient(Model model, @RequestParam("profileIdentifier") String profileIdentifier, @RequestParam("clientUUID") String[] clientUUID) throws Exception { logger.info("Attempting to remove clients from the profile: ", profileIdentifier); logger.info("Attempting to remove the following clients: {}", Arrays.toString(clientUUID)); HashMap<String, Object> valueHash = new HashMap<String, Object>(); Integer profileId = ControllerUtils.convertProfileIdentifier(profileIdentifier); for( int i = 0; i < clientUUID.length; i++ ) { if (clientUUID[i].compareTo(Constants.PROFILE_CLIENT_DEFAULT_ID) == 0) throw new Exception("Default client cannot be deleted"); clientService.remove(profileId, clientUUID[i]); valueHash.put("clients", clientService.findAllClients(profileId)); } return valueHash; }

Target:
HashMap<String, Object> deleteClient(Model model, @RequestParam("profileIdentifier") String profileIdentifier, @RequestParam("clientUUID") String[] clientUUID) throws Exception { logger.info("Attempting to remove clients from the profile: ", profileIdentifier); logger.info("Attempting to remove the following clients: {}", Arrays.toString(clientUUID)); HashMap<String, Object> valueHash = new HashMap<String, Object>(); Integer profileId = ControllerUtils.convertProfileIdentifier(profileIdentifier); for( int i = 0; i < clientUUID.length; i++ ) { if (clientUUID[i].compareTo(Constants.PROFILE_CLIENT_DEFAULT_ID) == 0) throw new Exception("Default client cannot be deleted"); clientService.remove(profileId, clientUUID[i]); } valueHash.put("clients", clientService.findAllClients(profileId)); return valueHash; }
Source:
public void testValidate() { FtraceTrace ftraceTrace = new FtraceTrace(); IStatus status = ftraceTrace.validate(null, "res/android_ftrace_trace_output_14_01_18"); assertEquals(0, status.getSeverity()); }

Target:
public void testValidate() { FtraceTrace ftraceTrace = new FtraceTrace(); IStatus status = ftraceTrace.validate(null, "res/trace-android-sched"); assertEquals(0, status.getSeverity()); }
Source:
public boolean isUnifiable(Index index) { return index instanceof TopIndex || equals(index) || (index instanceof TokenIndex && kLabel.sorts().contains(((TokenIndex) index).sort())); }

Target:
public boolean isUnifiable(Index index) { return index instanceof TopIndex || equals(index); }
Source:
public void test_DnDPackageFromMC2DiagramBlank2() throws Exception { openRepresentation2(); try { openErrorLogViewByAPI(); SWTBot errorLogBot = bot.viewByTitle("Error Log").bot(); int rowCount = errorLogBot.tree().rowCount(); DndUtil util = new DndUtil(bot.getDisplay()); final SWTBotTreeItem ecoreTreeItem = semanticResourceNode.expandNode(ROOTPACKAGE_NAME) .getNode(CONTAINER_TO_DRAG_P1); System.out.println("Cas1 --> \"P1\" = " + ecoreTreeItem.getText()); util.dragAndDrop(ecoreTreeItem, editor.getCanvas()); bot.waitUntil(new DiagramWithChildrensCondition(editor, 1)); assertEquals("An error message was generated !", rowCount, errorLogBot.tree().rowCount()); } finally { closeErrorLogView(); } }

Target:
public void test_DnDPackageFromMC2DiagramBlank2() throws Exception { openRepresentation2(); try { openErrorLogViewByAPI(); SWTBot errorLogBot = bot.viewByTitle("Error Log").bot(); int rowCount = errorLogBot.tree().rowCount(); DndUtil util = new DndUtil(bot.getDisplay()); final SWTBotTreeItem ecoreTreeItem = semanticResourceNode.expandNode(ROOTPACKAGE_NAME) .getNode(CONTAINER_TO_DRAG_P1); util.dragAndDrop(ecoreTreeItem, editor.getCanvas()); bot.waitUntil(new DiagramWithChildrensCondition(editor, 1)); assertEquals("An error message was generated !", rowCount, errorLogBot.tree().rowCount()); } finally { closeErrorLogView(); } }
Source:
public void messageArrived(final String topic, final MqttMessage message) { final List<MQTTDataGenerator> dataGeneratorList = dataGeneratorListMap.get(topic); if (dataGeneratorList != null) { dataGeneratorList.forEach(dataGenerator -> dataGenerator.emitData(message)); } }

Target:
public void messageArrived(final String topic, final MqttMessage message) { final Queue<MQTTDataGenerator> dataGeneratorList = dataGeneratorListMap.get(topic); if (dataGeneratorList != null) { dataGeneratorList.forEach(dataGenerator -> dataGenerator.emitData(message)); } }
Source:
private void addGatewayUserFacingCertAndFqdn(GatewayConfig gatewayConfig, Cluster cluster, Map<String, Object> gateway) { boolean userFacingCertHasBeenGenerated = isNotEmpty(gatewayConfig.getUserFacingCert()) && isNotEmpty(gatewayConfig.getUserFacingKey()); if (userFacingCertHasBeenGenerated) { gateway.put("userfacingcert_configured", Boolean.TRUE); gateway.put("userfacingkey", cluster.getStack().getSecurityConfig().getUserFacingKey()); gateway.put("userfacingcert", cluster.getStack().getSecurityConfig().getUserFacingCert()); } String fqdn = null; if (cluster.getStack().getLoadBalancers() != null && cluster.getStack().getLoadBalancers().size() > 0) { fqdn = (cluster.getStack().getLoadBalancers().stream() .filter(lb -> lb.getType() == LoadBalancerType.PUBLIC).findAny() .orElse(cluster.getStack().getLoadBalancers().iterator().next())) .getFqdn(); } if (fqdn == null) { fqdn = cluster.getFqdn(); } if (isNotEmpty(fqdn)) { gateway.put("userfacingfqdn", fqdn); String[] fqdnParts = fqdn.split("\\.", 2); if (fqdnParts.length == 2) { gateway.put("userfacingdomain", Pattern.quote(fqdnParts[1])); } } }

Target:
private void addGatewayUserFacingCertAndFqdn(GatewayConfig gatewayConfig, Cluster cluster, Map<String, Object> gateway) { boolean userFacingCertHasBeenGenerated = isNotEmpty(gatewayConfig.getUserFacingCert()) && isNotEmpty(gatewayConfig.getUserFacingKey()); if (userFacingCertHasBeenGenerated) { gateway.put("userfacingcert_configured", Boolean.TRUE); gateway.put("userfacingkey", cluster.getStack().getSecurityConfig().getUserFacingKey()); gateway.put("userfacingcert", cluster.getStack().getSecurityConfig().getUserFacingCert()); } String fqdn = loadBalancerConfigService.getLoadBalancerUserFacingFQDN(cluster.getStack().getId()); fqdn = isEmpty(fqdn) ? cluster.getFqdn() : fqdn; if (isNotEmpty(fqdn)) { gateway.put("userfacingfqdn", fqdn); String[] fqdnParts = fqdn.split("\\.", 2); if (fqdnParts.length == 2) { gateway.put("userfacingdomain", Pattern.quote(fqdnParts[1])); } } }
Source:
public void validateObservationValues(Workbook workbook, String instanceNumber) throws WorkbookParserException { Locale locale = LocaleContextHolder.getLocale(); if (workbook.getObservations() != null) { List<MeasurementRow> observations = new ArrayList<MeasurementRow>(); if (instanceNumber != null && "".equalsIgnoreCase(instanceNumber)) { observations = workbook.getObservations(); } else { observations = workbook.isNursery() ? workbook.getObservations() : WorkbookUtil.filterObservationsByTrialInstance( workbook.getObservations(), instanceNumber); } for (MeasurementRow row : observations) { for (MeasurementData data : row.getDataList()) { MeasurementVariable variate = data.getMeasurementVariable(); if (!this.isValidValue(variate, data.getValue(), data.getcValueId(), true)) { throw new WorkbookParserException(this.messageSource.getMessage(ValidationServiceImpl.ERROR_NUMERIC_VARIABLE_VALUE, new Object[] {variate.getName()}, locale)); } } } } }

Target:
public void validateObservationValues(Workbook workbook, String instanceNumber) throws WorkbookParserException { Locale locale = LocaleContextHolder.getLocale(); if (workbook.getObservations() != null) { List<MeasurementRow> observations = new ArrayList<MeasurementRow>(); if (instanceNumber != null && "".equalsIgnoreCase(instanceNumber)) { observations = workbook.getObservations(); } else { observations = workbook.isNursery() ? workbook.getObservations() : WorkbookUtil.filterObservationsByTrialInstance( workbook.getObservations(), instanceNumber); } for (MeasurementRow row : observations) { for (MeasurementData data : row.getDataList()) { MeasurementVariable variate = data.getMeasurementVariable(); if (!this.isValidValue(variate, data.getValue(), data.getcValueId(), true)) { throw new WorkbookParserException(this.messageSource.getMessage(ValidationServiceImpl.ERROR_NUMERIC_VARIABLE_VALUE, new Object[] {variate.getName(), data.getValue()}, locale)); } } } } }
Source:
private void handleParameter(Symbol parameter, boolean springInjectionAnnotated) { Type leastSpecificType = findLeastSpecificType(parameter); if (parameter.type() != leastSpecificType && !leastSpecificType.is("java.lang.Object") && !(springInjectionAnnotated && parameter.type().is("java.util.Collection"))) { String suggestedType = getSuggestedType(springInjectionAnnotated, leastSpecificType); reportIssue(parameter.declaration(), String.format("Use '%s' here; it is a more general type than '%s'.", suggestedType, parameter.type().name())); } }

Target:
private void handleParameter(Symbol parameter, boolean springInjectionAnnotated) { Type leastSpecificType = findLeastSpecificType(parameter); if (parameter.type() != leastSpecificType && !leastSpecificType.is("java.lang.Object")) { String suggestedType = getSuggestedType(springInjectionAnnotated, leastSpecificType); reportIssue(parameter.declaration(), String.format("Use '%s' here; it is a more general type than '%s'.", suggestedType, parameter.type().name())); } }
Source:
public void after() { getContext().unbindService(serviceConnection); remoteMessenger = null; ActivityManager.RunningAppProcessInfo info = getRemoteProcessInfo(); if (info != null) { android.os.Process.killProcess(info.pid); } int counter = 10; while (getRemoteProcessInfo() != null) { if (counter == 0) { assertTrue("The remote process is still alive.", false); } try { Thread.sleep(300); } catch (InterruptedException e) { throw new RuntimeException(e); } counter--; } }

Target:
public void after() { getContext().unbindService(serviceConnection); ActivityManager.RunningAppProcessInfo info = getRemoteProcessInfo(); if (info != null) { android.os.Process.killProcess(info.pid); } int counter = 10; while (getRemoteProcessInfo() != null) { if (counter == 0) { fail("The remote process is still alive."); } try { Thread.sleep(300); } catch (InterruptedException e) { throw new RuntimeException(e); } counter--; } }
Source:
public Object invoke(MethodInvocation invocation) throws Throwable { String timerTag = buildTimerTag(invocation.getMethod().getAnnotation(Timed.class), invocation.getMethod()); final Timer.Context timer = metricRegistry.timer(timerTag).time(); Object result; try { result = invocation.proceed(); if (result instanceof Promise<?>) { ((Promise<?>) result).result(v -> timer.stop()); } else { timer.stop(); } } catch (Exception e) { timer.stop(); throw e; } return result; }

Target:
public Object invoke(MethodInvocation invocation) throws Throwable { String timerTag = buildTimerTag(invocation.getMethod().getAnnotation(Timed.class), invocation.getMethod()); final Timer timer = metricRegistry.timer(timerTag); final Timer.Context timerContext = timer.time(); Object result; try { result = invocation.proceed(); if (result instanceof Promise<?>) { result = ((Promise<?>) result).time(duration -> timer.update(duration.getNano(), TimeUnit.NANOSECONDS) ); } else { timerContext.stop(); } } catch (Exception e) { timerContext.stop(); throw e; } return result; }
Source:
static void writeModel(NaiveBayesModel model) throws IOException { ensureTextClassifierFolderExists(); FileWriter fw = new FileWriter(new File(MODEL_PATH)); PlainTextNaiveBayesModelWriter modelWriter; modelWriter = new PlainTextNaiveBayesModelWriter(model, new BufferedWriter(fw)); modelWriter.persist(); fw.close(); }

Target:
static void writeModel(NaiveBayesModel model) throws IOException { ensureTextClassifierFolderExists(); try (FileWriter fw = new FileWriter(new File(MODEL_PATH))) { PlainTextNaiveBayesModelWriter modelWriter; modelWriter = new PlainTextNaiveBayesModelWriter(model, new BufferedWriter(fw)); modelWriter.persist(); } }
Source:
public static byte[] serialize(ClientCommunicatorRequest request) { int size = request.getMsgBytes().length + 8; ByteBuffer buffer = ByteBuffer.allocate(size). putInt(request.getRequestType().ordinal()). putInt(request.getRequestSequenceNumber()). put(request.getMsgBytes()); return buffer.array(); }

Target:
public static byte[] serialize(ClientCommunicatorRequest request) { int size = request.getMsgBytes().length + 2 * 4; ByteBuffer buffer = ByteBuffer.allocate(size). putInt(request.getRequestType().ordinal()). putInt(request.getRequestSequenceNumber()). put(request.getMsgBytes()); return buffer.array(); }
Source:
private static void upgradeTableDesc(org.apache.hadoop.hive.metastore.api.Table tableObj, MetaData rv, EximUtil.SemanticAnalyzerWrapperContext x) throws IOException, TException, HiveException { x.getLOG().debug("converting table " + tableObj.getTableName() + " of type " + tableObj.getTableType() + " with para " + tableObj.getParameters()); TableType tableType = TableType.valueOf(tableObj.getTableType()); HiveStrictManagedMigration.TableMigrationOption migrationOption = HiveStrictManagedMigration.determineMigrationTypeAutomatically(tableObj, tableType, null, x.getConf(), x.getHive().getMSC(), true); HiveStrictManagedMigration.migrateTable(tableObj, tableType, migrationOption, false, getHiveUpdater(x.getConf()), x.getHive().getMSC(), x.getConf()); x.getLOG().debug("converted table " + tableObj.getTableName() + " of type " + tableObj.getTableType() + " with para " + tableObj.getParameters()); }

Target:
private static void upgradeTableDesc(org.apache.hadoop.hive.metastore.api.Table tableObj, MetaData rv, EximUtil.SemanticAnalyzerWrapperContext x) throws IOException, TException, HiveException { x.getLOG().debug("Converting table " + tableObj.getTableName() + " of type " + tableObj.getTableType() + " with para " + tableObj.getParameters()); TableType tableType = TableType.valueOf(tableObj.getTableType()); HiveStrictManagedMigration.TableMigrationOption migrationOption = HiveStrictManagedMigration.determineMigrationTypeAutomatically(tableObj, tableType, null, x.getConf(), x.getHive().getMSC(), true); HiveStrictManagedMigration.migrateTable(tableObj, tableType, migrationOption, false, getHiveUpdater(x.getConf()), x.getHive().getMSC(), x.getConf()); x.getLOG().debug("Converted table " + tableObj.getTableName() + " of type " + tableObj.getTableType() + " with para " + tableObj.getParameters()); }
Source:
public String getMessage() { StringBuilder sb = new StringBuilder(); switch (type) { case MODULE_TYPE: sb.append("[Module Type"); break; case TEMPLATE: sb.append("[Template"); break; case RULE: sb.append("[RuleImpl"); break; default: break; } if (id != null) sb.append(" " + id); sb.append("] " + super.getMessage()); return sb.toString(); }

Target:
public String getMessage() { StringBuilder sb = new StringBuilder(); switch (type) { case MODULE_TYPE: sb.append("[Module Type"); break; case TEMPLATE: sb.append("[Template"); break; case RULE: sb.append("[Rule"); break; default: break; } if (id != null) { sb.append(" " + id); } sb.append("] " + super.getMessage()); return sb.toString(); }