auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void validateVendorIdAndCustomerInstitutionIdentifier() { if (payeeId.split("-").length > 1) { BusinessObjectService bos = SpringContext.getBean(BusinessObjectService.class); Map<String, String> fieldValues = new HashMap<String, String>(); fieldValues.put("vendorAddressGeneratedIdentifier", customerInstitutionNumber); String[] headerDetails = payeeId.split("-"); fieldValues.put("vendorHeaderGeneratedIdentifier", headerDetails[0] ); fieldValues.put("vendorDetailAssignedIdentifier", headerDetails[1]); List<VendorAddress> addrs = (List<VendorAddress>)bos.findMatching(VendorAddress.class, fieldValues); if (addrs.size() == 1) { VendorAddress addr = (VendorAddress) addrs.get(0); setVendorAddress(addr); } else { throw new RuntimeException("Invalid Address [ "+customerInstitutionNumber+" ] for payee [ "+payeeId + " ]"); } } }

Target:
public void validateVendorIdAndCustomerInstitutionIdentifier() { BusinessObjectService bos = SpringContext.getBean(BusinessObjectService.class); Map<String, String> fieldValues = new HashMap<String, String>(); fieldValues.put("vendorAddressGeneratedIdentifier", customerInstitutionNumber); String[] headerDetails = payeeId.split("-"); fieldValues.put("vendorHeaderGeneratedIdentifier", headerDetails[0] ); fieldValues.put("vendorDetailAssignedIdentifier", headerDetails[1]); List<VendorAddress> addrs = (List<VendorAddress>) bos.findMatching(VendorAddress.class, fieldValues); if (addrs.size() == 1) { VendorAddress addr = (VendorAddress) addrs.get(0); setVendorAddress(addr); } else { throw new RuntimeException( "Invalid Address [ " + customerInstitutionNumber + " ] for payee [ " + payeeId + " ]"); } }
Source:
static void removeOperator(JSONObject op, JSONObject graph){ List<JSONObject> opList = new ArrayList<>(); opList.add(op); removeOperators(opList, graph); }

Target:
static void removeOperator(JSONObject op, JSONObject graph){ removeOperators(Collections.singletonList(op), graph); }
Source:
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){ getDialog().getWindow().requestFeature(Window.FEATURE_NO_TITLE); myLayout = (LinearLayout) inflater.inflate(R.layout.calendar_widget, container); if(myCal == null){ myCal = Calendar.getInstance(); } initDisplay(); initWeekDays(); initOnClick(); refresh(); Rect displayRectangle = new Rect(); Window window = getActivity().getWindow(); window.getDecorView().getWindowVisibleDisplayFrame(displayRectangle); myLayout.setMinimumWidth((int)(displayRectangle.width() * 0.9f)); return myLayout; }

Target:
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState){ getDialog().getWindow().requestFeature(Window.FEATURE_NO_TITLE); inflateView(inflater, container); if(savedInstanceState != null && savedInstanceState.containsKey(TIME)){ calendar = Calendar.getInstance(); calendar.setTimeInMillis(savedInstanceState.getLong(TIME)); } disableScreenRotation(); initDisplay(); initWeekDays(); initOnClick(); refresh(); setWindowSize(); return layout; }
Source:
IndexValue markAsPermanent(StoreKey id, FileSpan fileSpan, long operationTimeMs) throws StoreException { validateFileSpan(fileSpan, true); IndexValue value = findKey(id); if (value == null) { throw new StoreException("Id " + id + " not present in index " + dataDir, StoreErrorCodes.ID_Not_Found); } else if (value.isFlagSet(IndexValue.Flags.Delete_Index)) { throw new StoreException("Id " + id + " deleted in index " + dataDir, StoreErrorCodes.ID_Deleted); } else if (value.isFlagSet(IndexValue.Flags.Ttl_Update_Index)) { throw new StoreException("TTL of " + id + " already updated in index" + dataDir, StoreErrorCodes.TTL_Already_Updated); } long size = fileSpan.getEndOffset().getOffset() - fileSpan.getStartOffset().getOffset(); IndexValue newValue = new IndexValue(value.getSize(), value.getOffset(), value.getFlags(), Utils.Infinite_Time, operationTimeMs, value.getAccountId(), value.getContainerId()); newValue.setFlag(IndexValue.Flags.Ttl_Update_Index); newValue.setNewOffset(fileSpan.getStartOffset()); newValue.setNewSize(size); addToIndex(new IndexEntry(id, newValue, null), fileSpan); return new IndexValue(newValue.getOffset().getName(), newValue.getBytes(), newValue.getVersion()); }

Target:
IndexValue markAsPermanent(StoreKey id, FileSpan fileSpan, long operationTimeMs) throws StoreException { validateFileSpan(fileSpan, true); IndexValue value = findKey(id); if (value == null) { throw new StoreException("Id " + id + " not present in index " + dataDir, StoreErrorCodes.ID_Not_Found); } else if (value.isFlagSet(IndexValue.Flags.Delete_Index)) { throw new StoreException("Id " + id + " deleted in index " + dataDir, StoreErrorCodes.ID_Deleted); } else if (value.isFlagSet(IndexValue.Flags.Ttl_Update_Index)) { throw new StoreException("TTL of " + id + " already updated in index" + dataDir, StoreErrorCodes.Already_Updated); } long size = fileSpan.getEndOffset().getOffset() - fileSpan.getStartOffset().getOffset(); IndexValue newValue = new IndexValue(value.getSize(), value.getOffset(), value.getFlags(), Utils.Infinite_Time, operationTimeMs, value.getAccountId(), value.getContainerId()); newValue.setFlag(IndexValue.Flags.Ttl_Update_Index); newValue.setNewOffset(fileSpan.getStartOffset()); newValue.setNewSize(size); addToIndex(new IndexEntry(id, newValue, null), fileSpan); return newValue; }
Source:
public MirrorSourceConnector(List<TopicPartition> knownTopicPartitions, MirrorConnectorConfig config) { this.knownTopicPartitions = knownTopicPartitions; this.config = config; }

