auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void mouseMove(NatTable natTable, MouseEvent event) { Rectangle clientArea = natTable.getClientAreaProvider().getClientArea(); int x = event.x; int y = event.y; MoveDirectionEnum horizontal = MoveDirectionEnum.NONE; if (event.x < 0) { horizontal = MoveDirectionEnum.LEFT; x = 0; } else if (event.x > clientArea.width) { horizontal = MoveDirectionEnum.RIGHT; x = clientArea.width; } MoveDirectionEnum vertical = MoveDirectionEnum.NONE; if (event.y < 0) { vertical = MoveDirectionEnum.UP; y = 0; } else if (event.y > clientArea.height) { vertical = MoveDirectionEnum.DOWN; y = clientArea.height - 1; } if (!MoveDirectionEnum.NONE.equals(horizontal) || !MoveDirectionEnum.NONE.equals(vertical)) { this.lastDragInCellPosition = null; } if (natTable.doCommand(new ViewportDragCommand(horizontal, vertical))) { int selectedColumnPosition = natTable.getColumnPositionByX(x); int selectedRowPosition = natTable.getRowPositionByY(y); if (selectedColumnPosition > -1 && selectedRowPosition > -1) { Point dragInCellPosition = new Point(selectedColumnPosition, selectedRowPosition); if (this.lastDragInCellPosition == null || !dragInCellPosition.equals(this.lastDragInCellPosition)) { this.lastDragInCellPosition = dragInCellPosition; fireSelectionCommand(natTable, selectedColumnPosition, selectedRowPosition, true, false); } } } }

Target:
public void mouseMove(NatTable natTable, MouseEvent event) { Rectangle clientArea = natTable.getClientAreaProvider().getClientArea(); int x = event.x; int y = event.y; MoveDirectionEnum horizontal = MoveDirectionEnum.NONE; if (event.x < 0) { horizontal = MoveDirectionEnum.LEFT; x = 0; } else if (event.x > clientArea.width) { horizontal = MoveDirectionEnum.RIGHT; x = clientArea.width; } MoveDirectionEnum vertical = MoveDirectionEnum.NONE; if (event.y < 0) { vertical = MoveDirectionEnum.UP; y = 0; } else if (event.y > clientArea.height) { vertical = MoveDirectionEnum.DOWN; y = clientArea.height; } if (!MoveDirectionEnum.NONE.equals(horizontal) || !MoveDirectionEnum.NONE.equals(vertical)) { this.lastDragInCellPosition = null; } if (natTable.doCommand(new ViewportDragCommand(horizontal, vertical))) { int selectedColumnPosition = natTable.getColumnPositionByX(x); int selectedRowPosition = natTable.getRowPositionByY(y); if (selectedColumnPosition > -1 && selectedRowPosition > -1) { Point dragInCellPosition = new Point(selectedColumnPosition, selectedRowPosition); if (this.lastDragInCellPosition == null || !dragInCellPosition.equals(this.lastDragInCellPosition)) { this.lastDragInCellPosition = dragInCellPosition; fireSelectionCommand(natTable, selectedColumnPosition, selectedRowPosition, true, false); } } } }
Source:
public Class<? extends NNode> getNNodeClass() { return null; }

Target:
public Class<? extends NNode> getNNodeClass() throws InvalidTokenException { throw new InvalidTokenException("No node coresponding to token " + this.toString()); }
Source:
public void truncate(long toDeleteInclusive) { currentLog.truncate(toDeleteInclusive); }

Target:
public void truncate(long toDeleteInclusive) { log.warn("Tried to truncate paxos state log with an implementation that does not support truncations."); }
Source:
private static Iterator<CliCommand> getAllCommands() { final ServiceLoader<CliCommand> loader = ServiceLoader.load(CliCommand.class); return loader.iterator(); }

Target:
private static Iterable<CliCommand> getAllCommands() { return ServiceLoader.load(CliCommand.class); }
Source:
public boolean performFinish() { final ConnectProviderOperation op = new ConnectProviderOperation( existingPage.getProjects(true)); try { getContainer().run(true, false, new IRunnableWithProgress() { public void run(final IProgressMonitor monitor) throws InvocationTargetException { try { op.execute(monitor); PlatformUI.getWorkbench().getDisplay().syncExec( new Runnable() { public void run() { Set<File> filesToAdd = new HashSet<File>(); for (Entry<IProject, File> entry : existingPage .getProjects(true).entrySet()) { filesToAdd.add(entry.getValue()); } for (File file : filesToAdd) Activator.getDefault() .getRepositoryUtil() .addConfiguredRepository( file); } }); } catch (CoreException ce) { throw new InvocationTargetException(ce); } } }); return true; } catch (Throwable e) { if (e instanceof InvocationTargetException) { e = e.getCause(); } if (e instanceof CoreException) { IStatus status = ((CoreException) e).getStatus(); e = status.getException(); } Activator.handleError(UIText.SharingWizard_failed, e, true); return false; } }

Target:
public boolean performFinish() { final ConnectProviderOperation op = new ConnectProviderOperation( existingPage.getProjects(true)); try { getContainer().run(true, false, new IRunnableWithProgress() { public void run(final IProgressMonitor monitor) throws InvocationTargetException { try { op.execute(monitor); PlatformUI.getWorkbench().getDisplay() .syncExec(new Runnable() { public void run() { Set<File> filesToAdd = new HashSet<File>(); for (Entry<IProject, File> entry : existingPage .getProjects(true).entrySet()) filesToAdd.add(entry.getValue()); for (File file : filesToAdd) Activator .getDefault() .getRepositoryUtil() .addConfiguredRepository( file); } }); } catch (CoreException ce) { throw new InvocationTargetException(ce); } } }); return true; } catch (Throwable e) { if (e instanceof InvocationTargetException) { e = e.getCause(); } if (e instanceof CoreException) { IStatus status = ((CoreException) e).getStatus(); e = status.getException(); } Activator.handleError(UIText.SharingWizard_failed, e, true); return false; } }
Source:
public void init() { try { LogSerialiser serialiser = new JacksonLogSerialiser(true); LogStore logStore = new MDCLogStore(serialiser); Logger logger = new LoggerImpl("com.zebedee.app"); LogConfig config = new Builder() .logger(logger) .dataNamespace("app.data") .logStore(logStore) .serialiser(serialiser) .create(); DPLogger.init(config); } catch (LoggingException ex) { System.err.println("failed to init DP Logger"); System.exit(1); } logInfo("inside CMS INIT").log(); logInfo("loading CMS feature flags").log(); CMSFeatureFlags.cmsFeatureFlags(); logInfo("Root.init()").log(); Root.init(); logInfo("ZebedeeReader.setCollectionReaderFactory").log(); ZebedeeReader.setCollectionReaderFactory(new ZebedeeCollectionReaderFactory(Root.zebedee)); logInfo("CollectionHistoryDaoFactory.initialise();").log(); CollectionHistoryDaoFactory.initialise(); logDebug("Zebedee Start up").log(); }

