auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void testDisplayStepExecution() { final String jobName = generateJobName(); executeJobCreate(jobName, JOB_WITH_PARAMETERS_DESCRIPTOR); checkForJobInList(jobName, JOB_WITH_PARAMETERS_DESCRIPTOR, true); executeJobLaunch(jobName); final Table jobExecutions = listJobExecutions(); final String jobExecutionId = jobExecutions.getRows().get(0).getValue(1); final Table stepExecutions = listStepExecutions(jobExecutionId); String stepExecutionId = stepExecutions.getRows().get(0).getValue(1); final Table stepExecution = getDisplayStepExecution(jobExecutionId, stepExecutionId); final String stepExecutionIdFromTable = stepExecution.getRows().get(0).getValue(2); final String jobExecutionIdFromTable = stepExecution.getRows().get(1).getValue(2); final String stepNameFromTable = stepExecution.getRows().get(2).getValue(2); final String duration = stepExecution.getRows().get(3).getValue(2); assertEquals(stepExecutionId, stepExecutionIdFromTable); assertEquals(jobExecutionId, jobExecutionIdFromTable); assertNotEquals(stepNameFromTable, "N/A"); assertTrue(!duration.isEmpty()); assertNotEquals(duration, "N/A"); }

Target:
public void testDisplayStepExecution() { final String jobName = generateJobName(); executeJobCreate(jobName, JOB_WITH_PARAMETERS_DESCRIPTOR); checkForJobInList(jobName, JOB_WITH_PARAMETERS_DESCRIPTOR, true); executeJobLaunch(jobName); final Table jobExecutions = listJobExecutions(); final String jobExecutionId = jobExecutions.getRows().get(0).getValue(1); final Table stepExecutions = listStepExecutions(jobExecutionId); String stepExecutionId = stepExecutions.getRows().get(0).getValue(1); final Table stepExecution = getDisplayStepExecution(jobExecutionId, stepExecutionId); final String stepExecutionIdFromTable = stepExecution.getRows().get(0).getValue(2); final String jobExecutionIdFromTable = stepExecution.getRows().get(1).getValue(2); final String stepNameFromTable = stepExecution.getRows().get(2).getValue(2); final String duration = stepExecution.getRows().get(3).getValue(2); assertEquals(stepExecutionId, stepExecutionIdFromTable); assertEquals(jobExecutionId, jobExecutionIdFromTable); assertNotEquals(stepNameFromTable, "N/A"); assertFalse(duration.isEmpty()); assertNotEquals(duration, "N/A"); }
Source:
private static boolean checkAndRequestPermissions(final Activity activity, final Set<Type> types) { final Set<Type> requestTypes = new HashSet<>(); final Set<String> rationalMessages = new HashSet<>(); for (final Type type : types) { if (!hasPermission(activity, type)) { requestTypes.add(type); if (ActivityCompat.shouldShowRequestPermissionRationale(activity, type.getPermission())) { rationalMessages.add(activity.getString(type.getRationalMessageId())); } } } if (requestTypes.size() == 0) { return true; } if (rationalMessages.size() > 0) { showPermissionRationaleAlert(activity, TextUtils.join("\n\n", rationalMessages), requestTypes); } else { requestPermission(activity, requestTypes); } return false; }

Target:
private static boolean checkAndRequestPermissions(final Activity activity, final Set<Type> types) { final Set<Type> requestTypes = EnumSet.noneOf(Type.class); final Set<String> rationalMessages = new HashSet<>(); for (final Type type : types) { if (!hasPermission(activity, type)) { requestTypes.add(type); if (ActivityCompat.shouldShowRequestPermissionRationale(activity, type.getPermission())) { rationalMessages.add(activity.getString(type.getRationalMessageId())); } } } if (requestTypes.isEmpty()) { return true; } if (rationalMessages.isEmpty()) { requestPermission(activity, requestTypes); } else { showPermissionRationaleAlert(activity, TextUtils.join("\n\n", rationalMessages), requestTypes); } return false; }
Source:
private void determineTotalsAndAverages() { failureCount = 0; boolean environmentModeSet = false; long totalProblemScale = 0L; int problemScaleCount = 0; for (ProblemBenchmarkResult problemBenchmarkResult : unifiedProblemBenchmarkResultList) { Long problemScale = problemBenchmarkResult.getProblemScale(); if (problemScale != null && problemScale >= 0L) { totalProblemScale += problemScale; problemScaleCount++; } failureCount += problemBenchmarkResult.getFailureCount(); } averageProblemScale = problemScaleCount == 0 ? null : totalProblemScale / (long) problemScaleCount; Score totalScore = null; int solverBenchmarkCount = 0; for (SolverBenchmarkResult solverBenchmarkResult : solverBenchmarkResultList) { EnvironmentMode solverEnvironmentMode = solverBenchmarkResult.getEnvironmentMode(); if (!environmentModeSet && solverEnvironmentMode != null) { environmentMode = solverEnvironmentMode; environmentModeSet = true; } else if (environmentModeSet && solverEnvironmentMode != environmentMode) { environmentMode = null; } Score score = solverBenchmarkResult.getAverageScore(); if (score != null) { if (totalScore != null && !totalScore.isCompatibleArithmeticArgument(score)) { totalScore = null; break; } totalScore = (totalScore == null) ? score : totalScore.add(score); solverBenchmarkCount++; } } if (totalScore != null) { averageScore = totalScore.divide(solverBenchmarkCount); } }