Target:
MirrorSourceConnector(List<TopicPartition> knownTopicPartitions, MirrorConnectorConfig config) { this.knownTopicPartitions = knownTopicPartitions; this.config = config; }
Source:
private PushButton createButton(final Pair<T, V> item, boolean plusButton) { final T value = item.getFirst(); final V widget = item.getSecond(); final PushButton button = new PushButton(new Image(plusButton ? resources.increaseIcon() : resources.decreaseIcon())); button.addStyleName(style.buttonStyle()); button.setEnabled(!isGhost(value)); button.addClickHandler(plusButton ? new ClickHandler() { @Override public void onClick(ClickEvent event) { getEntry(widget).removeLastButton(); Pair<T, V> item = addGhostEntry(); onAdd(item.getFirst(), item.getSecond()); } } : new ClickHandler() { @Override public void onClick(ClickEvent event) { ListIterator<Pair<T, V>> last = items.listIterator(items.size()); if (!last.hasPrevious()) { return; } if (item == last.previous() && last.hasPrevious()) { Pair<T, V> previousItem = last.previous(); getEntry(previousItem.getSecond()).appendButton(createButton(previousItem, true)); } removeEntry(item); onRemove(value, widget); if (items.isEmpty()) { Pair<T, V> item = addGhostEntry(); onAdd(item.getFirst(), item.getSecond()); } } }); return button; }

Target:
private PushButton createButton(final Pair<T, V> item, boolean plusButton) { final T value = item.getFirst(); final V widget = item.getSecond(); final PushButton button = new PushButton(new Image(plusButton ? resources.increaseIcon() : resources.decreaseIcon())); button.addStyleName(style.buttonStyle()); button.setEnabled(!isGhost(value)); button.addClickHandler(plusButton ? new ClickHandler() { @Override public void onClick(ClickEvent event) { getEntry(widget).removeLastButton(); Pair<T, V> item = addGhostEntry(); onAdd(item.getFirst(), item.getSecond()); } } : new ClickHandler() { @Override public void onClick(ClickEvent event) { ListIterator<Pair<T, V>> last = items.listIterator(items.size()); if (item == last.previous() && last.hasPrevious()) { Pair<T, V> previousItem = last.previous(); getEntry(previousItem.getSecond()).appendButton(createButton(previousItem, true)); } removeEntry(item); onRemove(value, widget); if (items.isEmpty()) { Pair<T, V> item = addGhostEntry(); onAdd(item.getFirst(), item.getSecond()); } } }); return button; }
Source:
protected void updateDestinationField() { if(assist == null) return; for(Ref ref : assist.getRefsForContentAssist(false, true)) if(ref.getName().equals(sourceName)) remoteRefName.setText(sourceName); }

Target:
protected void updateDestinationField() { setMessage(NLS.bind(UIText.SimplePushSpecPage_message, sourceName)); String checkRemote = sourceName; if (sourceName.startsWith(Constants.R_HEADS)) { try { BranchTrackingStatus status = BranchTrackingStatus.of( repository, sourceName.substring(Constants.R_HEADS.length())); if (status != null) { checkRemote = status.getRemoteTrackingBranch(); checkRemote = Constants.R_HEADS + checkRemote.substring(checkRemote.indexOf('/', Constants.R_REMOTES.length() + 1) + 1); setMessage(NLS.bind( UIText.SimplePushSpecPage_pushAheadInfo, new Object[] { sourceName, Integer.valueOf(status.getAheadCount()), status.getRemoteTrackingBranch() }), IStatus.INFO); } } catch (Exception e) { } if (assist == null) { if (checkRemote != null) remoteRefName.setText(checkRemote); return; } if (checkRemote == null) checkRemote = sourceName; for (Ref ref : assist.getRefsForContentAssist(false, true)) if (ref.getName().equals(checkRemote)) remoteRefName.setText(checkRemote); } }
Source:
protected boolean doesTargetStorageSupportNewDiskOffering(StoragePool destPool, DiskOfferingVO newDiskOffering) { String newDiskOfferingTags = newDiskOffering.getTags(); boolean isnewDiskOfferingTagsBlank = org.apache.commons.lang.StringUtils.isBlank(newDiskOfferingTags); if (isnewDiskOfferingTagsBlank) { return true; } String storageTags = getStoragePoolTags(destPool); boolean isStorageTagsBlank = org.apache.commons.lang.StringUtils.isBlank(storageTags); if (isStorageTagsBlank) { return false; } String[] storageTagsAsStringArray = org.apache.commons.lang.StringUtils.split(storageTags, ","); String[] newDiskOfferingTagsAsStringArray = org.apache.commons.lang.StringUtils.split(newDiskOfferingTags, ","); return CollectionUtils.isSubCollection(Arrays.asList(newDiskOfferingTagsAsStringArray), Arrays.asList(storageTagsAsStringArray)); }

Target:
protected boolean doesTargetStorageSupportNewDiskOffering(StoragePool destPool, DiskOfferingVO newDiskOffering) { String newDiskOfferingTags = newDiskOffering.getTags(); return doesTargetStorageSupportDiskOffering(destPool, newDiskOfferingTags); }
Source:
public ReflectedMethod(final Method m) { this.method = m; this.parameters = m.getParameters(); this.hasVarArgs = parameters.length > 0 && parameters[method.getParameters().length - 1].isVarArgs(); }

Target:
public ReflectedMethod(final Method m) { this.method = m; this.parameters = m.getParameters(); this.hasVarArgs = parameters.length > 0 && parameters[parameters.length - 1].isVarArgs(); }
Source:
private void openUrl(String url) throws IOException { Runtime rt = Runtime.getRuntime(); String os = System.getProperty("os.name").toLowerCase(); if (os.contains("win")) { rt.exec("rundll32 url.dll,FileProtocolHandler " + url); } else if (os.contains("mac")) { rt.exec("open " + url); } else if (os.contains("nix") || os.contains("nux")) { rt.exec("xdg-open " + url); } else { logger.error("Browser could not be opened - please open in a browser on this device.", url); } }

