auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public Info getInfo(ObjectNode node, String location, ParseResult result) { if (node == null) return null; Info info = new Info(); String value = getString("title", node, true, location, result); info.setTitle(value); value = getString("description", node, false, location, result); info.setDescription(value); value = getString("termsOfService", node, false, location, result); info.setTermsOfService(value); ObjectNode obj = getObject("contact", node, false, "contact", result); Contact contact = getContact(obj, location, result); info.setContact(contact); obj = getObject("license", node, false, location, result); License license = getLicense(obj, location, result); info.setLicense(license); value = getString("version", node, true, location, result); info.setVersion(value); info.setExtensions(new LinkedHashMap<>()); Set<String> keys = getKeys(node); for(String key : keys) { if(key.startsWith("x-")) { info.getExtensions().put(key, Json.mapper().convertValue(node.get(key), Object.class)); } else if (!INFO_KEYS.contains(key)) { result.extra(location, key, node.get(key)); } } return info; }

Target:
public Info getInfo(ObjectNode node, String location, ParseResult result) { if (node == null) return null; Info info = new Info(); String value = getString("title", node, true, location, result); if(StringUtils.isNotBlank(value)) { info.setTitle(value); } value = getString("description", node, false, location, result); if(StringUtils.isNotBlank(value)) { info.setDescription(value); } value = getString("termsOfService", node, false, location, result); if(StringUtils.isNotBlank(value)) { info.setTermsOfService(value); } ObjectNode obj = getObject("contact", node, false, "contact", result); Contact contact = getContact(obj, location, result); if(obj != null) { info.setContact(contact); } obj = getObject("license", node, false, location, result); License license = getLicense(obj, location, result); if(obj != null) { info.setLicense(license); } value = getString("version", node, true, location, result); if(StringUtils.isNotBlank(value)) { info.setVersion(value); } Map <String,Object> extensions = getExtensions(node,location,result); if(extensions != null && extensions.size() > 0) { info.setExtensions(extensions); } return info; }
Source:
public SuccessResponse truncateTable( @ApiParam(value = "Name of the table to update", required = true) @PathParam("tableName") String tableName, @ApiParam(value = "realtime|offline") @QueryParam("type") String tableTypeStr) throws Exception { TableType tableType = Constants.validateTableType(tableTypeStr); if (tableType == null) { throw new ControllerApplicationException(LOGGER, "Table type must not be null", Response.Status.BAD_REQUEST); } if (tableType != TableType.REALTIME && _pinotHelixResourceManager.hasOfflineTable(tableName)) { String tableNameWithType = TableNameBuilder.OFFLINE.tableNameWithType(tableName); _pinotHelixResourceManager.toggleTableState(tableNameWithType, StateType.DISABLE); } if (tableType != TableType.OFFLINE && _pinotHelixResourceManager.hasOfflineTable(tableName)) { String tableNameWithType = TableNameBuilder.REALTIME.tableNameWithType(tableName); _pinotHelixResourceManager.toggleTableState(tableNameWithType, StateType.DISABLE); } String tableNameWithType = getExistingTableNamesWithType(tableName, tableType).get(0); List<String> segmentNames = _pinotHelixResourceManager.getSegmentsFor(tableNameWithType); PinotResourceManagerResponse response = _pinotHelixResourceManager.deleteSegments(tableNameWithType, segmentNames); if (!response.isSuccessful()) { throw new ControllerApplicationException(LOGGER, "Failed to delete segments from table: " + tableNameWithType + ", error message: " + response.getMessage(), Response.Status.INTERNAL_SERVER_ERROR); } return new SuccessResponse("Table " + tableName + " successfully truncated"); }

Target:
public SuccessResponse truncateTable( @ApiParam(value = "Name of the table to update", required = true) @PathParam("tableName") String tableName, @ApiParam(value = "realtime|offline") @QueryParam("type") String tableTypeStr) throws Exception { TableType tableType = Constants.validateTableType(tableTypeStr); if (tableType == null) { throw new ControllerApplicationException(LOGGER, "Table type must not be null", Response.Status.BAD_REQUEST); } toggleTableState(tableName, tableType, StateType.DISABLE); String tableNameWithType = getExistingTableNamesWithType(tableName, tableType).get(0); List<String> segmentNames = _pinotHelixResourceManager.getSegmentsFor(tableNameWithType); PinotResourceManagerResponse response = _pinotHelixResourceManager.deleteSegments(tableNameWithType, segmentNames); toggleTableState(tableName, tableType, StateType.ENABLE); if (tableType != TableType.OFFLINE && _pinotHelixResourceManager.hasRealtimeTable(tableName)) { String realtimeTableName = TableNameBuilder.REALTIME.tableNameWithType(tableName); TableConfig realtimeTableConfig = _pinotHelixResourceManager.getTableConfig(realtimeTableName); _pinotHelixResourceManager.ensureRealtimeClusterIsSetUp(realtimeTableConfig); } if (!response.isSuccessful()) { throw new ControllerApplicationException(LOGGER, "Failed to delete segments from table: " + tableNameWithType + ", error message: " + response.getMessage(), Response.Status.INTERNAL_SERVER_ERROR); } return new SuccessResponse("Table " + tableName + " successfully truncated"); }
Source:
protected List<IOseeBranch> innerCall() throws Exception { Conditions.checkNotNull(branchToken, "branchToPurge"); BranchQuery branchQuery = queryFactory.branchQuery(); branchQuery.andIds(branchToken); if (isRecursive) { branchQuery.andIsChildOf(branchToken); } ResultSet<BranchReadable> branches = branchQuery.getResults(); Assert.isTrue(!branches.isEmpty(), "branchesToPurge"); List<IOseeBranch> purged = new LinkedList<IOseeBranch>(); List<BranchReadable> orderedBranches = BranchUtil.orderByParentReadable(queryFactory, branches); for (BranchReadable aBranch : orderedBranches) { checkForCancelled(); checkForChildBranches(aBranch); Callable<Void> callable = getBranchStore().purgeBranch(getSession(), aBranch); callAndCheckForCancel(callable); purged.add(aBranch); } return purged; }