Target:
public void init() { try { LogSerialiser serialiser = new JacksonLogSerialiser(); LogStore logStore = new MDCLogStore(serialiser); Logger logger = new LoggerImpl("com.github.onsdigital.zebedee.cms"); LogConfig config = new Builder() .logger(logger) .dataNamespace("app.data") .logStore(logStore) .serialiser(serialiser) .create(); DPLogger.init(config); } catch (LoggingException ex) { System.err.println("failed to init DP Logger"); System.exit(1); } logInfo("inside CMS INIT").log(); logInfo("loading CMS feature flags").log(); CMSFeatureFlags.cmsFeatureFlags(); logInfo("Root.init()").log(); Root.init(); logInfo("ZebedeeReader.setCollectionReaderFactory").log(); ZebedeeReader.setCollectionReaderFactory(new ZebedeeCollectionReaderFactory(Root.zebedee)); logInfo("CollectionHistoryDaoFactory.initialise();").log(); CollectionHistoryDaoFactory.initialise(); logDebug("Zebedee Start up").log(); }
Source:
private CryptByteBufferType(int bitmask, KeyType keyType, int blockSize){ this.bitmask = bitmask; this.ivSize = -1; this.keyType = keyType; this.cipherName = keyType.alg; this.blockSize = blockSize; algName = name(); }

Target:
private CryptByteBufferType(int bitmask, KeyType keyType, int blockSize){ this.bitmask = bitmask; this.ivSize = null; this.keyType = keyType; this.cipherName = keyType.alg; this.blockSize = blockSize; algName = name(); }
Source:
private static SimpleFeatureCollection parseGeoJSON(InputStream in, CoordinateReferenceSystem crs) throws IOException { Map<String, Object> geojson = OM.readValue(in, TYPE_REF); in.close(); SimpleFeatureType schema = GeoJSONSchemaDetector.getSchema(geojson, crs); return GeoJSONReader2.toFeatureCollection(geojson, schema); }

Target:
private static SimpleFeatureCollection parseGeoJSON(InputStream in, CoordinateReferenceSystem crs) throws IOException { Map<String, Object> geojson = OM.readValue(in, TYPE_REF); SimpleFeatureType schema = GeoJSONSchemaDetector.getSchema(geojson, crs); return GeoJSONReader2.toFeatureCollection(geojson, schema); }
Source:
public boolean apply(Game game, Ability source) { UUID defenderId = game.getCombat().getDefenderId(source.getSourceId()); if (defenderId != null) { FilterCreaturePermanent filter = new FilterCreaturePermanent(); filter.add(new ControllerIdPredicate(defenderId)); for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) { permanent.untap(game); } return true; } return false; }

Target:
public boolean apply(Game game, Ability source) { UUID defenderId = game.getCombat().getDefendingPlayerId(source.getSourceId(), game); if (defenderId != null) { FilterCreaturePermanent filter = new FilterCreaturePermanent(); filter.add(new ControllerIdPredicate(defenderId)); for (Permanent permanent : game.getBattlefield().getActivePermanents(filter, source.getControllerId(), source.getSourceId(), game)) { permanent.untap(game); } return true; } return false; }
Source:
public OutputStream getOutputStream() throws Exception { String tempOutputFilePath = outputFilePath; String extension = RepositoryFilenameUtils.getExtension( tempOutputFilePath ); if ( "*".equals( extension ) ) { tempOutputFilePath = tempOutputFilePath.substring( 0, tempOutputFilePath.lastIndexOf( '.' ) ); if ( appendDateFormat != null ) { try { Date date = new Date(); SimpleDateFormat sdf = new SimpleDateFormat( appendDateFormat ); String formattedDate = sdf.format( date ).toString(); tempOutputFilePath += formattedDate; } catch ( Exception e ) { } } if ( streamingAction != null ) { String mimeType = streamingAction.getMimeType( null ); if ( mimeType != null && MimeHelper.getExtension( mimeType ) != null ) { tempOutputFilePath += MimeHelper.getExtension( mimeType ); } } } RepositoryFileOutputStream outputStream = new RepositoryFileOutputStream( tempOutputFilePath, autoCreateUniqueFilename, true ); outputStream.addListener( this ); return outputStream; }

Target:
public OutputStream getOutputStream() throws Exception { String tempOutputFilePath = outputFilePath; String extension = RepositoryFilenameUtils.getExtension( tempOutputFilePath ); if ( "*".equals( extension ) ) { tempOutputFilePath = tempOutputFilePath.substring( 0, tempOutputFilePath.lastIndexOf( '.' ) ); if ( appendDateFormat != null ) { try { LocalDateTime now = LocalDateTime.now(); DateTimeFormatter formatter = DateTimeFormatter.ofPattern( appendDateFormat ); String formattedDate = now.format( formatter ); tempOutputFilePath += formattedDate; } catch ( Exception e ) { logger.warn( "Unable to calculate current date: " + e.getMessage() ); } } if ( streamingAction != null ) { String mimeType = streamingAction.getMimeType( null ); if ( mimeType != null && MimeHelper.getExtension( mimeType ) != null ) { tempOutputFilePath += MimeHelper.getExtension( mimeType ); } } } RepositoryFileOutputStream outputStream = new RepositoryFileOutputStream( tempOutputFilePath, autoCreateUniqueFilename, true ); outputStream.addListener( this ); return outputStream; }
Source:
public void testConvertTextToHtml() throws IOException { Blob blob = new StringBlob("thisismytest", "text/plain"); DocumentModel doc = session.createDocumentModel("File"); doc.setPropertyValue("file:content", (Serializable) blob); BlobHolder blobHolder = new SimpleBlobHolder(blob); BlobHolder res = conversionService.convertToMimeType("text/html", blobHolder , null); List<Blob> blobs = res.getBlobs(); assertEquals(1, blobs.size()); String preview = blobs.get(0).getString(); assertTrue(preview, preview.contains("thisismytest")); }