Target:
private void openUrl(String url) throws IOException { Runtime rt = Runtime.getRuntime(); String os = System.getProperty("os.name").toLowerCase(Locale.ROOT); if (os.contains("win")) { rt.exec("rundll32 url.dll,FileProtocolHandler " + url); } else if (os.contains("mac")) { rt.exec("open " + url); } else if (os.contains("nix") || os.contains("nux")) { rt.exec("xdg-open " + url); } else { logger.error("Browser could not be opened - please open in a browser on this device.", url); } }
Source:
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { boolean doFilter = false; try { HttpServletRequest req = (HttpServletRequest) request; if (!FiltersHelper.isAuthenticated(req)) { String profileName = (String) request.getAttribute(FiltersHelper.Constants.REQUEST_PROFILE_KEY); ExtMap authRecord = (ExtMap) request.getAttribute(FiltersHelper.Constants.REQUEST_AUTH_RECORD_KEY); if (authRecord != null) { InitialContext context = new InitialContext(); try { VdcLoginReturnValueBase returnValue = (VdcLoginReturnValueBase)FiltersHelper.getBackend(context).login(new LoginUserParameters( profileName, authRecord, loginAsAdmin ? VdcActionType.LoginAdminUser : VdcActionType.LoginUser) ); if (returnValue.getSucceeded()) { HttpSession session = req.getSession(true); session.setAttribute( SessionConstants.HTTP_SESSION_ENGINE_SESSION_ID_KEY, returnValue.getSessionId() ); } } finally { context.close(); } } } doFilter = true; } catch (Exception ex) { log.error(String.format("Error in login to engine. Message is: %1$s", ex.getMessage())); ((HttpServletResponse) response).sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); } if (doFilter) { chain.doFilter(request, response); } }

Target:
public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { boolean doFilter = false; try { HttpServletRequest req = (HttpServletRequest) request; if (!FiltersHelper.isAuthenticated(req)) { String profileName = (String) request.getAttribute(FiltersHelper.Constants.REQUEST_PROFILE_KEY); ExtMap authRecord = (ExtMap) request.getAttribute(FiltersHelper.Constants.REQUEST_AUTH_RECORD_KEY); if (authRecord != null) { InitialContext context = new InitialContext(); try { VdcLoginReturnValueBase returnValue = (VdcLoginReturnValueBase)FiltersHelper.getBackend(context).login(new LoginUserParameters( profileName, authRecord, loginAsAdmin ? VdcActionType.LoginAdminUser : VdcActionType.LoginUser) ); if (returnValue.getSucceeded()) { request.setAttribute( SessionConstants.HTTP_SESSION_ENGINE_SESSION_ID_KEY, returnValue.getSessionId() ); } } finally { context.close(); } } } doFilter = true; } catch (Exception ex) { log.error("Error in login to engine ", ex); ((HttpServletResponse) response).sendError(HttpServletResponse.SC_INTERNAL_SERVER_ERROR); } if (doFilter) { chain.doFilter(request, response); } }
Source:
public void evaluate() throws Throwable { Instrumentation instrumentation = InstrumentationRegistry.getInstrumentation(); try { instrumentation.toggleCompatChangesForTest(enabled, disabled); testStatement.evaluate(); } finally { instrumentation.clearCompatChangesForTest(); } }

Target:
public void evaluate() throws Throwable { Instrumentation instrumentation = InstrumentationRegistry.getInstrumentation(); Compatibility.Callbacks inAppState = Compatibility.setOverrides(enabled, disabled); ArrayMap<Long, Boolean> overrides = new ArrayMap<>(); for (Long change: enabled) { overrides.put(change, true); } for (Long change: disabled) { overrides.put(change, false); } Map<Long, Boolean> systemServerConfig = instrumentation.setCompatChangesForTest(overrides); try { testStatement.evaluate(); } finally { Compatibility.clearOverrides(inAppState); instrumentation.clearCompatChangesForTest(systemServerConfig); } }
Source:
public PartialFileHistory.FileHistoryId read(InputNode node) throws InvalidXMLNodeException { try { return PartialFileHistory.FileHistoryId.parseFileId(node.getValue()); } catch (Exception e) { throw new InvalidXMLNodeException(e); } }

Target:
public PartialFileHistory.FileHistoryId read(InputNode node) throws InvalidXmlNodeException { try { return PartialFileHistory.FileHistoryId.parseFileId(node.getValue()); } catch (Exception e) { throw new InvalidXmlNodeException(e); } }
Source:
private void saveInExtensionClass(Map<String, Class<?>> extensionClasses, Class<?> clazz, String name) { Class<?> c = extensionClasses.get(name); if (c == null) { extensionClasses.put(name, clazz); } else if (c != clazz) { duplicateExceptionMsg.append("Duplicate extension ") .append(type.getName()) .append(" name ") .append(name) .append(" on ") .append(c.getName()) .append(" and ") .append(clazz.getName()) .append("\r\n"); } }

Target:
private void saveInExtensionClass(Map<String, Class<?>> extensionClasses, Class<?> clazz, String name) { Class<?> c = extensionClasses.get(name); if (c == null) { extensionClasses.put(name, clazz); } else if (c != clazz) { throw new DubboInitCheckException("Duplicate extension " + type.getName() + " name " + name + " on " + c.getName() + " and " + clazz.getName()); } }
Source:
public void checkNumberOfLoggedEvents(AbstractAuditBackend backend, AuditQueryBuilder builder) { List<LogEntry> logs = backend.queryLogs(builder); if (logs.size() != NUM_OF_EVENTS) { System.out.println("ERROR: Incorrect log entries: "+ Arrays.toString(logs.toArray())); } assertEquals(NUM_OF_EVENTS, logs.size()); }

Target:
public void checkNumberOfLoggedEvents(AbstractAuditBackend backend, AuditQueryBuilder builder) { List<LogEntry> logs = backend.queryLogs(builder); assertEquals("Incorrect log entries: "+ Arrays.toString(logs.toArray()), NUM_OF_EVENTS, logs.size()); }
Source:
private MethodSpec createMapToContentValuesMethodSpec(@NotNull final StorIOContentResolverTypeMeta storIOContentResolverTypeMeta, @NotNull final ClassName storIOContentResolverClassName) { MethodSpec.Builder builder = MethodSpec.methodBuilder("mapToContentValues") .addJavadoc("{@inheritDoc}\n") .addAnnotation(Override.class) .addAnnotation(ANDROID_NON_NULL_ANNOTATION_CLASS_NAME) .addModifiers(PUBLIC) .returns(ClassName.get("android.content", "ContentValues")) .addParameter(ParameterSpec.builder(storIOContentResolverClassName, "object") .addAnnotation(ANDROID_NON_NULL_ANNOTATION_CLASS_NAME) .build()) .addStatement("ContentValues contentValues = new ContentValues($L)", storIOContentResolverTypeMeta.columns.size()) .addCode("\n"); for (final StorIOContentResolverColumnMeta columnMeta : storIOContentResolverTypeMeta.columns.values()) { final boolean primitive = columnMeta.element.asType().getKind().isPrimitive(); final boolean needIgnoreNull = columnMeta.storIOColumn.ignoreNull(); final boolean ignoreNull = !primitive && needIgnoreNull; if (ignoreNull) { builder.beginControlFlow("if($L != null)", "object." + columnMeta.fieldName); } builder.addStatement( "contentValues.put($S, $L)", columnMeta.storIOColumn.name(), "object." + columnMeta.fieldName ); if (ignoreNull) { builder.endControlFlow(); } } return builder .addCode("\n") .addStatement("return contentValues") .build(); }