Target:
private void determineTotalsAndAverages() { failureCount = 0; long totalProblemScale = 0L; int problemScaleCount = 0; for (ProblemBenchmarkResult problemBenchmarkResult : unifiedProblemBenchmarkResultList) { Long problemScale = problemBenchmarkResult.getProblemScale(); if (problemScale != null && problemScale >= 0L) { totalProblemScale += problemScale; problemScaleCount++; } failureCount += problemBenchmarkResult.getFailureCount(); } averageProblemScale = problemScaleCount == 0 ? null : totalProblemScale / (long) problemScaleCount; Score totalScore = null; int solverBenchmarkCount = 0; boolean firstSolverBenchmarkResult = true; for (SolverBenchmarkResult solverBenchmarkResult : solverBenchmarkResultList) { EnvironmentMode solverEnvironmentMode = solverBenchmarkResult.getEnvironmentMode(); if (firstSolverBenchmarkResult && solverEnvironmentMode != null) { environmentMode = solverEnvironmentMode; firstSolverBenchmarkResult = false; } else if (!firstSolverBenchmarkResult && solverEnvironmentMode != environmentMode) { environmentMode = null; } Score score = solverBenchmarkResult.getAverageScore(); if (score != null) { if (totalScore != null && !totalScore.isCompatibleArithmeticArgument(score)) { totalScore = null; break; } totalScore = (totalScore == null) ? score : totalScore.add(score); solverBenchmarkCount++; } } if (totalScore != null) { averageScore = totalScore.divide(solverBenchmarkCount); } }
Source:
public static @Nonnull Pattern getAggregateSecretPattern(@Nonnull Collection<String> inputs) { String pattern = inputs.stream() .filter(input -> !input.isEmpty()) .filter(input -> input.length() > MINIMUM_SECRET_MASKING_LENGTH) .flatMap(input -> SecretPatternFactory.all().stream().flatMap(factory -> factory.getEncodedForms(input).stream())) .sorted(BY_LENGTH_DESCENDING) .distinct() .map(Pattern::quote) .collect(Collectors.joining("|")); return Pattern.compile(pattern); }

Target:
public static @Nonnull Pattern getAggregateSecretPattern(@Nonnull Collection<String> inputs) { String pattern = inputs.stream() .filter(input -> input.length() > MINIMUM_SECRET_MASKING_LENGTH) .flatMap(input -> SecretPatternFactory.all().stream().flatMap(factory -> factory.getEncodedForms(input).stream())) .sorted(BY_LENGTH_DESCENDING) .distinct() .map(Pattern::quote) .collect(Collectors.joining("|")); return Pattern.compile(pattern); }
Source:
protected IStructuredSelection getSelectionToUse(ExecutionEvent event) { return HandlerUtil.getCurrentStructuredSelection(event); }

Target:
protected IStructuredSelection getSelectionToUse(ExecutionEvent event) { ISelection selection = HandlerUtil.getCurrentSelection(event); IStructuredSelection selectionToPass = StructuredSelection.EMPTY; if (selection instanceof IStructuredSelection) { selectionToPass = (IStructuredSelection) selection; } else { Class resourceClass = LegacyResourceSupport.getResourceClass(); if (resourceClass != null) { IWorkbenchWindow activeWorkbenchWindow = HandlerUtil.getActiveWorkbenchWindow(event); IWorkbenchPart part = activeWorkbenchWindow.getPartService() .getActivePart(); if (part instanceof IEditorPart) { IEditorInput input = ((IEditorPart) part).getEditorInput(); Object resource = Adapters.adapt(input, resourceClass); if (resource != null) { selectionToPass = new StructuredSelection(resource); } } } } return selectionToPass; }
Source:
public void generateLodEntropies() { float[] entropies = new float[getMaxLod()+1]; for (int i = 0; i <= getMaxLod(); i++){ int curLod = (int) Math.pow(2, i); IndexBuffer idxB = geomap.writeIndexArrayLodDiff(curLod, false, false, false, false, totalSize); Buffer ib; if (idxB.getBuffer() instanceof IntBuffer) ib = idxB.getBuffer(); else ib = idxB.getBuffer(); entropies[i] = EntropyComputeUtil.computeLodEntropy(mesh, ib); } lodEntropy = entropies; }

Target:
public void generateLodEntropies() { float[] entropies = new float[getMaxLod()+1]; for (int i = 0; i <= getMaxLod(); i++){ int curLod = (int) Math.pow(2, i); IndexBuffer idxB = geomap.writeIndexArrayLodDiff(curLod, false, false, false, false, totalSize); Buffer ib = idxB.getBuffer(); entropies[i] = EntropyComputeUtil.computeLodEntropy(mesh, ib); } lodEntropy = entropies; }
Source:
private static void errorAndExit(Throwable e, String message, boolean report) { if (Utils.isJarRunning() && Utils.getRunningDirectory() != null && Utils.getRunningDirectory().getAbsolutePath().indexOf('!') != -1) ErrorHandler.error( "JARs cannot be run from some paths containing the '!' character. " + "Please rename the file/directories and try again.\n\n" + "Path: " + Utils.getRunningDirectory().getAbsolutePath(), null, false ); else ErrorHandler.error(message, e, report); System.exit(-1); }

Target:
private static void errorAndExit(Throwable e, String message, boolean report) { if (Utils.isJarRunning() && Utils.getRunningDirectory() != null && Utils.getRunningDirectory().getAbsolutePath().indexOf('!') != -1) ErrorHandler.error( "JARs cannot be run from some paths containing the '!' character. " + "Please rename the file/directories and try again.\n\n" + "Path: " + Utils.getRunningDirectory().getAbsolutePath(), null, false ); else ErrorHandler.error(message, e, report); System.exit(1); }
Source:
public static TopicPartition toTopicPartition(SystemStreamPartition ssp) { return new TopicPartition(ssp.getStream(), ssp.getPartition().getPartitionId()); }

Target:
protected static TopicPartition toTopicPartition(SystemStreamPartition ssp) { return new TopicPartition(ssp.getStream(), ssp.getPartition().getPartitionId()); }
Source:
private void rejectedUntrustedHosts(HttpServletRequest request) { String serverName = request.getServerName(); if (this.allowedHostnames != null && !this.allowedHostnames.test(serverName)) { throw new RequestRejectedException("The request was rejected because the domain " + serverName + " is untrusted."); } }

Target:
private void rejectedUntrustedHosts(HttpServletRequest request) { String serverName = request.getServerName(); if (serverName != null && !this.allowedHostnames.test(serverName)) { throw new RequestRejectedException("The request was rejected because the domain " + serverName + " is untrusted."); } }
Source:
public boolean equals(Object obj) { return obj instanceof ResourceByDefinitionKey && key.hashCode() == obj.hashCode(); }

Target:
public boolean equals(Object obj) { return obj instanceof ResourceByDefinitionKey && key.equals(((ResourceByDefinitionKey) obj).key); }
Source:
public void addLink(Context eventContext) { Optional<Object> spanContextOptional = eventContext.getData(SPAN_CONTEXT); Optional<Object> spanOptional = eventContext.getData(OPENTELEMETRY_SPAN_KEY); if (!spanOptional.isPresent()) { logger.warning("Failed to find span to link it."); return; } SpanContext spanContext = (SpanContext) spanContextOptional.get(); Span span = (Span) spanOptional.get(); span.addLink(Link.fromSpanContext(spanContext, PARENT_LINKED_SPAN)); }