Target:
public void testConvertTextToHtml() throws IOException { Blob blob = new StringBlob("thisismytest", "text/plain"); BlobHolder blobHolder = new SimpleBlobHolder(blob); BlobHolder res = conversionService.convertToMimeType("text/html", blobHolder , null); List<Blob> blobs = res.getBlobs(); assertEquals(1, blobs.size()); String preview = blobs.get(0).getString(); assertTrue(preview, preview.contains("thisismytest")); }
Source:
public Object valueFromString(PermanentProperty prop, String sValue, Flag flag) { synchronized (coreLock) { @SuppressWarnings("rawtypes") Class type = prop.getType(); if (type == TimeoutOwner.class) { return scoreBoard.getTimeoutOwner(sValue); } if (sValue == null) { return prop.getDefaultValue(); } if (type == Role.class) { return Role.fromString(sValue); } if (type == FloorPosition.class) { return FloorPosition.fromString(sValue); } if (type == Boolean.class) { return Boolean.valueOf(sValue); } if (type == Integer.class) { return Integer.valueOf(sValue); } if (type == Long.class) { return Long.valueOf(sValue); } if (prop == IValue.PREVIOUS || prop == IValue.NEXT) { return getElement(providerClass, sValue); } if (ScoreBoardEventProvider.class.isAssignableFrom(type)) { return getElement(type, sValue); } if ("".equals(sValue) && !(type == String.class)) { return prop.getDefaultValue(); } return sValue; } }

Target:
public Object valueFromString(PermanentProperty prop, String sValue, Flag flag) { synchronized (coreLock) { @SuppressWarnings("rawtypes") Class type = prop.getType(); if (type == TimeoutOwner.class) { return scoreBoard.getTimeoutOwner(sValue); } if (sValue == null) { return prop.getDefaultValue(); } if ("".equals(sValue) && !(type == String.class)) { return prop.getDefaultValue(); } if (type == RuleDefinition.Type.class) { return prop.getDefaultValue(); } if (type == Role.class) { return Role.fromString(sValue); } if (type == FloorPosition.class) { return FloorPosition.fromString(sValue); } if (type == Boolean.class) { return Boolean.valueOf(sValue); } if (type == Integer.class) { return Integer.valueOf(sValue); } if (type == Long.class) { return Long.valueOf(sValue); } if (prop == IValue.PREVIOUS || prop == IValue.NEXT) { return getElement(providerClass, sValue); } if (ScoreBoardEventProvider.class.isAssignableFrom(type)) { return getElement(type, sValue); } if (type != String.class) { ScoreBoardManager.printMessage("Conversion to " + type.getSimpleName() + " used by " + PropertyConversion.toFrontend(prop) + " missing in ScoreBoardEventProvider.valueFromString()"); return prop.getDefaultValue(); } return sValue; } }
Source:
private static Properties createSchema(HiveStorageFormat format, List<String> columnNames, List<Type> columnTypes) { Properties schema = new Properties(); TypeTranslator typeTranslator = new HiveTypeTranslator(); schema.setProperty(SERIALIZATION_LIB, format.getSerDe()); schema.setProperty(FILE_INPUT_FORMAT, format.getInputFormat()); schema.setProperty(META_TABLE_COLUMNS, columnNames.stream() .collect(joining(","))); schema.setProperty(META_TABLE_COLUMN_TYPES, columnTypes.stream() .map(type -> toHiveType(typeTranslator, type)) .map(hiveType -> hiveType.getHiveTypeName().toString()) .collect(joining(":"))); return schema; }

Target:
private static Properties createSchema(HiveStorageFormat format, List<String> columnNames, List<Type> columnTypes) { Properties schema = new Properties(); TypeTranslator typeTranslator = new HiveTypeTranslator(); schema.setProperty(SERIALIZATION_LIB, format.getSerDe()); schema.setProperty(FILE_INPUT_FORMAT, format.getInputFormat()); schema.setProperty(META_TABLE_COLUMNS, columnNames.stream() .collect(joining(","))); schema.setProperty(META_TABLE_COLUMN_TYPES, columnTypes.stream() .map(type -> toHiveType(typeTranslator, type)) .map(HiveType::getHiveTypeName) .map(HiveTypeName::toString) .collect(joining(":"))); return schema; }
Source:
public Slice serialize() { try (SliceOutput output = new DynamicSliceOutput(estimatedSerializedSize())) { output.appendByte(UNCOMPRESSED_FORMAT); output.appendInt(maxSize); output.appendInt(hllBuckets); output.appendInt(minhash.size()); for (long key : minhash.keySet()) { output.appendLong(key); } Slice serializedHll; for (HyperLogLog hll : minhash.values()) { serializedHll = hll.serialize(); output.appendInt(serializedHll.length()); output.appendBytes(serializedHll); } return output.slice(); } catch (IOException e) { throw new UncheckedIOException(e); } }

Target:
public Slice serialize() { try (SliceOutput output = new DynamicSliceOutput(estimatedSerializedSize())) { List<Slice> hllSlices = new ArrayList<>(); IntList hllSizes = new IntArrayList(); int totalHllSize = 0; for (HyperLogLog hll : minhash.values()) { Slice serializedHll = hll.serialize(); hllSlices.add(serializedHll); totalHllSize += serializedHll.length(); hllSizes.add(serializedHll.length()); } Slice hashesSlice = wrappedLongArray(minhash.keySet().toLongArray()); Slice hllSizesSlice = wrappedIntArray(hllSizes.toIntArray()); output.appendByte(VERSION_BYTE); output.appendInt(maxSize); output.appendInt(hllBuckets); output.appendInt(minhash.size()); output.appendInt(totalHllSize); output.appendBytes(hllSizesSlice); output.appendBytes(hashesSlice); for (Slice hllSlice : hllSlices) { output.appendBytes(hllSlice); } return output.slice(); } catch (IOException e) { throw new UncheckedIOException(e); } }
Source:
public static synchronized String getServiceToken(String url, String service) { String token; try (CloseableHttpClient httpClient = new CommonHttpClientBuilder().allowAnyCertificate(true).build()) { HttpPost httpPost = new HttpPost(url); List<NameValuePair> params = new ArrayList<>(); params.add(new BasicNameValuePair("service", service)); httpPost.setEntity(new UrlEncodedFormEntity(params)); HttpResponse httpResponse = httpClient.execute(httpPost); if ((httpResponse.getStatusLine().getStatusCode() != HttpStatus.SC_OK) || (null == httpResponse.getEntity())) throw new IAMException("Authentication failed"); token = EntityUtils.toString(httpResponse.getEntity()); LOG.debug("Token successfully generated for service " + service + "\n Token: " + token); } catch (Exception e) { throw new IAMException(e.getMessage()); } return token; }