Target:
protected List<IOseeBranch> innerCall() throws Exception { Conditions.checkNotNull(branchToken, "branchToPurge"); BranchQuery branchQuery = queryFactory.branchQuery(); branchQuery.andIds(branchToken); if (isRecursive) { branchQuery.andIsChildOf(branchToken); } ResultSet<BranchReadable> branches = branchQuery.getResults(); List<IOseeBranch> purged = new LinkedList<IOseeBranch>(); List<BranchReadable> orderedBranches = BranchUtil.orderByParentReadable(queryFactory, branches); for (BranchReadable aBranch : orderedBranches) { checkForCancelled(); checkForChildBranches(aBranch); Callable<Void> callable = getBranchStore().purgeBranch(getSession(), aBranch); callAndCheckForCancel(callable); purged.add(aBranch); } return purged; }
Source:
public void setUp() { SimpleDependecyInjector.getInstance().bind(OsRepository.class, osRepository); final int osId = 0; Map<Integer, Map<Version, List<DisplayType>>> displayTypeMap = new HashMap<>(); displayTypeMap.put(osId, new HashMap<Version, List<DisplayType>>()); displayTypeMap.get(osId).put(null, Arrays.asList(DisplayType.qxl)); when(osRepository.getDisplayTypes()).thenReturn(displayTypeMap); setupTest(); }

Target:
public void setUp() { SimpleDependecyInjector.getInstance().bind(OsRepository.class, osRepository); final int osId = 0; Map<Integer, Map<Version, List<DisplayType>>> displayTypeMap = new HashMap<>(); displayTypeMap.put(osId, new HashMap<Version, List<DisplayType>>()); displayTypeMap.get(osId).put(null, Arrays.asList(DisplayType.qxl)); when(osRepository.getDisplayTypes()).thenReturn(displayTypeMap); mockVdsGroup(); try { xmlOvfData = new String(Files.readAllBytes(Paths.get(VM_OVF_XML_DATA))); } catch (IOException e) { e.printStackTrace(); } }
Source:
@Override public void cancel() { if (isCancelled()) return; nodes.forEach(nodeId -> { try { exchange.cancelOutbox(nodeId, queryId(), srcFragmentId, exchangeId); } catch (IgniteCheckedException e) { e.printStackTrace(); } }); close(); super.cancel(); }

Target:
@Override public void cancel() { if (isCancelled()) return; buffers.forEach(Buffer::cancel); close(); super.cancel(); }
Source:
private void handleJson(HttpServerRequest request) { request.response().putHeader(CONTENT_TYPE, RESPONSE_TYPE_JSON).putHeader(SERVER, VERTX) .putHeader(DATE, dateString).putHeader(CONTENT_LENGTH, JSON_HELLO_WORLD_CONTENT_LENGTH).end(JSON_HELLO_WORLD_BUFFER); }

Target:
private void handleJson(HttpServerRequest request) { Buffer buff = Buffer.buffer(Json.encode(Collections.singletonMap(MESSAGE, HELLO_WORLD))); request.response().putHeader(CONTENT_TYPE, RESPONSE_TYPE_JSON).putHeader(SERVER, VERTX) .putHeader(DATE, dateString).end(buff); }
Source:
public void testChargeRetrieveNullId() throws StripeException { try { Charge.retrieve(null); assertTrue(false); } catch (InvalidRequestException e) { String requestId = e.getRequestId(); assertTrue(requestId != null); assertTrue(e.toString().contains(requestId)); } }

Target:
public void testChargeRetrieveNullId() throws StripeException { try { Charge.retrieve(null); assertTrue(false); } catch (InvalidRequestException e) { String requestId = e.getRequestId(); assertFalse(requestId == null); assertFalse(requestId.equals("")); assertTrue(e.toString().contains(requestId)); } }
Source:
public void setUp() throws Exception { tearDown(); final Props props = new Props(); storageManager = mock(StorageManager.class); projectLoader = mock(ProjectLoader.class); azkabanProjectLoader = new AzkabanProjectLoader(props, projectLoader, storageManager); }

Target:
public void setUp() throws Exception { final Props props = new Props(); props.put(PROJECT_TEMP_DIR, this.TEMP_DIR.getRoot().getAbsolutePath()); this.storageManager = mock(StorageManager.class); this.projectLoader = mock(ProjectLoader.class); this.azkabanProjectLoader = new AzkabanProjectLoader(props, this.projectLoader, this.storageManager); }
Source:
public Chapter getChapter(int chapterNumber) { try { ChunkPlugin chunks = project.getChunkPlugin(new ChunkPluginLoader(context)); List<Chapter> chapters = chunks.getChapters(); for (Chapter chapter: chapters) { if(chapter.getNumber() == chapterNumber) { return chapter; } } } catch (IOException e) { e.printStackTrace(); } return null; }

Target:
private Chapter getChapter(int chapterNumber) { for (Chapter chapter: chapters) { if(chapter.getNumber() == chapterNumber) { return chapter; } } return null; }
Source:
public void create() { if (!isKerberosAuth()) { return; } String engineEtc = System.getenv("ENGINE_ETC"); if (engineEtc == null) { engineEtc = "/etc/ovirt-engine"; } File krb5File = new File(engineEtc, "krb5.conf"); if (krb5File.exists()) { if (log.isDebugEnabled()) { log.debug("Loading kerberos settings from " + krb5File.getAbsolutePath()); } System.setProperty("java.security.krb5.conf", krb5File.getAbsolutePath()); } else { log.error("Failed loading kerberos setting. File " + krb5File + " not found."); } System.setProperty("sun.security.krb5.msinterop.kstring","true"); }

Target:
public void create() { if (!isKerberosAuth()) { return; } String engineEtc = System.getenv("ENGINE_ETC"); if (engineEtc == null) { engineEtc = "/etc/ovirt-engine"; } File krb5File = new File(engineEtc, "krb5.conf"); if (krb5File.exists()) { if (log.isDebugEnabled()) { log.debug("Loading kerberos settings from " + krb5File.getAbsolutePath()); } System.setProperty("java.security.krb5.conf", krb5File.getAbsolutePath()); System.setProperty("sun.security.krb5.msinterop.kstring","true"); } else { log.error("Failed loading kerberos setting. File " + krb5File + " not found."); throw new RuntimeException("Failed loading kerberos setting. File " + krb5File + " not found. Kerberos file requied for Kerberos authentication."); } }
Source:
public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; LazyArrayIntTags that = (LazyArrayIntTags) o; return Objects.equals(this.getVal(), that.getVal()); }