Target:
public void addLink(Context eventContext) { final Span span = getSpan(eventContext); if (span == null) { logger.warning("Failed to find span to link it."); return; } final Optional<Object> spanContextOptional = eventContext.getData(SPAN_CONTEXT); if (!spanContextOptional.isPresent()) { logger.warning("Failed to find Span context to link it."); return; } else if (!(spanContextOptional.get() instanceof SpanContext)) { logger.warning("Context in event is not of type SpanContext. Actual: {}", spanContextOptional.get().getClass()); return; } final SpanContext spanContext = (SpanContext) spanContextOptional.get(); span.addLink(Link.fromSpanContext(spanContext, PARENT_LINKED_SPAN)); }
Source:
public boolean isGroupSeen(GroupKey<?> groupKey) { class GroupSeenQueryResultProcessor implements DBAccessQueryCallback { private boolean seen = false; boolean getGroupSeen() { return seen; } @Override public void process(ResultSet resultSet) { try { if (resultSet != null) { while (resultSet.next()) { seen = resultSet.getBoolean("seen"); return; } } } catch (SQLException ex) { LOGGER.log(Level.WARNING, "failed to get hash set names", ex); } } } try { String groupSeenQueryStmt = String.format("seen FROM " + GROUPS_TABLENAME + " WHERE value = \'%s\' AND attribute = \'%s\'", groupKey.getValueDisplayName(), groupKey.getAttribute().attrName.toString() ); GroupSeenQueryResultProcessor queryResultProcessor = new GroupSeenQueryResultProcessor(); tskCase.getDBAccessManager().select(groupSeenQueryStmt, queryResultProcessor); return queryResultProcessor.getGroupSeen(); } catch (TskCoreException ex) { String msg = String.format("Failed to get is group seen for group key %s", groupKey.getValueDisplayName()); LOGGER.log(Level.WARNING, msg, ex); } return false; }

Target:
public boolean isGroupSeen(GroupKey<?> groupKey) { class GroupSeenQueryResultProcessor implements CaseDbAccessQueryCallback { private boolean seen = false; boolean getGroupSeen() { return seen; } @Override public void process(ResultSet resultSet) { try { if (resultSet != null) { while (resultSet.next()) { seen = resultSet.getBoolean("seen"); return; } } } catch (SQLException ex) { LOGGER.log(Level.SEVERE, "failed to get group seen", ex); } } } try { String groupSeenQueryStmt = String.format("seen FROM " + GROUPS_TABLENAME + " WHERE value = \'%s\' AND attribute = \'%s\'", groupKey.getValueDisplayName(), groupKey.getAttribute().attrName.toString() ); GroupSeenQueryResultProcessor queryResultProcessor = new GroupSeenQueryResultProcessor(); tskCase.getCaseDbAccessManager().select(groupSeenQueryStmt, queryResultProcessor); return queryResultProcessor.getGroupSeen(); } catch (TskCoreException ex) { String msg = String.format("Failed to get is group seen for group key %s", groupKey.getValueDisplayName()); LOGGER.log(Level.WARNING, msg, ex); } return false; }
Source:
public void obtain_date_in_future_after_specified_number_of_days() { final LocalDate today = LocalDates.inDays(5); final Calendar calendar = Calendar.getInstance(); assertEquals(calendar.get(Calendar.YEAR), today.getYear()); assertEquals(calendar.get(Calendar.MONTH) + 1, today.getMonthValue()); assertEquals(calendar.get(Calendar.DAY_OF_MONTH) + 5, today.getDay()); }

Target:
public void obtain_date_in_future_after_specified_number_of_days() { final LocalDate today = LocalDates.plusDays(5); final Calendar calendar = Calendar.getInstance(); assertEquals(calendar.get(Calendar.YEAR), today.getYear()); assertEquals(calendar.get(Calendar.MONTH) + 1, today.getMonthValue()); assertEquals(calendar.get(Calendar.DAY_OF_MONTH) + 5, today.getDay()); }
Source:
public String transform(String JSonPathExpression, String source) throws TransformationException { if (JSonPathExpression == null || source == null) { throw new TransformationException("the given parameters 'JSonPath' and 'source' must not be null"); } logger.debug("about to transform '{}' by the function '{}'", source, JSonPathExpression); try { String transformationResult = JsonPath.read(source, JSonPathExpression); logger.debug("transformation resulted in '{}'", transformationResult); return transformationResult; } catch(InvalidPathException e) { logger.error(e.getMessage()); return null; } }

Target:
public String transform(String JSonPathExpression, String source) throws TransformationException { if (JSonPathExpression == null || source == null) { throw new TransformationException("the given parameters 'JSonPath' and 'source' must not be null"); } logger.debug("about to transform '{}' by the function '{}'", source, JSonPathExpression); try { String transformationResult = JsonPath.read(source, JSonPathExpression); logger.debug("transformation resulted in '{}'", transformationResult); return transformationResult; } catch(InvalidPathException e) { throw new TransformationException("An error occured while transforming JSON expression.", e); } }
Source:
private JsonNode deserializeResponseBody(Operation operation, StatusLine statusLine, String responseBody) { JsonNode operationResult; try { operationResult = mapper.readTree(responseBody); } catch (IOException ioe) { String failureDescription = ""; if (statusLine.getStatusCode() == 503) { failureDescription = "Server not available [" + statusAsString(statusLine) + "]"; LOG.info(failureDescription); } else { failureDescription = "Failed to deserialize response to " + operation + " to JsonNode - response status was " + statusAsString(statusLine) + ", and body was [" + responseBody + "]: " + ioe; LOG.error(failureDescription); } operationResult = resultAsJsonNode(FAILURE, failureDescription, ioe, responseBody.contains("rolled-back=true")); } return operationResult; }