Target:
public String getServiceToken(String url, String service) { String token; try (CloseableHttpClient httpClient = new CommonHttpClientBuilder().allowAnyCertificate(true).build()) { HttpPost httpPost = new HttpPost(url); List<NameValuePair> params = new ArrayList<>(); params.add(new BasicNameValuePair("service", service)); httpPost.setEntity(new UrlEncodedFormEntity(params)); HttpResponse httpResponse = httpClient.execute(httpPost); if ((httpResponse.getStatusLine().getStatusCode() != HttpStatus.SC_OK) || (null == httpResponse.getEntity())) throw new IAMException("Failed to acquire authentication token for the service" + service); token = EntityUtils.toString(httpResponse.getEntity()); LOG.debug("Service token successfully generated for service " + service + "\n Token: " + token); } catch (Exception e) { throw new IAMException("Authentication failed: Error occurred while acquiring authentication token for the service" + service, e); } return token; }
Source:
public void customJavadocTags() throws IOException { final String inputFilename = getDocPath("InputCustomJavadocTags.txt"); final String outputFilename = getOutputDocPath("OutputCustomJavadocTags.txt"); final String expectedTree = getFileContent(new File(outputFilename)) .replaceAll("\\\\r\\\\n", "\\\\n"); final String generatedTree = printFileAst(new File(inputFilename)) .replaceAll("\\\\r\\\\n", "\\\\n"); assertEquals(expectedTree, generatedTree); }

Target:
public void customJavadocTags() throws Exception { verifyJavadocTree(getDocPath("expectedCustomJavadocTagsAst.txt"), getDocPath("InputCustomJavadocTags.javadoc")); }
Source:
public void getTitleWithThis() { String thisObject = "something"; String title = getTitle(NAME_PATTERN_WITH_THIS, METHOD_NAME, thisObject, new Object[]{}); Object[] args = {METHOD_NAME, thisObject}; assertThat("Название метода с массивом массивов, в котором есть {this}", title, equalTo(MessageFormat.format(TITLE_STRING_WITH_THIS, args))); }

Target:
public void getTitleWithThis() { String thisObject = "something"; String title = getTitle(NAME_PATTERN_WITH_THIS, METHOD_NAME, thisObject, new Object[]{}); Object[] args = {METHOD_NAME, thisObject}; assertThat("Method with {this} is processed incorrectly", title, equalTo(MessageFormat.format(TITLE_STRING_WITH_THIS, args))); }
Source:
protected CompletableFuture<Void> doResolve(ITextViewer viewer, IProgressMonitor monitor) { return null; }

Target:
protected CompletableFuture<Void> doResolve(ITextViewer viewer, IProgressMonitor monitor) { return CompletableFuture.completedFuture(null); }
Source:
public boolean equals(Object object) { if (object instanceof AbstractRemoteEmfFactory.UniqueLocalReference) { UniqueLocalReference reference = (UniqueLocalReference) object; return parent.equals(reference.parent) && localKey.equals(reference.localKey); } return false; }

Target:
public boolean equals(Object object) { if (object instanceof AbstractRemoteEmfFactory.UniqueLocalReference) { @SuppressWarnings("rawtypes") UniqueLocalReference reference = (UniqueLocalReference) object; return parent.equals(reference.parent) && localKey.equals(reference.localKey); } return false; }
Source:
public void verifyRubricQuestion(int qnNumber, int[] colIndexes, String[]... columns) { int i = 0; for (int colIndex : colIndexes) { String[] colValues = columns[i++]; int rubDescIndex = 1; assertTrue(getRubricChoice(qnNumber, colIndex).equals(colValues[0])); if (isRubricWeightsEnabled(qnNumber)) { assertTrue(getRubricWeight(qnNumber, colIndex).equals(colValues[1])); rubDescIndex = 2; } int subQnIndex = 0; while (rubDescIndex < colValues.length) { assertTrue(getRubricDescription(qnNumber, subQnIndex, colIndex).equals(colValues[rubDescIndex])); rubDescIndex++; subQnIndex++; } } verifyRubricColumnsMovability(qnNumber, colIndexes); }

Target:
public void verifyRubricQuestion(int qnNumber, int[] colIndexes, String[]... columns) { for (int i = 0; i < colIndexes.length; i++) { int colIndex = colIndexes[i]; String[] colValues = columns[i]; int rubDescriptionIndex = 1; assertTrue(getRubricChoice(qnNumber, colIndex).equals(colValues[0])); if (isRubricWeightsEnabled(qnNumber)) { assertTrue(getRubricWeight(qnNumber, colIndex).equals(colValues[1])); rubDescriptionIndex = 2; } int subQnIndex = 0; while (rubDescriptionIndex < colValues.length) { assertTrue(getRubricDescription(qnNumber, subQnIndex, colIndex).equals(colValues[rubDescriptionIndex])); rubDescriptionIndex++; subQnIndex++; } } verifyRubricColumnsMovability(qnNumber, colIndexes); }
Source:
@Override public RequestBody toBody(Object source, Type type) { byte[] bytes; try { ByteArrayOutputStream bos = new ByteArrayOutputStream(); OutputStreamWriter osw = new OutputStreamWriter(bos, CHARSET); serializer.write(source, osw); osw.flush(); bytes = bos.toByteArray(); } catch (Exception e) { throw new AssertionError(e); } return RequestBody.create(MEDIA_TYPE, bytes); }