Target:
public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof LazyArrayIntTags)) return false; LazyArrayIntTags that = (LazyArrayIntTags) o; return this.getVal() == that.getVal(); }
Source:
public void onShowDiagnosticsProject() { final ProgressIndicator indicator = globalDisplay_.getProgressIndicator("Lint"); indicator.onProgress("Linting..."); projServer_.analyzeProject(new ServerRequestCallback<Void>() { @Override public void onResponseReceived(Void response) { indicator.onCompleted(); } @Override public void onError(ServerError error) { Debug.logError(error); indicator.onCompleted(); } }); }

Target:
public void onShowDiagnosticsProject() { final ProgressIndicator indicator = globalDisplay_.getProgressIndicator("Lint"); indicator.onProgress("Analyzing project sources..."); projServer_.analyzeProject(new ServerRequestCallback<Void>() { @Override public void onResponseReceived(Void response) { indicator.onCompleted(); } @Override public void onError(ServerError error) { Debug.logError(error); indicator.onCompleted(); } }); }
Source:
public MegaMekLabMainUI() { EquipmentType.initializeTypes(); MechSummaryCache.getInstance(); new CConfig(); UnitUtil.loadFonts(); System.out.println("Starting MegaMekLab version: " + MegaMekLab.VERSION); setLookAndFeel(); setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent evt) { exit(); } }); setResizable(true); setExtendedState(CConfig.getIntParam("WINDOWSTATE")); }

Target:
public MegaMekLabMainUI() { EquipmentType.initializeTypes(); MechSummaryCache.getInstance(); new CConfig(); UnitUtil.loadFonts(); setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE); addWindowListener(new WindowAdapter() { @Override public void windowClosing(WindowEvent evt) { exit(); } }); setResizable(true); setExtendedState(CConfig.getIntParam("WINDOWSTATE")); }
Source:
private void initializationTask() { log.info("Start initialization task"); try { while (!shutdown && serverContext.getManagementLayout() == null) { log.warn("initializationTask: Management Server waiting to be bootstrapped"); Sleep.MILLISECONDS.sleepRecoverably(CHECK_BOOTSTRAP_INTERVAL.toMillis()); } } catch (InterruptedException e) { log.debug("initializationTask: Initialization task interrupted without " + "management server bootstrapped"); return; } long recoveryAttempts = 0; while (!shutdown && !recovered) { try { Layout layout = serverContext.copyManagementLayout(); if (runRecoveryReconfiguration(layout, getCorfuRuntime())) { serverContext.saveManagementLayout(getCorfuRuntime().getLayoutView().getLayout()); log.info("initializationTask: Recovery completed"); recovered = true; } log.error("initializationTask: Recovery failed times. Retrying in {}s.", ++recoveryAttempts, RECOVERY_RETRY_INTERVAL); Sleep.MILLISECONDS.sleepRecoverably(RECOVERY_RETRY_INTERVAL.toMillis()); } catch (InterruptedException e) { log.debug("initializationTask: Initialization task interrupted without recovered"); return; } catch (Exception e) { log.error("initializationTask: exception happened during layout recovery, {}", e); } } if (!shutdown) { localMonitoringService.start(METRICS_POLL_INTERVAL); remoteMonitoringService.start(METRICS_POLL_INTERVAL); } }

Target:
private void initializationTask() { log.info("Start initialization task"); try { while (!shutdown && serverContext.getManagementLayout() == null) { log.warn("initializationTask: Management Server waiting to be bootstrapped"); Sleep.MILLISECONDS.sleepRecoverably(CHECK_BOOTSTRAP_INTERVAL.toMillis()); } } catch (InterruptedException e) { log.debug("initializationTask: Initialization task interrupted without " + "management server bootstrapped"); return; } long recoveryAttempts = 0; while (!shutdown && !recovered) { try { Layout layout = serverContext.copyManagementLayout(); if (runRecoveryReconfiguration(layout, getCorfuRuntime())) { serverContext.saveManagementLayout(getCorfuRuntime().getLayoutView().getLayout()); log.info("initializationTask: Recovery completed"); recovered = true; continue; } log.error("initializationTask: Recovery failed times. Retrying in {}s.", ++recoveryAttempts, RECOVERY_RETRY_INTERVAL); Sleep.MILLISECONDS.sleepRecoverably(RECOVERY_RETRY_INTERVAL.toMillis()); } catch (InterruptedException e) { log.debug("initializationTask: Initialization task interrupted without being recovered"); return; } catch (Exception e) { log.error("initializationTask: exception happened during layout recovery, {}", e); } } if (!shutdown) { localMonitoringService.start(METRICS_POLL_INTERVAL); remoteMonitoringService.start(METRICS_POLL_INTERVAL); } }
Source:
private void nextForEach(final Iterator<Connection> iterator, final LeastRecentlyUsedCache.Predicate<Connection> handler, final ForEachFuture result) { if (!result.isCancelled() && iterator.hasNext()) { final Connection next = iterator.next(); try { next.getExecutor().execute(new Runnable() { @Override public void run() { boolean done = true; try { if (!handler.accept(next)) { done = false; nextForEach(iterator, handler, result); } } finally { if (done) { result.done(); } } } }); return; } catch (RejectedExecutionException ex) { if (!handler.accept(next)) { while (iterator.hasNext()) { if (handler.accept(iterator.next())) { break; } if (result.isCancelled()) { break; } } } } } result.done(); }

Target:
private void nextForEach(final Iterator<Connection> iterator, final LeastRecentlyUsedCache.Predicate<Connection> handler, final ForEachFuture result) { if (!result.isStopped() && iterator.hasNext()) { final Connection next = iterator.next(); try { next.getExecutor().execute(new Runnable() { @Override public void run() { boolean done = true; try { if (!result.isStopped() && !handler.accept(next)) { done = false; nextForEach(iterator, handler, result); } } catch (Exception exception) { result.failed(exception); } finally { if (done) { result.done(); } } } }); return; } catch (RejectedExecutionException ex) { if (!handler.accept(next)) { while (iterator.hasNext()) { if (handler.accept(iterator.next())) { break; } if (result.isStopped()) { break; } } } } } result.done(); }
Source:
void writeInfoFromNode(ITmfStateIntervalList stateInfo) { assert (this.isDone); if (intervals.size() == 0) { return; } for (int i = 0; i < intervals.size(); i++) { stateInfo.add(intervals.get(i)); } return; }

Target:
void writeInfoFromNode(ITmfStateIntervalList stateInfo) { assert (this.isDone); if (intervals.isEmpty()) { return; } for (int i = 0; i < intervals.size(); i++) { stateInfo.add(intervals.get(i)); } return; }
Source:
public void init() { int numberOfListeners = systemEnvironment.getNumberOfPluginNotificationListener(); for (int i = 0; i < numberOfListeners; i++) { PluginNotificationService pluginNotificationService = new PluginNotificationService(notificationExtension, serverHealthService); pluginNotificationQueue.addListener(new PluginNotificationListener(pluginNotificationService)); } }