Target:
private JsonNode deserializeResponseBody(Operation operation, StatusLine statusLine, String responseBody) { JsonNode operationResult; try { operationResult = mapper.readTree(responseBody); } catch (IOException ioe) { String failureDescription = ""; if (statusLine.getStatusCode() == 503) { failureDescription = "Server not available [" + statusAsString(statusLine) + "]"; } else { failureDescription = "Failed to deserialize response to " + operation + " to JsonNode - response status was " + statusAsString(statusLine) + ", and body was [" + responseBody + "]: " + ioe; } LOG.error(failureDescription); operationResult = resultAsJsonNode(FAILURE, failureDescription, ioe, responseBody.contains("rolled-back=true")); } return operationResult; }
Source:
public boolean lock(String id) { File file = new File(directory, String.format(".%s.lock", prefix)); try { if (file.createNewFile()) { try (FileBuffer buffer = FileBuffer.allocate(file)) { buffer.writeString(id); } return true; } else { try (FileBuffer buffer = FileBuffer.allocate(file)) { return buffer.readString().equals(id); } } } catch (IOException e) { throw new StorageException("Failed to acquire storage lock"); } }

Target:
public boolean lock(String id) { File file = new File(directory, String.format(".%s.lock", prefix)); try { if (file.createNewFile()) { try (FileBuffer buffer = FileBuffer.allocate(file)) { buffer.writeString(id).flush(); } return true; } else { try (FileBuffer buffer = FileBuffer.allocate(file)) { String lock = buffer.readString(); return lock != null && lock.equals(id); } } } catch (IOException e) { throw new StorageException("Failed to acquire storage lock"); } }
Source:
public void testAddUser() throws MiddlewareQueryException { final User user = UserDataManagerImplTest.userTDI.createUser(); this.userDataManager.addUser(user); final User resultUser = this.userDataManager.getUserById(user.getUserid()); Assert.assertEquals("The user ids should be equal.", user.getUserid(), resultUser.getUserid()); Assert.assertEquals("The usernames should be equal.", user.getName(), resultUser.getName()); Assert.assertEquals("The Passwords should be equal.", user.getPassword(), resultUser.getPassword()); Assert.assertEquals("The install ids should be equal.", user.getInstalid(), resultUser.getInstalid()); Assert.assertEquals("The status values should be equal.", user.getStatus(), resultUser.getStatus()); Assert.assertEquals("The access values should be equal.", user.getAccess(), resultUser.getAccess()); Assert.assertEquals("The type values should be equal.", user.getType(), resultUser.getType()); Assert.assertEquals("The assign dates should be equal.", user.getAssignDate(), resultUser.getAssignDate()); Assert.assertEquals("The close dates should be equal.", user.getCloseDate(), resultUser.getCloseDate()); }

Target:
public void testAddUser() throws MiddlewareQueryException { final User user = UserDataManagerImplTest.userTestDataInitializer.createUser(); this.userDataManager.addUser(user); final User resultUser = this.userDataManager.getUserById(user.getUserid()); Assert.assertEquals("The user ids should be equal.", user.getUserid(), resultUser.getUserid()); Assert.assertEquals("The usernames should be equal.", user.getName(), resultUser.getName()); Assert.assertEquals("The Passwords should be equal.", user.getPassword(), resultUser.getPassword()); Assert.assertEquals("The install ids should be equal.", user.getInstalid(), resultUser.getInstalid()); Assert.assertEquals("The status values should be equal.", user.getStatus(), resultUser.getStatus()); Assert.assertEquals("The access values should be equal.", user.getAccess(), resultUser.getAccess()); Assert.assertEquals("The type values should be equal.", user.getType(), resultUser.getType()); Assert.assertEquals("The assign dates should be equal.", user.getAssignDate(), resultUser.getAssignDate()); Assert.assertEquals("The close dates should be equal.", user.getCloseDate(), resultUser.getCloseDate()); }
Source:
public Result doWork() { final boolean isRunOnce = getInputData().getBoolean(PARAM_RUN_ONCE, false); Log.d(TAG, "doWork() : isRunOnce = " + isRunOnce); ClientConfig.initialize(getApplicationContext()); if (NetworkUtils.networkAvailable() && NetworkUtils.isFeedRefreshAllowed()) { List<Feed> feeds = new ArrayList<>(); Map<Long, FeedItem> lastItemsMap = new HashMap<>(); for (Feed feed : DBReader.getFeedList()) { FeedPreferences prefs = feed.getPreferences(); if (prefs.getKeepUpdated() && prefs.getShowNotification()) { List<FeedItem> outdatedFeedItems = DBReader.getFeedItemList(feed); if (!outdatedFeedItems.isEmpty()) { FeedItem newestEpisode = outdatedFeedItems.get(0); lastItemsMap.put(feed.getId(), newestEpisode); } feeds.add(feed); } } this.feeds = feeds; this.lastItemsMap = lastItemsMap; EventBus.getDefault().register(this); DBTasks.refreshAllFeeds(getApplicationContext(), false); } else { Log.d(TAG, "Blocking automatic update: no wifi available / no mobile updates allowed"); } if (!isRunOnce && UserPreferences.isAutoUpdateTimeOfDay()) { AutoUpdateManager.restartUpdateAlarm(getApplicationContext()); } return Result.success(); }

Target:
public Result doWork() { final boolean isRunOnce = getInputData().getBoolean(PARAM_RUN_ONCE, false); Log.d(TAG, "doWork() : isRunOnce = " + isRunOnce); ClientConfig.initialize(getApplicationContext()); if (NetworkUtils.networkAvailable() && NetworkUtils.isFeedRefreshAllowed()) { DBTasks.refreshAllFeeds(getApplicationContext(), false); } else { Log.d(TAG, "Blocking automatic update: no wifi available / no mobile updates allowed"); } if (!isRunOnce && UserPreferences.isAutoUpdateTimeOfDay()) { AutoUpdateManager.restartUpdateAlarm(getApplicationContext()); } return Result.success(); }
Source:
public BlockingQueue<Operation> create() { return new BytesBoundedLinkedQueue<Operation>(maxQueueSize) { @Override public long getBytesSize(Operation operation) { return operation.getBuffer().capacity(); } }; }

Target:
public BlockingQueue<Operation> create() { return new BytesBoundedLinkedQueue<Operation>(maxQueueSize) { @Override public long getBytesSize(Operation operation) { return operation.getBuffer().remaining(); } }; }
Source:
private Jar getJavadoc(Tool tool, Processor context, String path, Map<String, String> options, boolean exports) throws Exception { Jar jar = toJar(context, path); if (path != null && jar == null) { logger.warn( "A javadoc path was set in the -maven-release instuction, but no javadoc could be found in (base path: {}) ", path, context.getBaseURI() .toString()); } if (jar == null) { jar = tool.doJavadoc(options, exports); } jar.ensureManifest(); jar.setName(Archive.JAVADOC_CLASSIFIER); tool.addClose(jar); return jar; }