Target:
@Override public RequestBody toBody(Object source, Type type) { byte[] bytes; try { Buffer buffer = new Buffer(); OutputStreamWriter osw = new OutputStreamWriter(buffer.outputStream(), CHARSET); serializer.write(source, osw); osw.flush(); bytes = buffer.readByteArray(); } catch (Exception e) { throw new AssertionError(e); } return RequestBody.create(MEDIA_TYPE, bytes); }
Source:
public List<Map<String, String>> taskConfigs(int maxTasks) { if (!config.enabled() || knownTopicPartitions.isEmpty()) { return Collections.emptyList(); } int numTasks = Math.min(maxTasks, knownTopicPartitions.size()); List<List<TopicPartition>> roundRobinAssignment = new ArrayList<>(numTasks); for (int i = 0; i < numTasks; i++) { roundRobinAssignment.add(new ArrayList<>()); } int count = 0; for (TopicPartition partition : knownTopicPartitions) { int index = count % numTasks; roundRobinAssignment.get(index).add(partition); count++; } List<TopicPartition> roundRobinFlatten = new ArrayList<>(); for (List<TopicPartition> assignment : roundRobinAssignment) { roundRobinFlatten.addAll(assignment); } return ConnectorUtils.groupPartitions(roundRobinFlatten, numTasks).stream() .map(config::taskConfigForTopicPartitions) .collect(Collectors.toList()); }

Target:
public List<Map<String, String>> taskConfigs(int maxTasks) { if (!config.enabled() || knownTopicPartitions.isEmpty()) { return Collections.emptyList(); } int numTasks = Math.min(maxTasks, knownTopicPartitions.size()); List<List<TopicPartition>> roundRobinByTask = new ArrayList<>(numTasks); for (int i = 0; i < numTasks; i++) { roundRobinByTask.add(new ArrayList<>()); } int count = 0; for (TopicPartition partition : knownTopicPartitions) { int index = count % numTasks; roundRobinByTask.get(index).add(partition); count++; } return roundRobinByTask.stream().map(config::taskConfigForTopicPartitions) .collect(Collectors.toList()); }
Source:
public CacheKey getCacheKey(HttpServletRequest request, HttpServletResponse response) { if (this.wrappedComponent != null) { return this.wrappedComponent.getCacheKey(request, response); } else return null; }

Target:
public CacheKey getCacheKey(HttpServletRequest request, HttpServletResponse response) throws IllegalStateException { if (this.wrappedComponent != null) { return this.wrappedComponent.getCacheKey(request, response); } else { logger.debug("PipelineComponentWrapper.wrapperComponent is null"); throw new IllegalStateException("PipelineComponentWrapper.wrapperComponent is null"); } }
Source:
private List<String> checkInvalidIndexes() throws StandardException { invalidIndexCount = 0; ArrayListMultimap<String, byte[]> result = ArrayListMultimap.create(); for (String baseRowId : indexData.keySet()) { if (!tableData.containsKey(baseRowId)) { List<byte[]> rows = indexData.get(baseRowId); result.putAll(baseRowId, rows); invalidIndexCount += rows.size(); } } if (invalidIndexCount > 0) { if (fix) { return fixInvalidIndexes(result); } else { return reportInvalidIndexes(result); } } return new LinkedList<>(); }

Target:
private List<String> checkInvalidIndexes() throws StandardException { invalidIndexCount = 0; ArrayListMultimap<String, byte[]> result = ArrayListMultimap.create(); for (String baseRowId : indexData.keySet()) { if (!tableData.containsKey(baseRowId)) { List<byte[]> rows = indexData.get(baseRowId); result.putAll(baseRowId, rows); invalidIndexCount += rows.size(); } } if (invalidIndexCount > 0) { if (fix) { fixInvalidIndexes(result); } return reportInvalidIndexes(result); } return new LinkedList<>(); }
Source:
public void saveDrug_shouldUpdateDrugAlreadyExistingInDatabase() { executeDataSet("org/openmrs/api/include/ConceptServiceTest-initialConcepts.xml"); Drug drug = new Drug(); drug.setConcept(conceptService.getConcept(1)); Drug saved = conceptService.saveDrug(drug); saved.setCombination(true); conceptService.saveDrug(saved); assertTrue(conceptService.getDrug(saved.getDrugId()).getCombination()); }

Target:
public void saveDrug_shouldUpdateDrugAlreadyExistingInDatabase() { Drug drug = new Drug(); Concept concept = new Concept(); concept.addName(new ConceptName("Concept", new Locale("en", "US"))); concept.addDescription(new ConceptDescription("Description", new Locale("en", "US"))); concept.setConceptClass(new ConceptClass(1)); concept.setDatatype(new ConceptDatatype(1)); Concept savedConcept = conceptService.saveConcept(concept); drug.setConcept(savedConcept); drug.setCombination(false); Drug savedDrug = conceptService.saveDrug(drug); assertFalse(savedDrug.getCombination()); savedDrug.setCombination(true); conceptService.saveDrug(savedDrug); assertTrue(conceptService.getDrug(savedDrug.getDrugId()).getCombination()); }
Source:
public void validateSubscriptionChange(final Subscription old, final SubscriptionBase newValue) { if (!Objects.equals(newValue.getConsumerGroup(), old.getConsumerGroup())) { throw new IllegalArgumentException("Not allowed to change subscription consumer group"); } if (!Objects.equals(newValue.getEventTypes(), old.getEventTypes())) { throw new IllegalArgumentException("Not allowed to change subscription event types"); } if (!Objects.equals(newValue.getOwningApplication(), old.getOwningApplication())) { throw new IllegalArgumentException("Not allowed to change owning application"); } if (!Objects.equals(newValue.getReadFrom(), old.getReadFrom())) { throw new IllegalArgumentException("Not allowed to change owning application"); } if (!Objects.equals(newValue.getInitialCursors(), old.getInitialCursors())) { throw new IllegalArgumentException("Not allowed to change owning application"); } authorizationValidator.validateAuthorization(old.getAuthorization(), newValue.getAuthorization()); }