Target:
public void init() { int numberOfListeners = systemEnvironment.getNumberOfPluginNotificationListener(); for (int i = 0; i < numberOfListeners; i++) { pluginNotificationQueue.addListener(new PluginNotificationListener(pluginNotificationService)); } }
Source:
private String capitalizeSyllabicR(String word) { return word.replaceAll("(^|[^aeiou])r($|[^aeiou])", "$1R$2"); }

Target:
private String capitalizeSyllabicR(String word) { return syllabicRPattern.matcher(word).replaceAll("$1R$2"); }
Source:
public void onSuccess(SendMessageRequest request, SendMessageResult result) { if (logger.isDebugEnabled()) { logger.debug("-> Message id:" + result.getMessageId() + ", sequence number:" + result.getSequenceNumber()); logger.debug(" " + json); logger.debug(" " + position); logger.debug(""); } cc.markCompleted(); }

Target:
public void onSuccess(SendMessageRequest request, SendMessageResult result) { if (logger.isDebugEnabled()) { logger.debug("-> Message id:" + result.getMessageId() + ", sequence number:" + result.getSequenceNumber()+" "+json+" "+position); } cc.markCompleted(); }
Source:
public JavaType[] getOperationParameterClasses(Operation operation, Map<String, Schema> definitions) { TypeFactory tf = Json.mapper().getTypeFactory(); if (operation.getParameters() == null){ operation.setParameters(new ArrayList<Parameter>()); } int body = 0; JavaType[] bodyArgumentClass = null; if (operation.getRequestBody() != null){ bodyArgumentClass = getTypeFromRequestBody(operation.getRequestBody(), definitions); if (bodyArgumentClass != null) { body = bodyArgumentClass.length; } } JavaType[] jt = new JavaType[operation.getParameters().size() + 1 + body]; int i = 0; jt[i] = tf.constructType(RequestContext.class); i += 1; for (Parameter parameter : operation.getParameters()) { JavaType argumentClass = getTypeFromParameter(parameter, definitions); jt[i] = argumentClass; i += 1; } if (operation.getRequestBody() != null && bodyArgumentClass != null) { for(int y = 0; y < bodyArgumentClass.length; y++) { jt[i] = bodyArgumentClass[y]; i += 1; } } return jt; }

Target:
public JavaType[] getOperationParameterClasses(Operation operation, Map<String, Schema> definitions) { TypeFactory tf = Json.mapper().getTypeFactory(); if (operation.getParameters() == null){ operation.setParameters(new ArrayList<Parameter>()); } int body = 0; JavaType[] bodyArgumentClasses = null; if (operation.getRequestBody() != null){ bodyArgumentClasses = getTypeFromRequestBody(operation.getRequestBody(), definitions); if (bodyArgumentClasses != null) { body = bodyArgumentClasses.length; } } JavaType[] jt = new JavaType[operation.getParameters().size() + 1 + body]; int i = 0; jt[i] = tf.constructType(RequestContext.class); i += 1; for (Parameter parameter : operation.getParameters()) { JavaType argumentClasses = getTypeFromParameter(parameter, definitions); jt[i] = argumentClasses; i += 1; } if (operation.getRequestBody() != null && bodyArgumentClasses != null) { for (JavaType argument :bodyArgumentClasses) { jt[i] = argument; i += 1; } } return jt; }
Source:
public static <T> T checkNotNull(T reference, @Nullable Object message) { try { return Preconditions.checkNotNull(reference, message); } catch (NullPointerException e) { throw new BadRequestException(e.getMessage(), e); } }

Target:
public static <T> T checkNotNull(T reference, @Nullable Object message) { checkArgument(reference != null, message); return reference; }
Source:
public void testInvalidNumber() { SearchContext context = new SearchContext(); List<Condition> conditions = new ArrayList<>(); Condition cond = new Condition(); cond.setKey("batteryLevel"); cond.setOperator("="); cond.setValue("bbb"); cond.setState(Condition.State.OR); conditions.add(cond); context.setConditions(conditions); SearchManagerService service = new SearchManagerServiceImpl(); try { service.search(context); } catch (SearchMgtException e) { String expectedException = e.getCause().getClass().getName(); Assert.assertTrue(expectedException.contains("InvalidOperatorException")); } }

Target:
public void testInvalidNumber() throws SearchMgtException { SearchContext context = new SearchContext(); List<Condition> conditions = new ArrayList<>(); Condition cond = new Condition(); cond.setKey("batteryLevel"); cond.setOperator("="); cond.setValue("bbb"); cond.setState(Condition.State.OR); conditions.add(cond); context.setConditions(conditions); SearchManagerService service = new SearchManagerServiceImpl(); try { service.search(context); } catch (SearchMgtException e) { if (!(e.getCause() instanceof InvalidOperatorException)) { throw e; } } }
Source:
public final int getAdapterPosition() { return getAdapterPositionInRecyclerView(); }

Target:
public final int getAdapterPosition() { return getAbsoluteAdapterPosition(); }
Source:
public static TenantId of(String value) { checkNotEmptyOrBlank(value); return TenantId.newBuilder() .setValue(value) .build(); }

Target:
public static TenantId of(String value) { checkNotEmptyOrBlank(value, "A tenant ID cannot be empty or blank."); return TenantId.newBuilder() .setValue(value) .build(); }
Source:
public int hashCode() { int result = cacheLoaderFactory != null ? cacheLoaderFactory.hashCode() : 0; result = 31 * result + listenerConfigurations.hashCode(); result = 31 * result + keyType.hashCode(); result = 31 * result + valueType.hashCode(); result = 31 * result + (cacheWriterFactory != null ? cacheWriterFactory.hashCode() : 0); result = 31 * result + (expiryPolicyFactory != null ? expiryPolicyFactory.hashCode() : 0); result = 31 * result + (isReadThrough ? 1 : 0); result = 31 * result + (isWriteThrough ? 1 : 0); result = 31 * result + (isStatisticsEnabled ? 1 : 0); result = 31 * result + (isStoreByValue ? 1 : 0); result = 31 * result + (isManagementEnabled ? 1 : 0); result = 31 * result + (hotRestartConfig != null ? hotRestartConfig.hashCode() : 0); result = 31 * result + (eventJournalConfig != null ? eventJournalConfig.hashCode() : 0); return result; }