Target:
private Jar getJavadoc(Tool tool, Processor context, String path, Map<String, String> options, boolean exports) throws Exception { Jar jar = toJar(context, path); if (path != null && jar == null) { logger.warn( "A javadoc path was set in the -maven-release instuction, but no javadoc could be found in (base path: {}) ", path, context.getBase()); } if (jar == null) { jar = tool.doJavadoc(options, exports); } jar.ensureManifest(); jar.setName(Archive.JAVADOC_CLASSIFIER); tool.addClose(jar); return jar; }
Source:
public static InternalCompletableFuture<Object> invokeOnStableClusterSerial(NodeEngine nodeEngine, Supplier<? extends Operation> operationSupplier, int maxRetries) { ClusterService clusterService = nodeEngine.getClusterService(); if (!clusterService.isJoined()) { return newCompletedFuture(true); } RestartingMemberIterator memberIterator = new RestartingMemberIterator(clusterService, maxRetries); InvokeOnMemberFunction invokeOnMemberFunction = new InvokeOnMemberFunction(operationSupplier, nodeEngine, memberIterator); Iterator<InternalCompletableFuture<Object>> invocationIterator = map(memberIterator, invokeOnMemberFunction); return new ChainingFuture(invocationIterator, memberIterator); }

Target:
public static InternalCompletableFuture<Object> invokeOnStableClusterSerial(NodeEngine nodeEngine, Supplier<? extends Operation> operationSupplier, int maxRetries) { ClusterService clusterService = nodeEngine.getClusterService(); if (!clusterService.isJoined()) { return newCompletedFuture(null); } RestartingMemberIterator memberIterator = new RestartingMemberIterator(clusterService, maxRetries); InvokeOnMemberFunction invokeOnMemberFunction = new InvokeOnMemberFunction(operationSupplier, nodeEngine, memberIterator); Iterator<InternalCompletableFuture<Object>> invocationIterator = map(memberIterator, invokeOnMemberFunction); return new ChainingFuture(invocationIterator, memberIterator); }
Source:
private void extractGetterForColumn(ColumnSchema columnSchema, Field fieldDefinition) { Type columnType = columnSchema.getType(); Class pojoClass = getTuplePayloadClass(); Object getter = null; switch ( columnType ) { case BINARY: getter = PojoUtils.createGetter(pojoClass, fieldDefinition.getName(), ByteBuffer.class); break; case STRING: getter = PojoUtils.createGetter(pojoClass, fieldDefinition.getName(), String.class); break; case BOOL: getter = PojoUtils.createGetterBoolean(pojoClass, fieldDefinition.getName()); break; case DOUBLE: getter = PojoUtils.createGetterDouble(pojoClass, fieldDefinition.getName()); break; case FLOAT: getter = PojoUtils.createGetterFloat(pojoClass, fieldDefinition.getName()); break; case INT8: getter = PojoUtils.createGetterByte(pojoClass, fieldDefinition.getName()); break; case INT16: getter = PojoUtils.createGetterShort(pojoClass, fieldDefinition.getName()); break; case INT32: getter = PojoUtils.createGetterInt(pojoClass, fieldDefinition.getName()); break; case INT64: case UNIXTIME_MICROS: getter = PojoUtils.createGetterLong(pojoClass, fieldDefinition.getName()); break; default: break; } if (getter != null) { kuduColumnBasedGetters.put(columnSchema.getName(),getter); } }

Target:
private void extractGetterForColumn(ColumnSchema columnSchema, Field fieldDefinition) { Type columnType = columnSchema.getType(); Class pojoClass = getTuplePayloadClass(); Object getter = null; switch ( columnType ) { case BINARY: getter = PojoUtils.createGetter(pojoClass, fieldDefinition.getName(), ByteBuffer.class); break; case STRING: getter = PojoUtils.createGetter(pojoClass, fieldDefinition.getName(), String.class); break; case BOOL: getter = PojoUtils.createGetterBoolean(pojoClass, fieldDefinition.getName()); break; case DOUBLE: getter = PojoUtils.createGetterDouble(pojoClass, fieldDefinition.getName()); break; case FLOAT: getter = PojoUtils.createGetterFloat(pojoClass, fieldDefinition.getName()); break; case INT8: getter = PojoUtils.createGetterByte(pojoClass, fieldDefinition.getName()); break; case INT16: getter = PojoUtils.createGetterShort(pojoClass, fieldDefinition.getName()); break; case INT32: getter = PojoUtils.createGetterInt(pojoClass, fieldDefinition.getName()); break; case INT64: case UNIXTIME_MICROS: getter = PojoUtils.createGetterLong(pojoClass, fieldDefinition.getName()); break; default: LOG.error(fieldDefinition.getName() + " has a data type that is not yet supported"); throw new UnsupportedOperationException(fieldDefinition.getName() + " does not have a compatible data type"); } if (getter != null) { kuduColumnBasedGetters.put(columnSchema.getName(),getter); } }
Source:
@Nullable Map<String, Integer> getIdMap() { return ids; }

Target:
@NonNull Map<String, Integer> getIdMap() { return ids; }
Source:
public void testParameterException() throws Exception { ModelImpl m = factory.getModel("powerlaw1d", "p1d"); m.getParameter("foo"); }

Target:
public void testParameterException() throws Exception { Model m = factory.getModel("powerlaw", "p1d"); try { m.findParameter("foo"); } catch (NoSuchElementException ex) { return; } fail("Should have thrown exception"); }
Source:
public void cleanUp() { rdbi.withHandle(new Callback<Void>() { @Override public Void run(Handle handle) { Set<String> missing = handle.jedis().smembers(cacheMissingKey()); for (String rawKey : missing) { KeyType key = keyTypeSerializationHelper.decode(rawKey); refresh(key); } return null; } }); }

Target:
public void cleanUp() { Set<KeyType> missing = getMissing(); for (KeyType key : missing) { refresh(key); } }
Source:
public void evaluate_shouldReturnTheFullNameOfAPatient() throws Exception { Person person = new Person(); Patient patient = Context.getPatientService().getPatient(8); Assert.assertNotNull("The patient was not found",patient); MohNamesRule mohNamesRule = new MohNamesRule(); String patientName = mohNamesRule.evaluate(null,patient.getId(),null).toString(); Assert.assertEquals("A different name was returned for the patient","Anet Test Oloo",patientName); }