Target:
public void validateSubscriptionChange(final Subscription old, final SubscriptionBase newValue) throws SubscriptionUpdateConflictException { if (!Objects.equals(newValue.getConsumerGroup(), old.getConsumerGroup())) { throw new SubscriptionUpdateConflictException("Not allowed to change subscription consumer group"); } if (!Objects.equals(newValue.getEventTypes(), old.getEventTypes())) { throw new SubscriptionUpdateConflictException("Not allowed to change subscription event types"); } if (!Objects.equals(newValue.getOwningApplication(), old.getOwningApplication())) { throw new SubscriptionUpdateConflictException("Not allowed to change owning application"); } if (!Objects.equals(newValue.getReadFrom(), old.getReadFrom())) { throw new SubscriptionUpdateConflictException("Not allowed to change read from"); } if (!Objects.equals(newValue.getInitialCursors(), old.getInitialCursors())) { throw new SubscriptionUpdateConflictException("Not allowed to change initial cursors"); } authorizationValidator.validateAuthorization(old.getAuthorization(), newValue.getAuthorization()); }
Source:
public void setup() { MetadataManager metadata = MetadataManager.createTestMetadataManager(); ExpressionCompiler compiler = new ExpressionCompiler(metadata, new PageFunctionCompiler(metadata, 0)); ImmutableList.Builder<RowExpression> projectionsBuilder = ImmutableList.builder(); Block[] blocks = new Block[2]; Type elementType; switch (type) { case "BIGINT": elementType = BIGINT; break; case "VARCHAR": elementType = VARCHAR; break; case "DOUBLE": elementType = DOUBLE; break; case "BOOLEAN": elementType = BOOLEAN; break; default: throw new UnsupportedOperationException(); } ArrayType arrayType = new ArrayType(elementType); Signature signature = new Signature(name, FunctionKind.SCALAR, arrayType.getTypeSignature(), arrayType.getTypeSignature(), arrayType.getTypeSignature()); projectionsBuilder.add(new CallExpression(signature, arrayType, ImmutableList.of(field(0, arrayType), field(1, arrayType)))); blocks[0] = createChannel(POSITIONS, Integer.parseInt(arraySizeString), elementType); blocks[1] = createChannel(POSITIONS, Integer.parseInt(arraySizeString), elementType); ImmutableList<RowExpression> projections = projectionsBuilder.build(); pageProcessor = compiler.compilePageProcessor(Optional.empty(), projections).get(); page = new Page(blocks); System.out.println("created blocks"); }

Target:
public void setup() { Type elementType; switch (type) { case "BIGINT": elementType = BIGINT; break; case "VARCHAR": elementType = VARCHAR; break; case "DOUBLE": elementType = DOUBLE; break; case "BOOLEAN": elementType = BOOLEAN; break; default: throw new UnsupportedOperationException(); } ArrayType arrayType = new ArrayType(elementType); Signature signature = new Signature(name, FunctionKind.SCALAR, arrayType.getTypeSignature(), arrayType.getTypeSignature(), arrayType.getTypeSignature()); ImmutableList<RowExpression> projections = ImmutableList.of( new CallExpression(signature, arrayType, ImmutableList.of(field(0, arrayType), field(1, arrayType)))); MetadataManager metadata = MetadataManager.createTestMetadataManager(); ExpressionCompiler compiler = new ExpressionCompiler(metadata, new PageFunctionCompiler(metadata, 0)); pageProcessor = compiler.compilePageProcessor(Optional.empty(), projections).get(); page = new Page(createChannel(POSITIONS, arraySize, elementType), createChannel(POSITIONS, arraySize, elementType)); }
Source:
public void dispose() throws SaslException { try { super.dispose(); } finally { cancelTimeoutTask(); } }

Target:
public synchronized void dispose() throws SaslException { cancelTimeoutTask(); super.dispose(); }
Source:
OnmsThreshdDao(JsonStore jsonStore, File configFile) { super(jsonStore); Objects.requireNonNull(configFile); extContainer = new ConfigReloadContainer.Builder<>(ThreshdConfiguration.class) .withMerger((source, target) -> { if (source == null && target == null) { return new ThreshdConfiguration(); } else if (source == null) { return target; } else if (target == null) { return source; } target.getPackages().addAll(source.getPackages()); target.getThresholders().addAll(source.getThresholders()); getLargestThreads(source.getThreads(), target.getThreads()) .ifPresent(target::setThreads); return target; }) .build(); saveableConfigContainer = new FileSystemSaveableConfigContainer<>(ThreshdConfiguration.class, "threshd-configuration", Collections.singleton(this::fileSystemConfigUpdated), configFile); reload(); }

Target:
OnmsThreshdDao(JsonStore jsonStore, File configFile) { super(jsonStore); Objects.requireNonNull(configFile); extContainer = new ConfigReloadContainer.Builder<>(ThreshdConfiguration.class) .withFolder((accumulator, next) -> accumulator.getPackages().addAll(next.getPackages())) .build(); saveableConfigContainer = new FileSystemSaveableConfigContainer<>(ThreshdConfiguration.class, "threshd-configuration", Collections.singleton(this::fileSystemConfigUpdated), configFile); reload(); }
Source:
public void delete() throws IOException { synchronized (documentStores) { DocumentStore ds = documentStores.remove(location); if (ds != null) { ((DatabaseImpl)database).close(); ((IndexManagerImpl)query).close(); } if (!location.exists()) { String msg = String.format( "Datastore %s doesn't exist on disk", location ); throw new IOException(msg); } else { FileUtils.deleteDirectory(location); eventBus.post(new DatabaseDeleted(databaseName)); } } }

Target:
public void delete() throws IOException { try { this.close(); } catch (Exception e) { logger.log(Level.WARNING, "Caught exception whilst closing DocumentStore in delete()", e); } if (!location.exists()) { String msg = String.format("Datastore %s doesn't exist on disk", location); logger.warning(msg); throw new IOException(msg); } else { FileUtils.deleteDirectory(location); eventBus.post(new DatabaseDeleted(databaseName)); } }
Source:
private String extractPropertyName(String key) { int beginIndex = key.indexOf("."); int endIndex = key.indexOf(".prompt"); if(endIndex != -1){ return key.substring(beginIndex + 1, endIndex); } else { endIndex = key.indexOf(".default"); if (endIndex != -1) { return key.substring(beginIndex + 1, endIndex); } } return key.substring(beginIndex + 1); }

Target:
private String extractPropertyName(String key) { int beginIndex = key.indexOf("."); if(key.endsWith(".default")){ return key.substring(beginIndex+1, key.length()-8); } else if(key.endsWith(".prompt")){ return key.substring(beginIndex+1, key.length()-7); } else { return key.substring(beginIndex+1); } }
Source:
public void handle(String input, Console console) { String[] args = input.split(" "); if (args.length != 3) { console.warn("Usage: equipWeapon moduleName:gunName slotNumber"); return; } if (!isInt(args[2])) { console.warn("slotNumber must be a valid number!"); return; } int slot = Integer.parseInt(args[2]); SolItem gunItem = getGun(args[1]); if (slot < 1 || slot > 2) { console.warn("Available slots: 1, 2"); return; } if (gunItem == null) { console.warn("Could not find " + args[1]); return; } SolShip ship = hero.getShip(); boolean canEquip = ship.maybeEquip(game, gunItem, slot == 2 ? true : false, false); if (!canEquip) { console.warn("Cannot equip this weapon in that slot!"); return; } ItemContainer itemContainer = ship.getItemContainer(); boolean alreadyExists = false; for (List<SolItem> group : itemContainer) { if (group.get(0).getCode().equals(gunItem.getCode())) { gunItem = group.get(0); alreadyExists = true; break; } } if (!alreadyExists) { ship.getItemContainer().add(gunItem); } Gun gun = (Gun) gunItem; gun.ammo = gun.config.clipConf.size; ship.maybeEquip(game, gunItem, slot == 2 ? true : false, true); }