Target:
public int hashCode() { int result = cacheLoaderFactory != null ? cacheLoaderFactory.hashCode() : 0; result = 31 * result + listenerConfigurations.hashCode(); result = 31 * result + keyType.hashCode(); result = 31 * result + valueType.hashCode(); result = 31 * result + (cacheWriterFactory != null ? cacheWriterFactory.hashCode() : 0); result = 31 * result + (expiryPolicyFactory != null ? expiryPolicyFactory.hashCode() : 0); result = 31 * result + (isReadThrough ? 1 : 0); result = 31 * result + (isWriteThrough ? 1 : 0); result = 31 * result + (isStatisticsEnabled ? 1 : 0); result = 31 * result + (isStoreByValue ? 1 : 0); result = 31 * result + (isManagementEnabled ? 1 : 0); result = 31 * result + hotRestartConfig.hashCode(); result = 31 * result + eventJournalConfig.hashCode(); return result; }
Source:
public DroolsAbstractPMMLTest() { super(); Properties props = System.getProperties(); props.setProperty("drools.dump.dir", "/home/gcardosi/NotBackedUp/old_pmml_dump_dir"); }

Target:
public DroolsAbstractPMMLTest() { super(); }
Source:
public void setup(Context.OperatorContext context) { updatedKeyStorage.getStore().setup(context); updatedKeyStorage.setup(context); super.setup(context); }

Target:
public void setup(Context.OperatorContext context) { if (useUpdatedKeyStorage()) { updatedKeyStorage.getStore().setup(context); updatedKeyStorage.setup(context); } super.setup(context); }
Source:
public RelWriter explainTerms(RelWriter pw) { super.explainTerms(pw); for (Ord<RelNode> ord : Ord.zip(inputs)) { pw.input("input#" + ord.i, ord.e); } pw.item("invocation", rexCall) .item("rowType", rowType); if (elementType != null) { pw.item("elementType", elementType); } if (columnMappings != null) { pw.item("columnMappings", columnMappings); } return pw; }

Target:
public RelWriter explainTerms(RelWriter pw) { super.explainTerms(pw); for (Ord<RelNode> ord : Ord.zip(inputs)) { pw.input("input#" + ord.i, ord.e); } pw.item("invocation", rexCall) .item("rowType", rowType); if (elementType != null) { pw.item("elementType", elementType); } return pw; }
Source:
public void value(@NonNull File file) throws IOException { super.flush(); beforeValue(false); Reader input = null; try { FileInputStream fis = new FileInputStream(file); input = new BufferedReader(new InputStreamReader(fis, "UTF-8")); IOUtils.copy(input, out); } finally { IOUtils.closeQuietly(input); } out.flush(); }

Target:
public void value(@NonNull File file) throws IOException { if (file == null || file.length() <= 0) { return; } super.flush(); beforeValue(false); Reader input = null; try { FileInputStream fis = new FileInputStream(file); input = new BufferedReader(new InputStreamReader(fis, "UTF-8")); IOUtils.copy(input, out); } finally { IOUtils.closeQuietly(input); } out.flush(); }
Source:
public static void setUpBlockingChecks() { new MappingJackson2HttpMessageConverter().canRead( new ParameterizedTypeReference<Map<String, Object>>() { }.getType(), null, null); BlockHound.install(); }

Target:
public static void setUpBlockingChecks() { Class.class.getPackage(); BlockHound.install(); }
Source:
public WysiwygEditorPage() { final Form<Void> form = new Form<Void>("form"); add(form.setOutputMarkupId(true)); DefaultWysiwygToolbar toolbar = new DefaultWysiwygToolbar("toolbar"); final WysiwygEditor editor = new WysiwygEditor("wysiwyg", new PropertyModel<String>(this, "text"), toolbar); form.add(toolbar, editor); final FeedbackPanel feedback = new JQueryFeedbackPanel("feedback"); form.add(feedback); add(new AjaxButton("display", form) { private static final long serialVersionUID = 1L; @Override protected void onSubmit(AjaxRequestTarget target, Form<?> _form) { String html = editor.getModelObject(); if (html != null) { _form.info(html); } target.add(feedback); } } , new WebMarkupContainer("disable").setMarkupId("disable-btn").add(new JQueryBehavior("#disable-btn", "button") , new AjaxEventBehavior("click") { private static final long serialVersionUID = 1L; @Override protected void onEvent(AjaxRequestTarget target) { target.add(form.setEnabled(!form.isEnabled())); } }) ); }

Target:
public WysiwygEditorPage() { final Form<Void> form = new Form<Void>("form"); add(form.setOutputMarkupId(true)); DefaultWysiwygToolbar toolbar = new DefaultWysiwygToolbar("toolbar"); final WysiwygEditor editor = new WysiwygEditor("wysiwyg", new PropertyModel<String>(this, "text"), toolbar); form.add(toolbar, editor); final FeedbackPanel feedback = new JQueryFeedbackPanel("feedback"); form.add(feedback); add(new AjaxButton("display", form) { private static final long serialVersionUID = 1L; @Override protected void onSubmit(AjaxRequestTarget target, Form<?> _form) { String html = editor.getModelObject(); if (html != null) { _form.info(html); } target.add(feedback); } } , new WebMarkupContainer("disable").setMarkupId("disable-btn").add(new ButtonBehavior("#disable-btn") , new AjaxEventBehavior("click") { private static final long serialVersionUID = 1L; @Override protected void onEvent(AjaxRequestTarget target) { target.add(form.setEnabled(!form.isEnabled())); } }) ); }
Source:
public String id() { return getString("id"); }