Target:
public void evaluate_shouldReturnTheFullNameOfAPatient() throws Exception { Patient patient = Context.getPatientService().getPatient(8); Assert.assertNotNull("The patient was not found",patient); MohNamesRule mohNamesRule = new MohNamesRule(); Result expected =new Result("Anet Test Oloo"); Result actual = mohNamesRule.evaluate(null,patient.getId(),null); Assert.assertNotNull("No name was found for the patient",actual); Assert.assertEquals("A different name was returned for the patient",expected,actual); }
Source:
public DruidSchema( final QueryLifecycleFactory queryLifecycleFactory, final TimelineServerView serverView, final PlannerConfig config, final ViewManager viewManager, final Escalator escalator ) { this.queryLifecycleFactory = Preconditions.checkNotNull(queryLifecycleFactory, "queryLifecycleFactory"); Preconditions.checkNotNull(serverView, "serverView"); this.config = Preconditions.checkNotNull(config, "config"); this.viewManager = Preconditions.checkNotNull(viewManager, "viewManager"); this.cacheExec = ScheduledExecutors.fixed(1, "DruidSchema-Cache-%d"); this.tables = new ConcurrentHashMap<>(); this.escalator = escalator; serverView.registerTimelineCallback( MoreExecutors.sameThreadExecutor(), new TimelineServerView.TimelineCallback() { @Override public ServerView.CallbackAction timelineInitialized() { synchronized (lock) { isServerViewInitialized = true; lock.notifyAll(); } return ServerView.CallbackAction.CONTINUE; } @Override public ServerView.CallbackAction segmentAdded(final DruidServerMetadata server, final DataSegment segment) { addSegment(server, segment); return ServerView.CallbackAction.CONTINUE; } @Override public ServerView.CallbackAction segmentRemoved(final DataSegment segment) { removeSegment(segment); return ServerView.CallbackAction.CONTINUE; } @Override public ServerView.CallbackAction serverSegmentRemoved( final DruidServerMetadata server, final DataSegment segment ) { removeSegment(server, segment); return ServerView.CallbackAction.CONTINUE; } } ); }

Target:
public DruidSchema( final QueryLifecycleFactory queryLifecycleFactory, final TimelineServerView serverView, final PlannerConfig config, final ViewManager viewManager, final Escalator escalator ) { this.queryLifecycleFactory = Preconditions.checkNotNull(queryLifecycleFactory, "queryLifecycleFactory"); Preconditions.checkNotNull(serverView, "serverView"); this.config = Preconditions.checkNotNull(config, "config"); this.viewManager = Preconditions.checkNotNull(viewManager, "viewManager"); this.cacheExec = ScheduledExecutors.fixed(1, "DruidSchema-Cache-%d"); this.tables = new ConcurrentHashMap<>(); this.escalator = escalator; serverView.registerTimelineCallback( MoreExecutors.sameThreadExecutor(), new TimelineServerView.TimelineCallback() { @Override public ServerView.CallbackAction timelineInitialized() { synchronized (lock) { isServerViewInitialized = true; lock.notifyAll(); } return ServerView.CallbackAction.CONTINUE; } @Override public ServerView.CallbackAction segmentAdded(final DruidServerMetadata server, final DataSegment segment) { addSegment(server, segment); return ServerView.CallbackAction.CONTINUE; } @Override public ServerView.CallbackAction segmentRemoved(final DataSegment segment) { removeSegment(segment); return ServerView.CallbackAction.CONTINUE; } @Override public ServerView.CallbackAction serverSegmentRemoved( final DruidServerMetadata server, final DataSegment segment ) { removeServerSegment(server, segment); return ServerView.CallbackAction.CONTINUE; } } ); }
Source:
public static Integer getGenotypeInteger(final Genotype g, final String fieldName, final int defaultValue) { final Object genotypeExtendedAttribute = g.getExtendedAttribute(fieldName, VCFConstants.MISSING_VALUE_v4); final String genotypePArtifactAsString = String.valueOf(genotypeExtendedAttribute); if ((genotypePArtifactAsString == null) || (genotypePArtifactAsString.equals(VCFConstants.MISSING_VALUE_v4))) { return defaultValue; } return Integer.parseInt(genotypePArtifactAsString); }

Target:
public static Integer getGenotypeInteger(final Genotype g, final String fieldName, final int defaultValue) { Utils.nonNull(g); final String genotypeFieldAsString = getGenotypeString(g, fieldName); return isVcfGenotypeFieldEmpty(genotypeFieldAsString) ? defaultValue : Integer.parseInt(genotypeFieldAsString); }
Source:
String summaryString(Response response) { try { if (response.getExample() != null) return response.getFormulaAnswer(); if (response.getLines().size() > 0) return response.getLines().get(0); } catch (Exception e) { return null; } return null; }

Target:
String summaryString(Response response) { if (response.getExample() != null) return response.getFormulaAnswer(); if (response.getLines().size() > 0) return response.getLines().get(0); return null; }
Source:
public boolean canFlipToNextPage() { boolean canFlip = !ResourcesPlugin.getWorkspace().getRoot().exists(getContainerFullPath().append(this.getFileName().toLowerCase())); if (!canFlip) { this.setErrorMessage(Messages.NewModelFilePage_page_same_case_desc + getFileName().toLowerCase()); } return canFlip; }

Target:
public boolean canFlipToNextPage() { boolean canFlip = true; String existingModelName = ""; for (String existingName : getExistingNames()) { if (existingName.toLowerCase().equals(getFileName().toLowerCase())) { canFlip = false; existingModelName = existingName; break; } } if (!canFlip) { this.setErrorMessage(Messages.NewModelFilePage_page_same_case_desc + existingModelName); } return canFlip; }
Source:
private void setSlowThresholds(Configuration c) { slowIndexPrepareThreshold = c.getLong(INDEXER_INDEX_WRITE_SLOW_THRESHOLD_KEY, INDEXER_INDEX_WRITE_SLOW_THRESHOLD_DEFAULT); slowIndexWriteThreshold = c.getLong(INDEXER_INDEX_PREPARE_SLOW_THRESHOLD_KEY, INDEXER_INDEX_PREPARE_SLOW_THREHSOLD_DEFAULT); slowPostOpenThreshold = c.getLong(INDEXER_POST_OPEN_SLOW_THRESHOLD_KEY, INDEXER_POST_OPEN_SLOW_THRESHOLD_DEFAULT); slowPreIncrementThreshold = c.getLong(INDEXER_PRE_INCREMENT_SLOW_THRESHOLD_KEY, INDEXER_PRE_INCREMENT_SLOW_THRESHOLD_DEFAULT); }