Target:
private MethodSpec createMapToContentValuesMethodSpec(@NotNull final StorIOContentResolverTypeMeta storIOContentResolverTypeMeta, @NotNull final ClassName storIOContentResolverClassName) { MethodSpec.Builder builder = MethodSpec.methodBuilder("mapToContentValues") .addJavadoc("{@inheritDoc}\n") .addAnnotation(Override.class) .addAnnotation(ANDROID_NON_NULL_ANNOTATION_CLASS_NAME) .addModifiers(PUBLIC) .returns(ClassName.get("android.content", "ContentValues")) .addParameter(ParameterSpec.builder(storIOContentResolverClassName, "object") .addAnnotation(ANDROID_NON_NULL_ANNOTATION_CLASS_NAME) .build()) .addStatement("ContentValues contentValues = new ContentValues($L)", storIOContentResolverTypeMeta.columns.size()) .addCode("\n"); for (final StorIOContentResolverColumnMeta columnMeta : storIOContentResolverTypeMeta.columns.values()) { final boolean ignoreNull = columnMeta.storIOColumn.ignoreNull(); if (ignoreNull) { builder.beginControlFlow("if($L != null)", "object." + columnMeta.fieldName); } builder.addStatement( "contentValues.put($S, $L)", columnMeta.storIOColumn.name(), "object." + columnMeta.fieldName ); if (ignoreNull) { builder.endControlFlow(); } } return builder .addCode("\n") .addStatement("return contentValues") .build(); }
Source:
public void seek(IonReaderBinarySpan position) { if (position == null) { throw new IllegalArgumentException("Position invalid for binary reader"); } if (!(_input instanceof FromByteArray)) { throw new UnsupportedOperationException("Binary seek not implemented for non-byte array backed sources"); } FromByteArray input = (FromByteArray)_input; input._pos = (int) (position._offset + _physical_start_offset); input._limit = (int) (position._limit + _physical_start_offset); input._eof = false; for (;;) { SavePoint sp = input._save_points._active_stack; if (sp == null) break; input._save_points.savePointPopActive(sp); sp.free(); } re_init_raw(); init_user(this._catalog); _symbols = position._symbol_table; }

Target:
public void seek(IonReaderBinarySpan position) { IonReaderBinarySpan pos = position; if (pos == null) { throw new IllegalArgumentException("Position invalid for binary reader"); } if (!(_input instanceof FromByteArray)) { throw new UnsupportedOperationException("Binary seek not implemented for non-byte array backed sources"); } FromByteArray input = (FromByteArray)_input; input._pos = (int) (pos._offset + _physical_start_offset); input._limit = (int) (pos._limit + _physical_start_offset); input._eof = false; for (;;) { SavePoint sp = input._save_points._active_stack; if (sp == null) break; input._save_points.savePointPopActive(sp); sp.free(); } re_init_raw(); init_user(this._catalog); _symbols = pos._symbol_table; }
Source:
public Consumer<MouseEvent> getAction() { if (refCount > 0) { return action; } return null; }

Target:
public Consumer<MouseEvent> getAction() { return action; }
Source:
public void taskCompletedWithProblems(Executor executor, Queue.Task task, long durationMS, Throwable problems) { cleanupPodAnnotation(task); super.taskCompletedWithProblems(executor, task, durationMS, problems); LOGGER.log(Level.FINE, " Computer " + this + " taskCompletedWithProblems"); }

Target:
public void taskCompletedWithProblems(Executor executor, Queue.Task task, long durationMS, Throwable problems) { annotatePodWithTaskInfo(task, "completedWithProblems"); super.taskCompletedWithProblems(executor, task, durationMS, problems); LOGGER.log(Level.FINE, " Computer " + this + " taskCompletedWithProblems"); }
Source:
public static @Nullable Unit<?> parseUnit(String pattern) { if (StringUtils.isBlank(pattern)) { return null; } int lastBlankIndex = pattern.lastIndexOf(" "); if (lastBlankIndex < 0) { return null; } String unitSymbol = pattern.substring(lastBlankIndex).trim(); if (StringUtils.isNotBlank(unitSymbol) && !unitSymbol.equals(UNIT_PLACEHOLDER)) { try { Quantity<?> quantity = Quantities.getQuantity("1 " + unitSymbol); return quantity.getUnit(); } catch (IllegalArgumentException e) { logger.warn("Unknown unit from pattern: {}", unitSymbol); } } return null; }

Target:
public static @Nullable Unit<?> parseUnit(String pattern) { if (StringUtils.isBlank(pattern)) { return null; } int lastBlankIndex = pattern.lastIndexOf(" "); if (lastBlankIndex < 0) { return null; } String unitSymbol = pattern.substring(lastBlankIndex).trim(); if (StringUtils.isNotBlank(unitSymbol) && !unitSymbol.equals(UNIT_PLACEHOLDER)) { if (UNIT_PERCENT_FORMAT_STRING.equals(unitSymbol)) { return SmartHomeUnits.PERCENT; } try { Quantity<?> quantity = Quantities.getQuantity("1 " + unitSymbol); return quantity.getUnit(); } catch (IllegalArgumentException e) { logger.debug("Unknown unit from pattern: {}", unitSymbol); } } return null; }
Source:
public void fit(MultiDataSet dataSet) { throw new DL4JInvalidInputException("MultiLayerNetwork can't handle MultiDataSet. Please consider use of ComputationGraph"); }