Target:
public String id() { return getId(); }
Source:
public void testSelectionNodeAndEdges() { diagram.addNode(aClassNode, new Point2D.Double(5, 5)); diagram.addNode(aInterfaceNode, new Point2D.Double(44, 44)); diagram.addNode(aPackageNode, new Point2D.Double(87, 87)); diagram.addNode(aNoteNode, new Point2D.Double(134, 132)); diagram.addEdge(aggrEdge, new Point2D.Double(8, 10), new Point2D.Double(45, 48)); diagram.addEdge(assoEdge, new Point2D.Double(47, 49), new Point2D.Double(9, 17)); diagram.addEdge(depeEdge, new Point2D.Double(90, 93), new Point2D.Double(44, 49)); SelectionList aList = new SelectionList(); aList.add(aClassNode); aList.add(aggrEdge); aList.add(aInterfaceNode); Rectangle2D edge1_old_bonds = aggrEdge.getBounds(); for(GraphElement element: aList) { if(element instanceof Node) { ((Node) element).translate(10, 10); } } assertTrue(15 == aClassNode.getBounds().getX()); assertTrue(15 == aClassNode.getBounds().getY()); assertTrue(54 == aInterfaceNode.getBounds().getX()); assertTrue(54 == aInterfaceNode.getBounds().getY()); assertFalse(edge1_old_bonds.getY() == aggrEdge.getBounds().getY()); assertTrue(aClassNode == aggrEdge.getStart()); assertTrue(aInterfaceNode == aggrEdge.getEnd()); }

Target:
public void testSelectionNodeAndEdges() { aDiagram.addNode(aClassNode, new Point2D.Double(5, 5)); aDiagram.addNode(aInterfaceNode, new Point2D.Double(44, 44)); aDiagram.addNode(aPackageNode, new Point2D.Double(87, 87)); aDiagram.addNode(aNoteNode, new Point2D.Double(134, 132)); aDiagram.addEdge(aAggregationEdge, new Point2D.Double(8, 10), new Point2D.Double(45, 48)); aDiagram.addEdge(aAssociationEdge, new Point2D.Double(47, 49), new Point2D.Double(9, 17)); aDiagram.addEdge(aDependencyEdge, new Point2D.Double(90, 93), new Point2D.Double(44, 49)); aList.add(aClassNode); aList.add(aAggregationEdge); aList.add(aInterfaceNode); Rectangle2D aggregationEdgeBounds = aAggregationEdge.getBounds(); for(GraphElement element: aList) { if(element instanceof Node) { ((Node) element).translate(10, 10); } } assertEquals(new Rectangle2D.Double(15, 15, 100, 60), aClassNode.getBounds()); assertEquals(new Rectangle2D.Double(54, 54, 100, 60), aInterfaceNode.getBounds()); assertFalse(aggregationEdgeBounds == aAggregationEdge.getBounds()); assertTrue(aClassNode == aAggregationEdge.getStart()); assertTrue(aInterfaceNode == aAggregationEdge.getEnd()); }
Source:
public void createDatabaseWithUsers() { final String dbName = "testDB-" + UUID.randomUUID().toString(); final Boolean resultCreate = arangoDB.createDatabase(new DBCreateOptions() .name(dbName) .users(Collections.singletonList(new DatabaseUsersOptions() .active(true) .username("testUser") .passwd("testPasswd") )) ); assertThat(resultCreate, is(true)); DatabaseEntity info = arangoDB.db(dbName).getInfo(); assertThat(info.getName(), is(dbName)); assertThat(arangoDB.getUsers().stream().anyMatch(it -> it.getUser().equals("testUser")), is(true)); ArangoDB arangoDBTestUser = new ArangoDB.Builder() .user("testUser") .password("testPasswd") .build(); ArangoCollection collection = arangoDBTestUser.db(dbName).collection("col-" + UUID.randomUUID().toString()); collection.create(); arangoDBTestUser.shutdown(); final Boolean resultDelete = arangoDB.db(dbName).drop(); assertThat(resultDelete, is(true)); }

Target:
public void createDatabaseWithUsers() { final String dbName = "testDB-" + UUID.randomUUID().toString(); final Map<String, Object> extra = Collections.singletonMap("key", "value"); final Boolean resultCreate = arangoDB.createDatabase(new DBCreateOptions() .name(dbName) .users(Collections.singletonList(new DatabaseUsersOptions() .active(true) .username("testUser") .passwd("testPasswd") .extra(extra) )) ); assertThat(resultCreate, is(true)); DatabaseEntity info = arangoDB.db(dbName).getInfo(); assertThat(info.getName(), is(dbName)); Optional<UserEntity> retrievedUserOptional = arangoDB.getUsers().stream() .filter(it -> it.getUser().equals("testUser")) .findFirst(); assertThat(retrievedUserOptional.isPresent(), is(true)); UserEntity retrievedUser = retrievedUserOptional.get(); assertThat(retrievedUser.getActive(), is(true)); assertThat(retrievedUser.getExtra(), is(extra)); ArangoDB arangoDBTestUser = new ArangoDB.Builder() .user("testUser") .password("testPasswd") .build(); ArangoCollection collection = arangoDBTestUser.db(dbName).collection("col-" + UUID.randomUUID().toString()); collection.create(); arangoDBTestUser.shutdown(); final Boolean resultDelete = arangoDB.db(dbName).drop(); assertThat(resultDelete, is(true)); }
Source:
private List<MotechUser> prepareMotechUsersOne() { List<MotechUser> users = new ArrayList<>(); Calendar date = Calendar.getInstance(); MotechUser user = new MotechUser(); user.setUserName("fooUsernameOne"); user.setEmail("foouserone@foodomain.com"); date.add(Calendar.DAY_OF_YEAR, -14); user.setLastPasswordChange(new DateTime(date.getTime())); users.add(user); user = new MotechUser(); user.setUserName("fooUsernameTwo"); user.setEmail("foousertwo@foodomain.com"); date.add(Calendar.DAY_OF_YEAR, -1); user.setLastPasswordChange(new DateTime(date.getTime())); users.add(user); return users; }

Target:
private List<MotechUser> prepareMotechUsersOne() { List<MotechUser> users = new ArrayList<>(); DateTime date = DateUtil.now().minusDays(14); MotechUser user = new MotechUser(); user.setUserName("fooUsernameOne"); user.setEmail("foouserone@foodomain.com"); user.setLastPasswordChange(date); users.add(user); user = new MotechUser(); user.setUserName("fooUsernameTwo"); user.setEmail("foousertwo@foodomain.com"); user.setLastPasswordChange(date.minusDays(1)); users.add(user); user = new MotechUser(); user.setUserName("fooUsernameThree"); user.setEmail("foouserthree@foodomain.com"); user.setLastPasswordChange(date.minusDays(1)); users.add(user); user = new MotechUser(); user.setUserName("fooUsernameFour"); user.setEmail("foouserfour@foodomain.com"); user.setLastPasswordChange(date.minusDays(2)); users.add(user); return users; }
Source:
public void setInstallState(@Nonnull InstallState newState) { InstallState prior = installState; installState = newState; LOGGER.info("setInstallState (Previous:" + prior + ", New: " + installState + ")"); if (!newState.equals(prior)) { newState.initializeState(); getSetupWizard().onInstallStateUpdate(newState); } saveQuietly(); }