Target:
private void setSlowThresholds(Configuration c) { slowIndexPrepareThreshold = c.getLong(INDEXER_INDEX_WRITE_SLOW_THRESHOLD_KEY, INDEXER_INDEX_WRITE_SLOW_THRESHOLD_DEFAULT); slowIndexWriteThreshold = c.getLong(INDEXER_INDEX_PREPARE_SLOW_THRESHOLD_KEY, INDEXER_INDEX_PREPARE_SLOW_THREHSOLD_DEFAULT); slowPreWALRestoreThreshold = c.getLong(INDEXER_PRE_WAL_RESTORE_SLOW_THRESHOLD_KEY, INDEXER_PRE_WAL_RESTORE_SLOW_THRESHOLD_DEFAULT); slowPostOpenThreshold = c.getLong(INDEXER_POST_OPEN_SLOW_THRESHOLD_KEY, INDEXER_POST_OPEN_SLOW_THRESHOLD_DEFAULT); slowPreIncrementThreshold = c.getLong(INDEXER_PRE_INCREMENT_SLOW_THRESHOLD_KEY, INDEXER_PRE_INCREMENT_SLOW_THRESHOLD_DEFAULT); }
Source:
private void setupDialog() { dialog = new Dialog<String>(); dialog.setTitle("About DNAinator"); dialog.getDialogPane().getStylesheets().add(getClass().getResource(STYLE).toString()); Stage stage = (Stage) dialog.getDialogPane().getScene().getWindow(); Image icon = new Image(this.getClass().getResourceAsStream(ICON)); stage.getIcons().add(icon); ImageView img = new ImageView(); img.setImage(icon); dialog.setGraphic(img); readProperties(); dialog.setHeaderText("DNAinator\nDNA network visualization tool"); dialog.setContentText(contentText()); ButtonType close = new ButtonType("Close", ButtonData.CANCEL_CLOSE); dialog.getDialogPane().getButtonTypes().add(close); }

Target:
private void setupDialog() { this.setTitle("About DNAinator"); this.setResizable(true); this.getDialogPane().getStylesheets().add(getClass().getResource(STYLE).toString()); this.initOwner(parent.getScene().getWindow()); ImageView img = new ImageView(); img.setImage(new Image(getClass().getResourceAsStream(LOGO))); this.setGraphic(img); readProperties(); this.setHeaderText("DNAinator\nDNA network visualization tool"); this.setContentText(contentText()); ButtonType close = new ButtonType("Close", ButtonData.CANCEL_CLOSE); this.getDialogPane().getButtonTypes().add(close); }
Source:
public void writeUrls(URI baseUri) { super.writeUrls(baseUri); if (getTissueOriginId() != null) { setTissueOriginUrl( UriComponentsBuilder.fromUri(baseUri).path("/rest/tissueorigin/{id}").buildAndExpand(getTissueOriginId()).toUriString()); } if (getTissueTypeId() != null) { setTissueTypeUrl(UriComponentsBuilder.fromUri(baseUri).path("/rest/tissuetype/{id}").buildAndExpand(getTissueTypeId()).toUriString()); } }

Target:
public void writeUrls(URI baseUri) { super.writeUrls(baseUri); if (getTissueOriginId() != null) { setTissueOriginUrl( UriComponentsBuilder.fromUri(baseUri).path("/rest/tissueorigin/{id}").buildAndExpand(getTissueOriginId()).toUriString()); } if (getTissueTypeId() != null) { setTissueTypeUrl(UriComponentsBuilder.fromUri(baseUri).path("/rest/tissuetype/{id}").buildAndExpand(getTissueTypeId()).toUriString()); } if (getTissueMaterialId() != null) { setTissueMaterialUrl( UriComponentsBuilder.fromUri(baseUri).path("/rest/tissuematerial/{id}").buildAndExpand(getTissueMaterialId()).toUriString()); } if (getLabId() != null) { setLabUrl(UriComponentsBuilder.fromUri(baseUri).path("/rest/lab/{id}").buildAndExpand(getLabId()).toUriString()); } }
Source:
protected boolean removeVmLease(Guid leaseStorageDomainId, Guid vmId) { if (leaseStorageDomainId == null) { return true; } return runInternalAction( VdcActionType.RemoveVmLease, new VmLeaseParameters(getStoragePoolId(), leaseStorageDomainId, vmId) ).getSucceeded(); }

Target:
protected boolean removeVmLease(Guid leaseStorageDomainId, Guid vmId) { if (leaseStorageDomainId == null) { return true; } return runInternalActionWithTasksContext( VdcActionType.RemoveVmLease, new VmLeaseParameters(getStoragePoolId(), leaseStorageDomainId, vmId) ).getSucceeded(); }
Source:
private static void setBlobPropertiesHeaders(BlobProperties blobProperties, RestResponseChannel restResponseChannel) throws RestServiceException { restResponseChannel.setHeader(RestUtils.Headers.BLOB_SIZE, blobProperties.getBlobSize()); restResponseChannel.setHeader(RestUtils.Headers.SERVICE_ID, blobProperties.getServiceId()); restResponseChannel.setHeader(RestUtils.Headers.CREATION_TIME, new Date(blobProperties.getCreationTimeInMs())); restResponseChannel.setHeader(RestUtils.Headers.PRIVATE, blobProperties.isPrivate()); if (blobProperties.getTimeToLiveInSeconds() != Utils.Infinite_Time) { restResponseChannel.setHeader(RestUtils.Headers.TTL, Long.toString(blobProperties.getTimeToLiveInSeconds())); } if (blobProperties.getContentType() != null) { restResponseChannel.setHeader(RestUtils.Headers.AMBRY_CONTENT_TYPE, blobProperties.getContentType()); } if (blobProperties.getOwnerId() != null) { restResponseChannel.setHeader(RestUtils.Headers.OWNER_ID, blobProperties.getOwnerId()); } }