Target:
public void fit(MultiDataSet dataSet) { if (dataSet.getFeatures().length == 1 && dataSet.getLabels().length == 1) { INDArray features = null; INDArray labels = null; INDArray fMask = null; INDArray lMask = null; if (dataSet.getFeaturesMaskArrays() != null) fMask = dataSet.getFeaturesMaskArrays()[0]; if (dataSet.getFeaturesMaskArrays() != null) lMask = dataSet.getLabelsMaskArrays()[0]; features = dataSet.getFeatures()[0]; labels = dataSet.getLabels()[0]; DataSet ds = new DataSet(features, labels, fMask, lMask); fit(ds); } throw new DL4JInvalidInputException("MultiLayerNetwork can't handle MultiDataSet. Please consider use of ComputationGraph"); }
Source:
protected void executeCommand() { Cluster cluster = clusterDao.get(getParameters().getClusterId()); if (cluster.supportsGlusterService()) { try { glusterSyncJob.refreshSelfHealData(cluster); } catch (Exception e) { log.error("Error while refreshing Gluster self heal data of cluster '{}': {}", cluster.getName(), e.getMessage()); log.debug("Exception", e); } setSucceeded(true); } }

Target:
protected void executeCommand() { try { glusterSyncJob.refreshSelfHealData(cluster); } catch (Exception e) { log.error("Error while refreshing Gluster self heal data of cluster '{}': {}", cluster.getName(), e.getMessage()); log.debug("Exception", e); setSucceeded(false); } setSucceeded(true); }
Source:
public void setUp() throws Exception { TestPersistentBinaryDeque.setupTestDir(); m_pbd = PersistentBinaryDeque.builder(TestPersistentBinaryDeque.TEST_NONCE, TestPersistentBinaryDeque.TEST_DIR, s_logger) .compression(true) .initialExtraHeader(null, TestPersistentBinaryDeque.SERIALIZER).build(); m_pbd.setRetentionPolicy(BinaryDeque.RetentionPolicyType.TIME_MS, new Long(s_retainMillis)); m_pbd.startRetentionPolicyEnforcement(); }

Target:
public void setUp() throws Exception { TestPersistentBinaryDeque.setupTestDir(); m_pbd = PersistentBinaryDeque.builder(TestPersistentBinaryDeque.TEST_NONCE, TestPersistentBinaryDeque.TEST_DIR, s_logger) .compression(true) .initialExtraHeader(null, TestPersistentBinaryDeque.SERIALIZER).build(); m_pbd.setRetentionPolicy(BinaryDeque.RetentionPolicyType.TIME_MS, Long.valueOf(s_retainMillis)); m_pbd.startRetentionPolicyEnforcement(); }
Source:
public void setSearchString(String value) { if (value == null || (!value.toUpperCase().contains(SPACE + SyntaxChecker.SORTBY) && !value.toUpperCase().contains(SPACE + SyntaxChecker.PAGE))) { setSearchString(value, true); } }

Target:
public void setSearchString(String value) { if (value == null || !containsTokens(value, SyntaxChecker.SORTBY, SyntaxChecker.PAGE, SyntaxChecker.SORTDIR_ASC, SyntaxChecker.SORTDIR_DESC)) { setSearchString(value, true); } }
Source:
public void run() { AbstractHistogram currentHist = LatencyHistogramStats.constructHistogram(false); ClientInterface ci = VoltDB.instance().getClientInterface(); if (ci != null) { List<AbstractHistogram> thisci = ci.getLatencyStats(); for (AbstractHistogram info : thisci) { currentHist.add(info); } } AbstractHistogram diffHist = currentHist.copy(); diffHist.subtract(m_previousHist); diffHist.setEndTimeStamp(System.currentTimeMillis()); m_previousHist = currentHist; m_diffHistProvider.set(diffHist); }

Target:
public void run() { AbstractHistogram currentHist = LatencyHistogramStats.constructHistogram(false); ClientInterface clientInterface = VoltDB.instance().getClientInterface(); if (clientInterface != null) { List<AbstractHistogram> statsHists = clientInterface.getLatencyStats(); for (AbstractHistogram hist : statsHists) { currentHist.add(hist); } } AbstractHistogram diffHist = currentHist.copy(); diffHist.subtract(m_previousHist); diffHist.setEndTimeStamp(System.currentTimeMillis()); m_previousHist = currentHist; m_diffHistProvider.set(diffHist); }
Source:
default CompletableFuture<Map<K, V>> getAllAsync(Set<?> keys) { return CompletableFuture.completedFuture( keys.stream().map(k -> new AbstractMap.SimpleEntry<>((K) k, getAsync((K) k))) .collect(Collectors.toList()).stream() .filter(entry -> entry.getValue().join() != null) .collect(Collectors.toMap(Map.Entry::getKey, entry -> entry.getValue().join()))); }

Target:
default CompletableFuture<Map<K, V>> getAllAsync(Set<?> keys) { Object[] orderedKeys = new Object[keys.size()]; CompletableFuture[] futures = new CompletableFuture[keys.size()]; int i = 0; for (Object key : keys) { orderedKeys[i] = key; futures[i] = getAsync((K) key); ++i; } return CompletableFuture.allOf(futures).thenApply(nil -> { Map<K, V> map = new HashMap<>(futures.length); for (int j = 0; j < futures.length; ++j) { V value = (V) futures[j].join(); if (value != null) map.put((K) orderedKeys[j], value); } return map; }); }
Source:
public void compareEqual() throws Exception { final String sha = "c2c53d66948214258a26ca9ca845d7ac0c17f8e7"; final MkStorage storage = new MkStorage.InFile(); final Repo repo = this.repo(storage); final MkRepoCommit commit = new MkRepoCommit(storage, repo, sha); final MkRepoCommit other = new MkRepoCommit(storage, repo, sha); MatcherAssert.assertThat( commit.compareTo(other), Matchers.equalTo(0) ); }

Target:
public void compareEqual() throws Exception { final String sha = "c2c53d66948214258a26ca9ca845d7ac0c17f8e7"; final MkStorage storage = new MkStorage.InFile(); final Repo repo = this.repo(storage); final MkRepoCommit commit = new MkRepoCommit(storage, repo, sha); final MkRepoCommit other = new MkRepoCommit(storage, repo, sha); MatcherAssert.assertThat( commit.compareTo(other), Matchers.equalTo(0) ); MatcherAssert.assertThat( other.compareTo(commit), Matchers.equalTo(0) ); }
Source:
private void reportInstanceCapacityMetrics(ClusterStatusMonitor clusterStatusMonitor, ResourceControllerDataProvider dataProvider, Map<String, Resource> resourceMap, CurrentStateOutput currentStateOutput) { asyncExecute(dataProvider.getAsyncTasksThreadPool(), () -> { try { Map<String, ResourceAssignment> currentStateAssignment = currentStateOutput.getCurrentStateAssignment(resourceMap.keySet()); ClusterModel clusterModel = ClusterModelProvider.generateClusterModelFromCurrentState( dataProvider, resourceMap, currentStateAssignment); Map<String, Double> maxCapacityUsageMap = new HashMap<>(); Map<String, Map<String, Integer>> instanceCapacityMap = new HashMap<>(); for (AssignableNode node : clusterModel.getAssignableNodes().values()) { String instanceName = node.getInstanceName(); double usage = node.getProjectedHighestUtilization(Collections.emptyMap()); maxCapacityUsageMap.put(instanceName, usage); instanceCapacityMap.put(instanceName, node.getInstanceCapacity()); } clusterStatusMonitor.updateMaxCapacityUsage(maxCapacityUsageMap); clusterStatusMonitor.updateInstanceCapacity(instanceCapacityMap); } catch (Exception ex) { LOG.error("Failed to report instance capacity metrics.", ex); } return null; }); }