Target:
public void handle(String input, Console console) { String[] args = input.split(" "); SolShip ship = hero.getShip(); if (args.length != 3) { console.warn("Usage: equipWeapon moduleName:gunName slotNumber"); console.warn("Available slots: " + (ship.getHull().getGunMount(false) != null ? "1" : "<none>") + (ship.getHull().getGunMount(true) != null ? ", 2" : "")); return; } if (!SolMath.isInt(args[2])) { console.warn("slotNumber must be a valid number!"); return; } int slot = Integer.parseInt(args[2]); Optional<SolItem> gunItem = Optional.ofNullable(getGun(args[1])); if (!gunItem.isPresent()) { console.warn("Could not find gun " + args[1]); return; } boolean canEquip = ship.maybeEquip(game, gunItem.get(), slot == 2, false); if (!canEquip) { console.warn("Cannot equip this weapon in that slot!"); return; } ItemContainer itemContainer = ship.getItemContainer(); boolean alreadyExists = false; for (List<SolItem> group : itemContainer) { if (group.get(0).getCode().equals(gunItem.get().getCode())) { gunItem = Optional.of(group.get(0)); alreadyExists = true; break; } } if (!alreadyExists) { ship.getItemContainer().add(gunItem.get()); } Gun gun = (Gun) gunItem.get(); gun.ammo = gun.config.clipConf.size; ship.maybeEquip(game, gun, slot == 2, true); }
Source:
public void init() throws UserStoreException { try { claimConfig = FileBasedClaimBuilder.buildClaimMappingsFromConfigFile(); } catch (IOException e) { log.error("Could not find claim configuration file ", e); } catch (XMLStreamException e) { log.error("Error while parsing claim configuration file ", e); } }

Target:
public void init() throws UserStoreException { try { claimConfig = FileBasedClaimBuilder.buildClaimMappingsFromConfigFile(); } catch (IOException e) { throw new UserStoreException("Could not find claim configuration file", e); } catch (XMLStreamException e) { throw new UserStoreException("Error while parsing claim configuration file", e); } }
Source:
public KiePMMLDroolsModelFactoryUtils() { }

Target:
private KiePMMLDroolsModelFactoryUtils() { }
Source:
public static int getSecondaryColor(Context context, String primary) { if (primary == null) return Color.parseColor("#81B4DE"); int[] COLORS = context.getResources().getIntArray(R.array.colors); int[] SECONDARY_COLORS = context.getResources().getIntArray(R.array.secondary_colors); int color = Color.parseColor(primary); int foundColor = -1; for (int i = 0; i < COLORS.length; i++) { if (COLORS[i] == color) foundColor = i; } if (foundColor == -1) return Color.parseColor("#81B4DE"); return SECONDARY_COLORS[foundColor]; }

Target:
public static int getSecondaryColor(Context context, String primary) { if (primary == null) { return Color.parseColor("#81B4DE"); } int[] COLORS = context.getResources().getIntArray(R.array.colors); int[] SECONDARY_COLORS = context.getResources().getIntArray(R.array.secondary_colors); int color = Color.parseColor(primary); int foundColor = -1; for (int i = 0; i < COLORS.length; i++) { if (COLORS[i] == color) foundColor = i; } if (foundColor == -1) { return Color.parseColor("#81B4DE"); } return SECONDARY_COLORS[foundColor]; }
Source:
public void startTrigger(final FlowTrigger flowTrigger, final String flowId, final int flowVersion, final String submitUser, final Project project) { this.executorService.submit(() -> { final TriggerInstance triggerInst = createTriggerInstance(flowTrigger, flowId, flowVersion, submitUser, project); logger.info( String.format("Starting the flow trigger %s[execId %s] by %s", flowTrigger, triggerInst .getId(), submitUser)); this.triggerProcessor.processNewInstance(triggerInst); if (triggerInst.getStatus() == Status.CANCELLED) { logger.info(String.format("Trigger instance[id: %s] is cancelled since all dependency " + "instances fail to be created", triggerInst.getId())); this.triggerProcessor.processTermination(triggerInst); } else if (triggerInst.getStatus() == Status.CANCELLING) { logger.info( String.format("Trigger instance[id: %s] is being cancelled since some dependency " + "instances fail to be created", triggerInst.getId())); addToRunningListAndCancel(triggerInst); } else if (triggerInst.getStatus() == Status.SUCCEEDED) { this.triggerProcessor.processSucceed(triggerInst); } else { addToRunningListAndScheduleKill(triggerInst, triggerInst.getFlowTrigger() .getMaxWaitDuration(), CancellationCause.TIMEOUT); } }); }

Target:
public void startTrigger(final FlowTrigger flowTrigger, final String flowId, final int flowVersion, final String submitUser, final Project project) { this.executorService.submit(() -> { final TriggerInstance triggerInst = createTriggerInstance(flowTrigger, flowId, flowVersion, submitUser, project); logger.info( String.format("Starting the flow trigger %s[trigger instance id: %s] by %s", flowTrigger, triggerInst.getId(), submitUser)); this.triggerProcessor.processNewInstance(triggerInst); if (triggerInst.getStatus() == Status.CANCELLED) { logger.info(String.format("Trigger instance[id: %s] is cancelled since all dependency " + "instances fail to be created", triggerInst.getId())); this.triggerProcessor.processTermination(triggerInst); } else if (triggerInst.getStatus() == Status.CANCELLING) { logger.info( String.format("Trigger instance[id: %s] is being cancelled since some dependency " + "instances fail to be created", triggerInst.getId())); addToRunningListAndCancel(triggerInst); } else if (triggerInst.getStatus() == Status.SUCCEEDED) { this.triggerProcessor.processSucceed(triggerInst); } else { addToRunningListAndScheduleKill(triggerInst, triggerInst.getFlowTrigger() .getMaxWaitDuration(), CancellationCause.TIMEOUT); } }); }
Source:
public List<RichUser> call(ApiCaller ac, Deserializer parms) throws PerunException { String roleName = parms.readString("role"); return cz.metacentrum.perun.core.api.AuthzResolver.getRichAdmins(ac.getSession(), parms.readInt("complementaryObjectId"), parms.readString("complementaryObjectName"), parms.readList("specificAttributes", String.class), roleName, parms.readBoolean("onlyDirectAdmins"), parms.readBoolean("allUserAttributes")); }