Target:
private void setBlobPropertiesHeaders(BlobProperties blobProperties, RestResponseChannel restResponseChannel) throws RestServiceException { restResponseChannel.setHeader(RestUtils.Headers.BLOB_SIZE, blobProperties.getBlobSize()); restResponseChannel.setHeader(RestUtils.Headers.SERVICE_ID, blobProperties.getServiceId()); restResponseChannel.setHeader(RestUtils.Headers.CREATION_TIME, new Date(blobProperties.getCreationTimeInMs())); restResponseChannel.setHeader(RestUtils.Headers.PRIVATE, blobProperties.isPrivate()); if (blobProperties.getTimeToLiveInSeconds() != Utils.Infinite_Time) { restResponseChannel.setHeader(RestUtils.Headers.TTL, Long.toString(blobProperties.getTimeToLiveInSeconds())); } if (blobProperties.getContentType() != null) { restResponseChannel.setHeader(RestUtils.Headers.AMBRY_CONTENT_TYPE, blobProperties.getContentType()); } if (blobProperties.getOwnerId() != null) { restResponseChannel.setHeader(RestUtils.Headers.OWNER_ID, blobProperties.getOwnerId()); } }
Source:
public List<Map<String, Object>> getServices(String applicationID) { List<Service> services = configAdmin.listServices(getDefaultFactoryLdapFilter(), getDefaultLdapFilter()); List<Map<String, Object>> returnValues = new ArrayList<Map<String, Object>>(); BundleContext context = getContext(); if (!services.isEmpty()) { Application app = appService.getApplication(applicationID); MetaTypeService metatypeService = getMetaTypeService(); if (app != null) { try { Set<BundleInfo> bundles = app.getBundles(); Set<String> bundleLocations = new HashSet<String>(); Set<MetaTypeInformation> metatypeInformation = new HashSet<MetaTypeInformation>(); for (BundleInfo info : bundles) { bundleLocations.add(info.getLocation()); } if (metatypeService != null) { for (Bundle bundle : context.getBundles()) { for (BundleInfo info : bundles) { if (info.getLocation().equals(bundle.getLocation())) { metatypeInformation.add(metatypeService.getMetaTypeInformation(bundle)); } } } } for (Map<String, Object> service : services) { if (service.containsKey("configurations")) { List<Map<String, Object>> configurations = (List<Map<String, Object>>) service.get("configurations"); for (Map<String, Object> item : configurations) { if (item.containsKey("bundle_location")) { String bundleLocation = (String) item.get("bundle_location"); if (bundleLocations.contains(bundleLocation)) { returnValues.add(service); break; } } } } else { if (checkForMetaTypesForService(metatypeInformation, service)) { returnValues.add(service); } } } } catch (ApplicationServiceException e) { LOGGER.warn("There was an error while trying to access the application", e); return new ArrayList<Map<String, Object>>(); } } } return returnValues; }

Target:
public List<Map<String, Object>> getServices(String applicationID) { List<Map<String, Object>> returnValues = new ArrayList<>(); List<Service> services = configAdmin.listServices(getDefaultFactoryLdapFilter(), getDefaultLdapFilter()); if (services.isEmpty()) { return returnValues; } Set<BundleInfo> bundleInfos = getBundleInfosForApplication(applicationID); if (bundleInfos == null) { return returnValues; } Set<String> bundleLocations = new HashSet<>(); for (BundleInfo each : bundleInfos) { bundleLocations.add(each.getLocation()); } MetaTypeService metatypeService = getMetaTypeService(); Set<MetaTypeInformation> metatypeInformation = new HashSet<>(); if (metatypeService != null) { for (Bundle each : getContext().getBundles()) { for (BundleInfo bundleInfo : bundleInfos) { if (bundleInfo.getLocation().equals(each.getLocation())) { metatypeInformation.add(metatypeService.getMetaTypeInformation(each)); } } } } for (Map<String, Object> each : services) { if (each.containsKey("configurations")) { List<Map<String, Object>> configurations = (List<Map<String, Object>>) each.get("configurations"); for (Map<String, Object> item : configurations) { if (item.containsKey("bundle_location")) { String bundleLocation = (String) item.get("bundle_location"); if (bundleLocations.contains(bundleLocation)) { returnValues.add(each); break; } } } } else { if (checkForMetaTypesForService(metatypeInformation, each)) { returnValues.add(each); } } } return returnValues; }
Source:
public void revive() { if (state == CLOSED) { transitionTo(CREATED); } else { throw new IllegalStateException("Illegal state " + state() + " while committing standby task " + id); } }

Target:
public void revive() { if (state == CLOSED) { transitionTo(CREATED); } else { throw new IllegalStateException("Illegal state " + state() + " while reviving task " + id); } }
Source:
public void check(TopicName topicName, byte[] message) { Optional.ofNullable(topicsWithValidators.get(topicName)).ifPresent(validator -> { Timer.Context globalValidationTimerContext = hermesMetrics.timer(Timers.PRODUCER_VALIDATION_LATENCY).time(); Timer.Context topicValidationTimerContext = hermesMetrics.timer(Timers.PRODUCER_VALIDATION_LATENCY, topicName).time(); try { validator.check(message); } finally { globalValidationTimerContext.stop(); topicValidationTimerContext.stop(); } }); }

Target:
public void check(TopicName topicName, byte[] message) { Optional.ofNullable(topicsWithValidators.get(topicName)).ifPresent(validator -> { try (Timer.Context globalValidationTimerContext = hermesMetrics.timer(Timers.PRODUCER_VALIDATION_LATENCY).time(); Timer.Context topicValidationTimerContext = hermesMetrics.timer(Timers.PRODUCER_VALIDATION_LATENCY, topicName).time()) { validator.check(message); } }); }
Source:
public void checkElementsAreAdded(){ FormField testNullField = null; Assert.assertEquals(false, testGroup.addElement(testNullField)); FormField testField = mock(FormField.class); Assert.assertEquals(true, testGroup.addElement(testField)); Assert.assertTrue(testGroup.elements.contains(testField)); }

Target:
public void checkElementsAreAdded(){ Assert.assertFalse(testGroup.addElement(null)); FormField testField = mock(FormField.class); Assert.assertTrue(testGroup.addElement(testField)); Assert.assertTrue(testGroup.elements.contains(testField)); }
Source:
public String toString() { return MoreObjects.toStringHelper("InjectionPoint") .add("source", this.source) .add("type", this.type) .add("annotations", Arrays.toString(this.annotations)) .toString(); }

Target:
public String toString() { return MoreObjects.toStringHelper(this) .add("source", this.source) .add("type", this.type) .add("annotations", Arrays.toString(this.annotations)) .toString(); }