Target:
private void reportInstanceCapacityMetrics(ClusterStatusMonitor clusterStatusMonitor, ResourceControllerDataProvider dataProvider, Map<String, Resource> resourceMap, CurrentStateOutput currentStateOutput) { asyncExecute(dataProvider.getAsyncTasksThreadPool(), () -> { try { Map<String, IdealState> idealStateMap = dataProvider.getIdealStates(); Map<String, Resource> resourceToMonitorMap = resourceMap.entrySet().stream() .filter(idealStateMap::containsKey) .collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); Map<String, ResourceAssignment> currentStateAssignment = currentStateOutput.getAssignment(resourceToMonitorMap.keySet()); ClusterModel clusterModel = ClusterModelProvider.generateClusterModelFromExistingAssignment( dataProvider, resourceToMonitorMap, currentStateAssignment); for (AssignableNode node : clusterModel.getAssignableNodes().values()) { String instanceName = node.getInstanceName(); double usage = node.getProjectedHighestUtilization(Collections.emptyMap()); clusterStatusMonitor .updateInstanceCapacityStatus(instanceName, usage, node.getMaxCapacity()); } } catch (Exception ex) { LOG.error("Failed to report instance capacity metrics. Exception message: {}", ex.getMessage()); } return null; }); }
Source:
public FormValidation doValidate(@QueryParameter String apiUrl, @QueryParameter String username, @QueryParameter Secret password, @QueryParameter String oauthAccessToken) throws IOException { GitHub gitHub; if (Util.fixEmpty(apiUrl) != null) { gitHub = GitHub.connectToEnterprise(apiUrl,username,oauthAccessToken); } else { gitHub = GitHub.connect(username,oauthAccessToken,Secret.toString(password)); } if (gitHub.isCredentialValid()) return FormValidation.ok("Verified"); else return FormValidation.error("Failed to validate the account"); }

Target:
public FormValidation doValidate(@QueryParameter String apiUrl, @QueryParameter String username, @QueryParameter Secret password, @QueryParameter String oauthAccessToken) throws IOException { GitHub gitHub; if (Util.fixEmpty(apiUrl) != null) { gitHub = GitHub.connectToEnterprise(apiUrl,oauthAccessToken); } else { gitHub = GitHub.connect(username,oauthAccessToken,Secret.toString(password)); } if (gitHub.isCredentialValid()) return FormValidation.ok("Verified"); else return FormValidation.error("Failed to validate the account"); }
Source:
public void setMandoc(String value) { mandoc = value; }

Target:
public void setMandoc(String value) { this.mandoc = value; }
Source:
void simpleDecoupled(ClusterMap clusterMap) throws JSONException, InterruptedException, StoreException, IOException, CoordinatorException { MockConnectionPool.mockCluster = new MockCluster(clusterMap); AmbryCoordinator ac = new AmbryCoordinator(getVProps(), clusterMap); for (int i = 0; i < 20; ++i) { BlobProperties putBlobProperties = new BlobProperties(100, "serviceId", "memberId", "contentType", false, Utils.Infinite_Time); ByteBuffer putUserMetadata = ByteBuffer.allocate(10); for (byte b = 0; b < 10; b++) { putUserMetadata.put(b); } ByteBuffer putContent = ByteBuffer.allocate(100); for (byte b = 0; b < 100; b++) { putContent.put(b); } putContent.flip(); String blobId = putBlob(ac, putBlobProperties, putUserMetadata, putContent); getBlob(ac, blobId, putBlobProperties, putUserMetadata, putContent); deleteBlob(ac, blobId); } ac.close(); }

Target:
void simpleDecoupled(ClusterMap clusterMap) throws JSONException, InterruptedException, StoreException, IOException, CoordinatorException { MockConnectionPool.mockCluster = new MockCluster(clusterMap); AmbryCoordinator ac = new AmbryCoordinator(getVProps(), clusterMap); for (int i = 0; i < 20; ++i) { BlobProperties putBlobProperties = new BlobProperties(100, "serviceId", "memberId", "contentType", false, Utils.Infinite_Time); ByteBuffer putUserMetadata = getByteBuffer(10, false); ByteBuffer putContent = getByteBuffer(100, true); String blobId = putBlob(ac, putBlobProperties, putUserMetadata, putContent); getBlob(ac, blobId, putBlobProperties, putUserMetadata, putContent); deleteBlob(ac, blobId); } ac.close(); }
Source:
private Optional<ServiceReference<ServletContext>[]> getServiceReferences(BundleContext context) { try { return Optional.ofNullable( (ServiceReference<ServletContext>[]) context.getAllServiceReferences( null, "(" + Constants.OBJECTCLASS + "=javax.servlet.ServletContext)")); } catch (InvalidSyntaxException | ClassCastException e) { LOGGER.error( "Problem getting ServletContexts from OSGI, One of the servlets running might print stack traces to the browser. A system restart is recommended. See debug logs for additional details."); LOGGER.debug("Problems getting ServletContexts from OSGI Details:", e); return Optional.empty(); } }