Target:
public void setInstallState(@Nonnull InstallState newState) { InstallState prior = installState; installState = newState; LOGGER.log(Main.isDevelopmentMode ? Level.INFO : Level.FINE, "Install state transitioning from: {0} to : {1}", new Object[] { prior, installState }); if (!newState.equals(prior)) { getSetupWizard().onInstallStateUpdate(newState); newState.initializeState(); } saveQuietly(); }
Source:
public static ColumnMapperFactory factory() { return (type, config) -> { Class<?> rawType = getErasedType(type); if (rawType == Option.class) { return Optional.of(VavrOptionMapper.of(type)); } return Optional.empty(); }; }

Target:
static ColumnMapperFactory factory() { return (type, config) -> { Class<?> rawType = getErasedType(type); if (rawType == Option.class) { final Type nestedType = GenericTypes.findGenericParameter(type, Option.class) .orElseThrow(() -> new NoSuchMapperException("No mapper for raw Option type")); return Optional.of(new VavrOptionMapper<>(nestedType)); } return Optional.empty(); }; }
Source:
private void maybePersistOldState(Map<String, String> oldState) { if (backupDirPath != null) { try { if (backupPrefixAndPath == null) { backupPrefixAndPath = reserveBackupFile(); } writeBackup(backupPrefixAndPath.getSecond(), oldState); } catch (Exception e) { logger.error("Could not write previous state backup file", e); accountServiceMetrics.backupErrorCount.inc(); } } }

Target:
private void maybePersistOldState(Map<String, String> oldState) { if (backupPrefixAndPath != null) { try { writeBackup(backupPrefixAndPath.getSecond(), oldState); } catch (Exception e) { logger.error("Could not write previous state backup file", e); accountServiceMetrics.backupErrorCount.inc(); } } }
Source:
private void runIngestJob(List<Content> datasources, IngestModuleFactory factory) { IngestModuleIngestJobSettings settings = factory.getDefaultIngestJobSettings(); IngestModuleTemplate template = new IngestModuleTemplate(factory, settings); template.setEnabled(true); ArrayList<IngestModuleTemplate> templates = new ArrayList<>(); templates.add(template); IngestJobSettings ingestJobSettings = new IngestJobSettings(EncryptionDetectionTest.class.getCanonicalName(), IngestType.FILES_ONLY, templates); try { List<IngestModuleError> errs = IngestJobRunner.runIngestJob(datasources, ingestJobSettings); assertEquals(0, errs.size()); } catch (InterruptedException ex) { Exceptions.printStackTrace(ex); Assert.fail(ex); } }

Target:
private void runIngestJob(List<Content> datasources, IngestModuleFactory factory) { IngestModuleIngestJobSettings settings = factory.getDefaultIngestJobSettings(); IngestModuleTemplate template = new IngestModuleTemplate(factory, settings); template.setEnabled(true); ArrayList<IngestModuleTemplate> templates = new ArrayList<>(); templates.add(template); IngestJobSettings ingestJobSettings = new IngestJobSettings(EncryptionDetectionTest.class.getCanonicalName(), IngestType.FILES_ONLY, templates); try { List<IngestModuleError> ingestModuleErrorsList = IngestJobRunner.runIngestJob(datasources, ingestJobSettings); String errorMessage = String.format("The ingest job runner produced %d error messages.", ingestModuleErrorsList.size()); assertEquals(errorMessage, 0, ingestModuleErrorsList.size()); } catch (InterruptedException ex) { Exceptions.printStackTrace(ex); Assert.fail(ex); } }
Source:
public static String getVersion(){ try { return CommCareApplication._().getCurrentVersionString(); } catch(NullPointerException e){ return "Version not set."; } }

Target:
public static String getVersion(){ try { return CommCareApplication._().getCurrentVersionString(); } catch(Exception e){ return "Version not set."; } }
Source:
private static ByteBuffer toByteArray(InputStream in) throws IOException { ByteArrayOutputStream os = new ByteArrayOutputStream(); byte[] buffer = new byte[1024]; int len; while ((len = in.read(buffer)) != -1) { os.write(buffer, 0, len); } return ByteBuffer.wrap(os.toByteArray()); }

Target:
private static ByteBuffer toByteArray(InputStream in) { try { ByteArrayOutputStream os = new ByteArrayOutputStream(); byte[] buffer = new byte[1024]; int len; while ((len = in.read(buffer)) != -1) { os.write(buffer, 0, len); } return ByteBuffer.wrap(os.toByteArray()); } catch (IOException e) { throw LOGGER.logExceptionAsError(new RuntimeException(e)); } }
Source:
public void onMapReady(@NonNull final MapboxMap mapboxMap) { mapboxMap.setStyle(Style.LIGHT, new Style.OnStyleLoaded() { @Override public void onStyleLoaded(@NonNull Style style) { attributionView = mapView.findViewById(R.id.attributionView); findViewById(R.id.switch_attribution_color_fab).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { if (index == attributionColors.length - 1) { mapboxMap.setStyle(Style.LIGHT); index = 0; } if (index == 2) { mapboxMap.setStyle(Style.DARK); } if (index == 4) { mapboxMap.setStyle(new Style.Builder().fromUri("mapbox://styles/appsatmapboxcom/ck0cyq1lt0bbo1cmwkpf2w7g9")); } attributionView.setColorFilter(attributionColors[index]); index++; } }); } }); }

Target:
public void onMapReady(@NonNull final MapboxMap mapboxMap) { mapboxMap.setStyle(Style.LIGHT, new Style.OnStyleLoaded() { @Override public void onStyleLoaded(@NonNull Style style) { attributionView = mapView.findViewById(R.id.attributionView); findViewById(R.id.switch_attribution_color_fab).setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { if (index == attributionColors.length - 1) { mapboxMap.setStyle(Style.LIGHT); index = 0; } if (index == 2) { mapboxMap.setStyle(Style.DARK); } if (index == 4) { mapboxMap.setStyle(new Style.Builder() .fromUri(CUSTOM_GREEN_MONOCHROME_STYLE_URI)); } attributionView.setColorFilter(attributionColors[index]); index++; } }); } }); }
Source:
public void deployPartial(String name, Set<TargetExtensions> targetExtensions) throws Exception { Bundle bundle = new BundleImpl(osgi, lookupBundle(name), null); RuntimeContext ctx = new OSGiRuntimeContext(runtime, bundle); listBundleComponents(bundle).map(URLStreamRef::new).forEach(component -> { try { this.deployPartialComponent(ctx, targetExtensions, component); } catch (IOException e) { log.error("PartialBundle: " + name + " failed to load: " + component, e); } }); }