Target:
public List<String> call(ApiCaller ac, Deserializer parms) throws PerunException { List<String> roles = cz.metacentrum.perun.core.api.AuthzResolver.getPrincipalRoleNames(ac.getSession()); roles.replaceAll(String::toLowerCase); return roles; }
Source:
public void acceptsNoContentLengthOnClosedConnection() throws Exception { final String text = "Close Test"; final Socket socket = Mockito.mock(Socket.class); final String requests = Joiner.on(BkBasicTest.CRLF).join( BkBasicTest.POST, BkBasicTest.HOST, "Connection: Close", "", "Hello World!" ); final InputStream input = new ByteArrayInputStream(requests.getBytes()); final OutputStream output = new ByteArrayOutputStream(); Mockito.when(socket.getLocalAddress()).thenReturn( InetAddress.getLocalHost() ); Mockito.when(socket.getInetAddress()).thenReturn( InetAddress.getLocalHost() ); Mockito.when(socket.getLocalPort()).thenReturn(0); Mockito.when(socket.getPort()).thenReturn(0); Mockito.when(socket.getInputStream()).thenReturn(input); Mockito.when(socket.getOutputStream()).thenReturn(output); new BkBasic(new TkText(text)).accept(socket); MatcherAssert.assertThat( socket.getOutputStream().toString(), Matchers.containsString(text) ); }

Target:
public void acceptsNoContentLengthOnClosedConnection() throws Exception { final String text = "Close Test"; final ByteArrayOutputStream output = new ByteArrayOutputStream(); final ServerSocket server = new ServerSocket(0); try { new Thread( new Runnable() { @Override public void run() { try { new BkBasic(new TkText(text)).accept( server.accept() ); } catch (final IOException exception) { throw new IllegalStateException(exception); } } } ).start(); final Socket socket = new Socket( server.getInetAddress(), server.getLocalPort() ); try { socket.getOutputStream().write( Joiner.on(BkBasicTest.CRLF).join( BkBasicTest.POST, BkBasicTest.HOST, "Connection: Close", "", "Hello World!" ).getBytes() ); final InputStream input = socket.getInputStream(); final byte[] buffer = new byte[4096]; for (int count = input.read(buffer); count != -1; count = input.read(buffer)) { output.write(buffer, 0, count); } } finally { socket.close(); } } finally { server.close(); } MatcherAssert.assertThat( output.toString(), Matchers.containsString(text) ); }
Source:
public JsonDocument readNextRecord(BufferedReader bRdr) throws IOException { if (node == null || i >= node.size()) { String line; while ((line = bRdr.readLine()) != null) { JsonNode json = new JsonFactory().createParser(line).readValueAsTree(); id = json.get("id").asText(); contents = json.get("contents").asText(); return this; } } else { JsonNode json = node.get(i); id = json.get("id").asText(); contents = json.get("contents").asText(); i++; return this; } return null; }

Target:
public JsonDocument readNextRecord(BufferedReader bRdr) throws IOException { if (node == null) { String line; while ((line = bRdr.readLine()) != null) { JsonNode json = new JsonFactory().createParser(line).readValueAsTree(); id = json.get("id").asText(); contents = json.get("contents").asText(); return this; } } else if (i < node.size()) { JsonNode json = node.get(i); id = json.get("id").asText(); contents = json.get("contents").asText(); i++; return this; } return null; }
Source:
public void interceptor() { MessageChannel channel = context.getBean("channelWithInterceptor", MessageChannel.class); List<?> interceptorList = TestUtils.getPropertyValue(channel, "interceptors.interceptors", List.class); assertEquals(1, interceptorList.size()); assertEquals(TestInterceptor.class, interceptorList.get(0).getClass()); assertEquals(Integer.MAX_VALUE, TestUtils.getPropertyValue( TestUtils.getPropertyValue(channel, "dispatcher"), "maxSubscribers", Integer.class).intValue()); channel = context.getBean("pubSub", MessageChannel.class); Object mbf = context.getBean(IntegrationUtils.INTEGRATION_MESSAGE_BUILDER_FACTORY_BEAN_NAME); assertNotSame(mbf, TestUtils.getPropertyValue(channel, "dispatcher.messageBuilderFactory")); assertSame(mbf, TestUtils.getPropertyValue(channel, "container.messageListener.messageBuilderFactory")); assertTrue(TestUtils.getPropertyValue(channel, "container.missingQueuesFatal", Boolean.class)); assertFalse(TestUtils.getPropertyValue(channel, "container.transactional", Boolean.class)); assertFalse(TestUtils.getPropertyValue(channel, "amqpTemplate.transactional", Boolean.class)); }

Target:
public void interceptor() { MessageChannel channel = context.getBean("channelWithInterceptor", MessageChannel.class); List<?> interceptorList = TestUtils.getPropertyValue(channel, "interceptors.interceptors", List.class); assertEquals(1, interceptorList.size()); assertEquals(TestInterceptor.class, interceptorList.get(0).getClass()); assertEquals(Integer.MAX_VALUE, TestUtils.getPropertyValue( TestUtils.getPropertyValue(channel, "dispatcher"), "maxSubscribers", Integer.class).intValue()); channel = context.getBean("pubSub", MessageChannel.class); Object mbf = context.getBean(IntegrationUtils.INTEGRATION_MESSAGE_BUILDER_FACTORY_BEAN_NAME); assertSame(mbf, TestUtils.getPropertyValue(channel, "container.messageListener.messageBuilderFactory")); assertTrue(TestUtils.getPropertyValue(channel, "container.missingQueuesFatal", Boolean.class)); assertFalse(TestUtils.getPropertyValue(channel, "container.transactional", Boolean.class)); assertFalse(TestUtils.getPropertyValue(channel, "amqpTemplate.transactional", Boolean.class)); }