Target:
private Optional<ServiceReference<ServletContext>[]> getServiceReferences(BundleContext context) { try { return Optional.ofNullable( (ServiceReference<ServletContext>[]) context.getAllServiceReferences( null, "(" + Constants.OBJECTCLASS + "=javax.servlet.ServletContext)")); } catch (InvalidSyntaxException | ClassCastException e) { LOGGER.error( "Problem getting ServletContexts from OSGI. One of the servlets running might print stack traces to the browser. A system restart is recommended. See debug logs for additional details."); LOGGER.debug("Problems getting ServletContexts from OSGI Details:", e); return Optional.empty(); } }
Source:
default SortedSet<SourceFile> getVersionsSourcefiles(Long entryId, Long versionId, List<DescriptorLanguage.FileType> fileTypes, VersionDAO versionDAO) { Version version = versionDAO.findVersionInEntry(entryId, versionId); if (version == null) { throw new CustomWebApplicationException("Workflow version" + versionId + " does not exist for this workflow", HttpStatus.SC_BAD_REQUEST); } SortedSet<SourceFile> sourceFiles = version.getSourceFiles(); if (fileTypes != null && !fileTypes.isEmpty()) { sourceFiles = sourceFiles.stream().filter(sourceFile -> fileTypes.contains(sourceFile.getType())).collect(Collectors.toCollection( TreeSet::new)); } return sourceFiles; }

Target:
default SortedSet<SourceFile> getVersionsSourcefiles(Long entryId, Long versionId, List<DescriptorLanguage.FileType> fileTypes, VersionDAO versionDAO) { Version version = versionDAO.findVersionInEntry(entryId, versionId); if (version == null) { throw new CustomWebApplicationException("Version " + versionId + " does not exist for this entry", HttpStatus.SC_BAD_REQUEST); } SortedSet<SourceFile> sourceFiles = version.getSourceFiles(); if (fileTypes != null && !fileTypes.isEmpty()) { sourceFiles = sourceFiles.stream().filter(sourceFile -> fileTypes.contains(sourceFile.getType())).collect(Collectors.toCollection( TreeSet::new)); } return sourceFiles; }
Source:
private static AbstractConfiguration createDefaultConfigInstance() { ConcurrentCompositeConfiguration config = new ConcurrentCompositeConfiguration(); int indexForContainerConfig = 0; try { DynamicURLConfiguration defaultURLConfig = new DynamicURLConfiguration(); config.addConfiguration(defaultURLConfig, URL_CONFIG_NAME); indexForContainerConfig = config.getIndexOfConfiguration(defaultURLConfig); } catch (Throwable e) { logger.warn("Failed to create default dynamic configuration", e); } if (!Boolean.getBoolean(DISABLE_DEFAULT_ENV_CONFIG)) { EnvironmentConfiguration envConfig = new EnvironmentConfiguration(); config.addConfiguration(envConfig, ENV_CONFIG_NAME); indexForContainerConfig = config.getIndexOfConfiguration(envConfig); } if (!Boolean.getBoolean(DISABLE_DEFAULT_SYS_CONFIG)) { SystemConfiguration sysConfig = new SystemConfiguration(); config.addConfiguration(sysConfig, SYS_CONFIG_NAME); indexForContainerConfig = config.getIndexOfConfiguration(sysConfig); } config.setContainerConfigurationIndex(indexForContainerConfig); ConcurrentCompositeConfiguration appOverrideConfig = new ConcurrentCompositeConfiguration(); config.addConfiguration(appOverrideConfig, APPLICATION_PROPERTIES); return config; }

Target:
private static AbstractConfiguration createDefaultConfigInstance() { ConcurrentCompositeConfiguration config = new ConcurrentCompositeConfiguration(); try { DynamicURLConfiguration defaultURLConfig = new DynamicURLConfiguration(); config.addConfiguration(defaultURLConfig, URL_CONFIG_NAME); } catch (Throwable e) { logger.warn("Failed to create default dynamic configuration", e); } if (!Boolean.getBoolean(DISABLE_DEFAULT_SYS_CONFIG)) { SystemConfiguration sysConfig = new SystemConfiguration(); config.addConfiguration(sysConfig, SYS_CONFIG_NAME); } if (!Boolean.getBoolean(DISABLE_DEFAULT_ENV_CONFIG)) { EnvironmentConfiguration envConfig = new EnvironmentConfiguration(); config.addConfiguration(envConfig, ENV_CONFIG_NAME); } ConcurrentCompositeConfiguration appOverrideConfig = new ConcurrentCompositeConfiguration(); config.addConfiguration(appOverrideConfig, APPLICATION_PROPERTIES); config.setContainerConfigurationIndex(config.getIndexOfConfiguration(appOverrideConfig)); return config; }
Source:
protected void removeIntermediateFiles(FSRecordCompactionOperator.OutputMetaData metaData) { logger.debug("found metaData = {}", metaData); committedTuples.remove(metaData); try { Path dest = new Path(metaData.getPath()); FileStatus[] statuses = fs.listStatus(dest.getParent()); for (FileStatus status : statuses) { String statusName = status.getPath().getName(); if (statusName.endsWith(TMP_EXTENSION) && statusName.startsWith(metaData.getFileName())) { String actualFileName = statusName.substring(0, statusName.lastIndexOf('.', statusName.lastIndexOf('.') - 1)); logger.debug("actualFileName = {}", actualFileName); if (metaData.getFileName().equals(actualFileName)) { logger.debug("deleting stray file {}", statusName); fs.delete(status.getPath(), true); } } else if (statusName.equals(metaData.getFileName())) { logger.info("deleting s3-compaction file {}", statusName); fs.delete(status.getPath(), true); } } } catch (IOException e) { logger.error("Unable to Delete a file: {}", metaData.getFileName()); } metaData.setPath(getDirectoryName() + Path.SEPARATOR + metaData.getFileName()); outputPort.emit(metaData); }

Target:
protected void removeIntermediateFiles(FSRecordCompactionOperator.OutputMetaData metaData) { logger.debug("found metaData = {}", metaData); committedTuples.remove(metaData); try { Path dest = new Path(metaData.getPath()); FileStatus[] statuses = fs.listStatus(dest.getParent()); for (FileStatus status : statuses) { String statusName = status.getPath().getName(); if (statusName.endsWith(TMP_EXTENSION) && statusName.startsWith(metaData.getFileName())) { String actualFileName = statusName.substring(0, statusName.lastIndexOf('.', statusName.lastIndexOf('.') - 1)); logger.debug("actualFileName = {}", actualFileName); if (metaData.getFileName().equals(actualFileName)) { logger.debug("deleting stray file {}", statusName); fs.delete(status.getPath(), true); } } else if (statusName.equals(metaData.getFileName())) { logger.info("deleting s3-compaction file {}", statusName); fs.delete(status.getPath(), true); } } } catch (IOException e) { logger.error("Unable to Delete a file: {}", metaData.getFileName()); } }
Source:
protected void executeCommand() { boolean addedGroupThatAllowsViewingChildren = false; List<ActionGroup> groups = getParameters().getActionGroups(); for (ActionGroup group : groups) { addedGroupThatAllowsViewingChildren |= group.allowsViewingChildren(); getRoleGroupMapDao().save(new RoleGroupMap(group, getParameters().getRoleId())); appendCustomValueSeparatedByComma("ActionGroup", group.toString()); } if (addedGroupThatAllowsViewingChildren) { Role role = getRole(); if (!role.allowsViewingChildren()) { role.setAllowsViewingChildren(true); getRoleDao().update(role); } } setSucceeded(true); }