Target:
public RuntimeContext deployPartial(String name, Set<TargetExtensions> targetExtensions) throws Exception { Bundle bundle = new BundleImpl(osgi, lookupBundle(name), null); RuntimeContext ctx = new OSGiRuntimeContext(runtime, bundle); listBundleComponents(bundle).map(URLStreamRef::new).forEach(component -> { try { this.deployPartialComponent(ctx, targetExtensions, component); } catch (IOException e) { log.error("PartialBundle: " + name + " failed to load: " + component, e); } }); return ctx; }
Source:
public void testConfigManual() { final Injector injector = createInjector(); final String propertyPrefix = "druid.query.scheduler"; final JsonConfigProvider<QuerySchedulerProvider> provider = JsonConfigProvider.of( propertyPrefix, QuerySchedulerProvider.class ); final Properties properties = new Properties(); properties.put(propertyPrefix + ".numThreads", "10"); properties.put(propertyPrefix + ".laning.strategy", "manual"); properties.put(propertyPrefix + ".laning.lanes.one", "1"); properties.put(propertyPrefix + ".laning.lanes.two", "2"); provider.inject(properties, injector.getInstance(JsonConfigurator.class)); final QueryScheduler scheduler = provider.get().get().get(); Assert.assertEquals(10, scheduler.getTotalAvailableCapacity()); Assert.assertEquals(1, scheduler.getLaneAvailableCapacity("one")); Assert.assertEquals(2, scheduler.getLaneAvailableCapacity("two")); }

Target:
public void testConfigManual() { final Injector injector = createInjector(); final String propertyPrefix = "druid.query.scheduler"; final JsonConfigProvider<QuerySchedulerProvider> provider = JsonConfigProvider.of( propertyPrefix, QuerySchedulerProvider.class ); final Properties properties = new Properties(); properties.put(propertyPrefix + ".numThreads", "10"); properties.put(propertyPrefix + ".laning.strategy", "manual"); properties.put(propertyPrefix + ".laning.lanes.one", "1"); properties.put(propertyPrefix + ".laning.lanes.two", "2"); provider.inject(properties, injector.getInstance(JsonConfigurator.class)); final QueryScheduler scheduler = provider.get().get().get(); Assert.assertEquals(10, scheduler.getTotalAvailableCapacity()); Assert.assertEquals(1, scheduler.getLaneAvailableCapacity("one")); Assert.assertEquals(2, scheduler.getLaneAvailableCapacity("two")); Assert.assertEquals(QueryScheduler.UNAVAILABLE, scheduler.getLaneAvailableCapacity("non-existent")); }
Source:
public void badReplicationLocationTest() throws Exception { processor = new ReplicationProcessor(repository, "/some/bad/location", 3, 100L); URI contentBase = createBaseContainer(RepositoryPathConstants.CONTENT_BASE); URI binaryUri = determineRepositoryPath(contentBase); String filename = "src/test/resources/external_file.txt"; File testFile = new File(filename); InputStream contentStream = new FileInputStream(testFile); String badChecksum = "9db3fcbaec92b9ccf9aa16f820184813080e77d2"; BinaryObject externalObj = repository.createBinary(binaryUri, "external_binary_test", contentStream, filename, MIMETYPE, null, null); when(message.getHeader(CdrBinaryChecksum)).thenReturn(badChecksum); when(message.getHeader(CdrBinaryUri)).thenReturn(externalObj.getUri().toString()); processor.process(exchange); }

Target:
public void badReplicationLocationTest() throws Exception { processor = new ReplicationProcessor(repository, "/some/bad/location", 3, 100L); }
Source:
private boolean radiologyReportNeedsToBeCreated(ModelAndView modelAndView, Order order) { if (order.isActive()) { RadiologyOrder radiologyOrder = radiologyService.getRadiologyOrderByOrderId(order.getOrderId()); if (radiologyService.hasRadiologyOrderClaimedRadiologyReport(radiologyOrder)) { modelAndView.addObject("radiologyReportNeedsToBeCreated", false); modelAndView.addObject("radiologyReport", radiologyService .getRadiologyReportsByRadiologyOrderAndRadiologyReportStatus(radiologyOrder, RadiologyReportStatus.CLAIMED).get(0)); return true; } if (radiologyService.hasRadiologyOrderCompletedRadiologyReport(radiologyOrder)) { modelAndView.addObject("radiologyReportNeedsToBeCreated", false); modelAndView.addObject("radiologyReport", radiologyService .getRadiologyReportsByRadiologyOrderAndRadiologyReportStatus(radiologyOrder, RadiologyReportStatus.COMPLETED).get(0)); return true; } modelAndView.addObject("radiologyReportNeedsToBeCreated", true); modelAndView.addObject("radiologyReport", new RadiologyReport(radiologyOrder)); return true; } return false; }

Target:
private boolean radiologyReportNeedsToBeCreated(ModelAndView modelAndView, Order order) { if (order.isActive()) { RadiologyOrder radiologyOrder = radiologyService.getRadiologyOrderByOrderId(order.getOrderId()); RadiologyReport radiologyReport = radiologyService.getActiveRadiologyReportByRadiologyOrder(radiologyOrder); if (radiologyReport == null) { modelAndView.addObject("radiologyReportNeedsToBeCreated", true); } else { modelAndView.addObject("radiologyReportNeedsToBeCreated", false); } modelAndView.addObject("radiologyReport", radiologyReport); return true; } return false; }
Source:
@Test public void testAggregateRollUp2() { String mv = "" + "select \"empid\", stddev_pop(\"deptno\") " + "from \"emps\" " + "group by \"empid\", \"deptno\""; String query = "" + "select \"empid\", stddev_pop(\"deptno\") " + "from \"emps\" " + "group by \"empid\""; sql(mv, query).noMat(); }

Target:
@Test void testAggregateRollUp2() { final String mv = "" + "select \"empid\", stddev_pop(\"deptno\") " + "from \"emps\" " + "group by \"empid\", \"deptno\""; final String query = "" + "select \"empid\", stddev_pop(\"deptno\") " + "from \"emps\" " + "group by \"empid\""; sql(mv, query).noMat(); }