Target:
protected void executeCommand() { boolean addedGroupThatAllowsViewingChildren = false; List<ActionGroup> groups = getParameters().getActionGroups(); for (ActionGroup group : groups) { addedGroupThatAllowsViewingChildren |= group.allowsViewingChildren(); getRoleGroupMapDao().save(new RoleGroupMap(group, getParameters().getRoleId())); appendCustomValueCommaSeparated("ActionGroup", group.toString()); } if (addedGroupThatAllowsViewingChildren) { Role role = getRole(); if (!role.allowsViewingChildren()) { role.setAllowsViewingChildren(true); getRoleDao().update(role); } } setSucceeded(true); }
Source:
protected void addHtmlClass(final String text) { if (!Util.empty(text)) { if (this.htmlClassList == null) { this.htmlClassList = new HashSet<>(); } this.htmlClassList.add(text); } }

Target:
protected void addHtmlClass(final String text) { if (!Util.empty(text)) { if (this.htmlClasses == null) { this.htmlClasses = new HashSet<>(); } this.htmlClasses.add(text); } }
Source:
public void testGetStartingOffsetsWhenStreamMetadataIsNull() { final String storeName = "test-get-starting-offset-store"; final String taskName = "test-get-starting-offset-task"; Set<SystemStreamPartition> ssps = IntStream.range(1, 6) .mapToObj(idx -> new SystemStreamPartition("test-system", "test-stream", new Partition(idx))) .collect(Collectors.toSet()); Map<Partition, SystemStreamMetadata.SystemStreamPartitionMetadata> partitionMetadata = ssps.stream() .collect(Collectors.toMap(SystemStreamPartition::getPartition, x -> new SystemStreamMetadata.SystemStreamPartitionMetadata(null, "1", "2"))); TaskSideInputStorageManager testSideInputStorageManager = new MockTaskSideInputStorageManagerBuilder(taskName, LOGGED_STORE_DIR) .addLoggedStore(storeName, ssps) .addStreamMetadata(Collections.singletonMap(new SystemStream("test-system", "test-stream"), new SystemStreamMetadata("test-stream", partitionMetadata))) .build(); initializeSideInputStorageManager(testSideInputStorageManager); ssps.forEach(ssp -> { String startingOffset = testSideInputStorageManager.getStartingOffset( new SystemStreamPartition("test-system", "test-stream", ssp.getPartition())); Assert.assertNull("Starting offset should be null", startingOffset); }); }

Target:
public void testGetStartingOffsetsWhenStreamMetadataIsNull() { final String storeName = "test-get-starting-offset-store"; final String taskName = "test-get-starting-offset-task"; Set<SystemStreamPartition> ssps = IntStream.range(1, 2) .mapToObj(idx -> new SystemStreamPartition("test-system", "test-stream", new Partition(idx))) .collect(Collectors.toSet()); Map<Partition, SystemStreamMetadata.SystemStreamPartitionMetadata> partitionMetadata = ssps.stream() .collect(Collectors.toMap(SystemStreamPartition::getPartition, x -> new SystemStreamMetadata.SystemStreamPartitionMetadata(null, "1", "2"))); TaskSideInputStorageManager testSideInputStorageManager = new MockTaskSideInputStorageManagerBuilder(taskName, LOGGED_STORE_DIR) .addLoggedStore(storeName, ssps) .addStreamMetadata(Collections.singletonMap(new SystemStream("test-system", "test-stream"), new SystemStreamMetadata("test-stream", partitionMetadata))) .build(); initializeSideInputStorageManager(testSideInputStorageManager); ssps.forEach(ssp -> { String startingOffset = testSideInputStorageManager.getStartingOffset( new SystemStreamPartition("test-system", "test-stream", ssp.getPartition())); Assert.assertNull("Starting offset should be null", startingOffset); }); }
Source:
public void testCreateTableStatement() throws Exception { String tableName = generateUniqueName(); String schemaName = generateUniqueName(); Properties props = PropertiesUtil.deepCopy(TEST_PROPERTIES); String pTableFullName = SchemaUtil.getQualifiedTableName(schemaName, tableName); String properties = "TTL=2592000,IMMUTABLE_ROWS=true,DISABLE_WAL=true"; String createTable = "CREATE TABLE "+ pTableFullName + "(K VARCHAR NOT NULL PRIMARY KEY, " + "V1 VARCHAR, V2 VARCHAR) TTL=2592000, IMMUTABLE_ROWS=TRUE, DISABLE_WAL=TRUE"; try (Connection conn = DriverManager.getConnection(getUrl(), props)) { conn.createStatement().execute(createTable); conn.commit(); String args = {"-tb", tableName, "-s", schemaName}; SchemaExtractionTool set = new SchemaExtractionTool(); set.setConf(conn.unwrap(PhoenixConnection.class).getQueryServices().getConfiguration()); set.run(args); Assert.assertEquals(createTable, set.getOutput().toUpperCase()); } }

Target:
public void testCreateTableStatement() throws Exception { String tableName = generateUniqueName(); String schemaName = generateUniqueName(); String pTableFullName = SchemaUtil.getQualifiedTableName(schemaName, tableName); String createTableStmt = "CREATE TABLE "+ pTableFullName + "(K VARCHAR NOT NULL PRIMARY KEY, " + "V1 VARCHAR, V2 VARCHAR) TTL=2592000, IMMUTABLE_ROWS=TRUE, DISABLE_WAL=TRUE"; List<String> queries = new ArrayList<String>(){}; queries.add(createTableStmt); String result = runSchemaExtractionTool(schemaName, tableName, null, queries); Assert.assertEquals(createTableStmt, result.toUpperCase()); }