auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
protected int run() throws Exception { boolean errorOccurred = false; final Jenkins jenkins = Jenkins.getInstance(); if (jenkins == null) { stderr.println("The Jenkins instance has not been started, or was already shut down!"); return -1; } final HashSet<String> hs = new HashSet<String>(); hs.addAll(nodes); for (String node_s : hs) { Node node = null; try { node = jenkins.getNode(node_s); if(node == null) { stderr.format("No such node '%s'\n", node_s); errorOccurred = true; continue; } node.toComputer().doDoDelete(); } catch (AccessDeniedException2 e) { stderr.println(e.getMessage()); errorOccurred = true; continue; } catch (Exception e) { final String errorMsg = String.format("Unexpected exception occurred during deletion of node '%s': %s", node == null ? "(null)" : node.toComputer().getName(), e.getMessage()); stderr.println(errorMsg); LOGGER.warning(errorMsg); errorOccurred = true; continue; } } return errorOccurred ? -1 : 0; }

Target:
protected int run() throws Exception { boolean errorOccurred = false; final Jenkins jenkins = Jenkins.getInstance(); if (jenkins == null) { stderr.println("The Jenkins instance has not been started, or was already shut down!"); return -1; } final HashSet<String> hs = new HashSet<String>(); hs.addAll(nodes); for (String node_s : hs) { Node node = null; try { node = jenkins.getNode(node_s); if(node == null) { stderr.format("No such node '%s'\n", node_s); errorOccurred = true; continue; } node.toComputer().doDoDelete(); } catch (AccessDeniedException e) { stderr.println(e.getMessage()); errorOccurred = true; continue; } catch (Exception e) { final String errorMsg = String.format("Unexpected exception occurred during deletion of node '%s': %s", node == null ? "(null)" : node.toComputer().getName(), e.getMessage()); stderr.println(errorMsg); LOGGER.warning(errorMsg); errorOccurred = true; continue; } } return errorOccurred ? -1 : 0; }
Source:
public void whenNodeIsShutdown() throws Throwable { Address address = getAddress(local); local.shutdown(); DummyOperation op = new DummyOperation(null); InternalCompletableFuture<Object> future = operationService.invokeOnTarget(null, op, address); CountDownLatch latch = new CountDownLatch(1); AtomicReference<Throwable> reference = new AtomicReference<>(); future.andThen(new ExecutionCallback<Object>() { @Override public void onResponse(Object response) { } @Override public void onFailure(Throwable t) { reference.set(t); latch.countDown(); } }); assertOpenEventually(latch); throw reference.get(); }

Target:
public void whenNodeIsShutdown() throws Throwable { Address address = getAddress(local); local.shutdown(); DummyOperation op = new DummyOperation(null); InternalCompletableFuture<Object> future = operationService.invokeOnTarget(null, op, address); CountDownLatch latch = new CountDownLatch(1); AtomicReference<Throwable> reference = new AtomicReference<>(); future.andThen(new ExecutionCallback<Object>() { @Override public void onResponse(Object response) { } @Override public void onFailure(Throwable t) { reference.set(t); latch.countDown(); } }); assertOpenEventually(latch); assertInstanceOf(HazelcastInstanceNotActiveException.class, reference.get()); }
Source:
public synchronized void emit(final List<WireRecord> wireRecords) { requireNonNull(wireRecords, message.wireRecordsNonNull()); if (!(this.wireComponent instanceof WireEmitter)) { return; } retrieveWireConfigurationsIfAbsent(); if (this.wireConfigurations.isEmpty()) { return; } final WireEnvelope wireEnvelope = new WireEnvelope(this.componentPid, wireRecords); for (final WireConfiguration wc : this.wireConfigurations) { final Wire wire = wc.getWire(); if (wire == null) { continue; } final String filter = wc.getFilter(); if (filter == null) { wire.update(wireEnvelope); continue; } final WireEnvelope filteredWireEnvelope = getFilteredWireEnvelope(wireRecords, wireEnvelope, filter); wire.update(filteredWireEnvelope); } fireEmitEvent(); }

Target:
public synchronized void emit(final List<WireRecord> wireRecords) { requireNonNull(wireRecords, message.wireRecordsNonNull()); if (!(this.wireComponent instanceof WireEmitter)) { return; } retrieveWireConfigurationsIfNeeded(); final WireEnvelope wireEnvelope = new WireEnvelope(this.componentPid, wireRecords); for (final WireConfiguration wc : this.wireConfigurations) { final Wire wire = wc.getWire(); if (wire == null) { continue; } final String filter = wc.getFilter(); if (filter == null) { wire.update(wireEnvelope); continue; } final WireEnvelope filteredWireEnvelope = getFilteredWireEnvelope(wireRecords, wireEnvelope, filter); wire.update(filteredWireEnvelope); } fireEmitEvent(); }
Source:
SettingsItemReader getReader() { return new StreamSettingsItemReader(this) { @Override public void readFromStream(@NonNull InputStream inputStream) throws IOException, IllegalArgumentException { OutputStream output; if (!file.exists() || file.exists() && shouldReplace) { output = new FileOutputStream(file); } else { output = new FileOutputStream(renameFile(file)); } byte[] buffer = new byte[BUFFER]; int count; try { while ((count = inputStream.read(buffer)) != -1) { output.write(buffer, 0, count); } output.flush(); } finally { Algorithms.closeStream(output); } } }; }

Target:
SettingsItemReader getReader() { return new StreamSettingsItemReader(this) { @Override public void readFromStream(@NonNull InputStream inputStream) throws IOException, IllegalArgumentException { OutputStream output; if (!file.exists() || shouldReplace) { output = new FileOutputStream(file); } else { output = new FileOutputStream(renameFile(file)); } byte[] buffer = new byte[BUFFER]; int count; try { while ((count = inputStream.read(buffer)) != -1) { output.write(buffer, 0, count); } output.flush(); } finally { Algorithms.closeStream(output); } } }; }
Source:
public void delete(TransactionState transactionState, Delete delete) throws IOException { final long startTimestamp = transactionState.getStartTimestamp(); boolean issueGet = false; final Put deleteP = new Put(delete.getRow(), startTimestamp); final Get deleteG = new Get(delete.getRow()); Map<byte[], List<KeyValue>> fmap = delete.getFamilyMap(); if (fmap.isEmpty()) { issueGet = true; } for (List<KeyValue> kvl : fmap.values()) { for (KeyValue kv : kvl) { switch(KeyValue.Type.codeToType(kv.getType())) { case DeleteColumn: deleteP.add(kv.getFamily(), kv.getQualifier(), startTimestamp, null); break; case DeleteFamily: deleteG.addFamily(kv.getFamily()); issueGet = true; break; case Delete: if (kv.getTimestamp() == HConstants.LATEST_TIMESTAMP) { deleteP.add(kv.getFamily(), kv.getQualifier(), startTimestamp, null); break; } else { throw new UnsupportedOperationException("Cannot delete specific versions on Snapshot Isolation."); } } } } if (issueGet) { Result result = this.get(deleteG); for (Entry<byte[], NavigableMap<byte[], NavigableMap<Long, byte[]>>> entryF : result.getMap().entrySet()) { byte[] family = entryF.getKey(); for (Entry<byte[], NavigableMap<Long, byte[]>> entryQ : entryF.getValue().entrySet()) { byte[] qualifier = entryQ.getKey(); deleteP.add(family, qualifier, null); } } } transactionState.addWrittenRow(new RowKeyFamily(delete.getRow(), getTableName(), deleteP.getFamilyMap())); put(deleteP); }

Target:
public void delete(TransactionState transactionState, Delete delete) throws IOException { final long startTimestamp = transactionState.getStartTimestamp(); boolean issueGet = false; final Put deleteP = new Put(delete.getRow(), startTimestamp); final Get deleteG = new Get(delete.getRow()); Map<byte[], List<KeyValue>> fmap = delete.getFamilyMap(); if (fmap.isEmpty()) { issueGet = true; } for (List<KeyValue> kvl : fmap.values()) { for (KeyValue kv : kvl) { switch(KeyValue.Type.codeToType(kv.getType())) { case DeleteColumn: deleteP.add(kv.getFamily(), kv.getQualifier(), startTimestamp, null); break; case DeleteFamily: deleteG.addFamily(kv.getFamily()); issueGet = true; break; case Delete: if (kv.getTimestamp() == HConstants.LATEST_TIMESTAMP) { deleteP.add(kv.getFamily(), kv.getQualifier(), startTimestamp, null); break; } else { throw new UnsupportedOperationException("Cannot delete specific versions on Snapshot Isolation."); } } } } if (issueGet) { Result result = this.get(transactionState, deleteG); for (Entry<byte[], NavigableMap<byte[], NavigableMap<Long, byte[]>>> entryF : result.getMap().entrySet()) { byte[] family = entryF.getKey(); for (Entry<byte[], NavigableMap<Long, byte[]>> entryQ : entryF.getValue().entrySet()) { byte[] qualifier = entryQ.getKey(); deleteP.add(family, qualifier, null); } } } transactionState.addWrittenRow(new RowKeyFamily(delete.getRow(), getTableName(), deleteP.getFamilyMap())); put(deleteP); }
Source:
private void updateEnableStates() { boolean enabledCodeMining= getCheckBox(PREF_CODEMINING_ENABLED).getSelection(); if (enabledCodeMining) { boolean showReferences= getCheckBox(PREF_SHOW_REFERENCES).getSelection(); getCheckBox(PREF_SHOW_REFERENCES_ON_CLASSES).setEnabled(showReferences); getCheckBox(PREF_SHOW_REFERENCES_ON_FIELDS).setEnabled(showReferences); getCheckBox(PREF_SHOW_REFERENCES_ON_METHODS).setEnabled(showReferences); boolean showImplementations= getCheckBox(PREF_SHOW_IMPLEMENTATIONS).getSelection(); } else { atLeastOneCheckBox.setEnabled(false); fFilteredPrefTree.setEnabled(false); } }

Target:
private void updateEnableStates() { boolean enabledCodeMining= getCheckBox(PREF_CODEMINING_ENABLED).getSelection(); if (enabledCodeMining) { boolean showReferences= getCheckBox(PREF_SHOW_REFERENCES).getSelection(); getCheckBox(PREF_SHOW_REFERENCES_ON_CLASSES).setEnabled(showReferences); getCheckBox(PREF_SHOW_REFERENCES_ON_FIELDS).setEnabled(showReferences); getCheckBox(PREF_SHOW_REFERENCES_ON_METHODS).setEnabled(showReferences); getCheckBox(PREF_SHOW_IMPLEMENTATIONS).getSelection(); } else { atLeastOneCheckBox.setEnabled(false); fFilteredPrefTree.setEnabled(false); } }
Source:
public void removeFactory(@ApiParam(value = "Factory ID", required = true) @PathParam("id") String id, @Context UriInfo uriInfo) throws ForbiddenException, NotFoundException, ApiException { Factory factory = factoryStore.getFactory(id); if (factory == null) { LOG.warn("Factory URL with id is not found.", id); throw new NotFoundException("Factory with id " + id + " is not found."); } final User user = EnvironmentContext.getCurrent().getUser(); if (user == null) { throw new ForbiddenException("User needs to be logged in to remove a factory"); } String userId = user.getId(); if (userId == null || userId.isEmpty()) { throw new ApiException("Invalid factory without author stored"); } Author author = factory.getCreator(); if (author == null) { throw new ApiException("Invalid factory without author stored"); } if (!userId.equals(author.getUserId())) { throw new ForbiddenException("Only user that has issue the factory can delete it"); } factoryStore.removeFactory(id); }

Target:
public void removeFactory(@ApiParam(value = "Factory ID", required = true) @PathParam("id") String id, @Context UriInfo uriInfo) throws ForbiddenException, NotFoundException, ApiException { final User user = EnvironmentContext.getCurrent().getUser(); if (user == null) { throw new ForbiddenException("No authenticated user"); } Factory factory = factoryStore.getFactory(id); if (factory == null) { throw new NotFoundException("Factory with id " + id + " is not found."); } String userId = user.getId(); factoryEditValidator.validate(factory, userId); factoryStore.removeFactory(id); }
Source:
private static void partitionMethod(Method method, Map<String, Object> partitions) { String partitionKey = method.getName() + '/' + method.getParameterCount(); Object existingPartition = partitions.putIfAbsent(partitionKey, method); if (existingPartition instanceof Method) { partitions.put(partitionKey, new MethodPartition((Method) existingPartition, method)); } else if (existingPartition instanceof MethodPartition) { ((MethodPartition) existingPartition).addCandidate(method); } }

Target:
private static void partitionMethod(Method method, Map<String, Object> partitions) { String partitionKey = method.getName() + '/' + method.getParameterCount(); Object existingPartition = partitions.putIfAbsent(partitionKey, method); if (existingPartition == null) { } else if (existingPartition instanceof Method) { partitions.put(partitionKey, new MethodPartition((Method) existingPartition, method)); } else { ((MethodPartition) existingPartition).addCandidate(method); } }
Source:
public ZonedDateTime parse(String string) throws Exception { ZonedDateTime date; DateTimeFormatter df = this.getDateFormat(); ObjectHelper.notNull(this.pattern, "pattern"); date = ZonedDateTime.parse(string, df); return date; }

Target:
public ZonedDateTime parse(String string) throws Exception { DateTimeFormatter df = this.getDateFormat(); ObjectHelper.notNull(this.pattern, "pattern"); return ZonedDateTime.parse(string, df); }
Source:
public void adsRecoveryPageFairOasis() { String url = urlBuilder.getUrlForPath(WIKIA, getUrlArticlePageFairRecovery()); AdsRecoveryObject adsRecoveryObject = new AdsRecoveryObject(driver, url, DESKTOP_SIZE); adsRecoveryObject.wait.forElementPresent(AdsRecoveryObject.PF_RECOVERED_ADS_SELECTOR); adsRecoveryObject.triggerAdSlot(AdsContent.BOTTOM_LB) .wait .forElementPresent(By.cssSelector("div[id*=BOTTOM_LEADERBOARD][adonis-marker]")); List<WebElement> recoveredAds = adsRecoveryObject.getRecoveredAds(AdsRecoveryObject.PF_RECOVERED_ADS_SELECTOR); Assert.assertEquals(recoveredAds.size(), 3); adsRecoveryObject.assertIfAllRecoveredSlotHasCorrectSizeAndBackground(recoveredAds); }

Target:
public void adsRecoveryPageFairOasis() { String url = urlBuilder.getUrlForPath(WIKIA, getUrlArticlePageFairRecovery()); AdsRecoveryObject adsRecoveryObject = new AdsRecoveryObject(driver, url, DESKTOP_SIZE); adsRecoveryObject.wait.forElementPresent(AdsRecoveryObject.PF_RECOVERED_ADS_SELECTOR); adsRecoveryObject.triggerAdSlot(AdsContent.BOTTOM_LB) .wait .forElementPresent(By.cssSelector(RECOVERED_BOTTOM_LEADERBOARD_SELECTOR)); List<WebElement> recoveredAds = adsRecoveryObject.getRecoveredAds(AdsRecoveryObject.PF_RECOVERED_ADS_SELECTOR); Assert.assertEquals(recoveredAds.size(), 3); adsRecoveryObject.assertIfAllRecoveredSlotHasCorrectSizeAndBackground(recoveredAds); }
Source:
public String getPackage(String basePackage, SchemaAndTable schemaAndTable) { return basePackage; }

Target:
public String getPackage(String basePackage, SchemaAndTable schemaAndTable) { return appendSchema(basePackage, schemaAndTable.getSchema()); }
Source:
public void testIsProperUtilsClass() throws ReflectiveOperationException { assertUtilsClassHasPrivateConstructor(Main.class, TestUtils.CheckConstructorIsPrivate.FALSE); }

Target:
public void testIsProperUtilsClass() throws ReflectiveOperationException { assertUtilsClassHasPrivateConstructor(Main.class, false); }
Source:
protected ExecutorService createDefaultBatchPool(){ return Executors.newCachedThreadPool( new ThreadFactoryBuilder() .setNameFormat(BATCH_POOL_THREAD_NAME + "-d") .setDaemon(true) .build()); }

Target:
protected static ExecutorService createDefaultBatchPool(){ return Executors.newCachedThreadPool( new ThreadFactoryBuilder() .setNameFormat(BATCH_POOL_THREAD_NAME + "-%d") .setDaemon(true) .build()); }
Source:
private static @NotNull String nodeDescription(ClusterNode node) { return node.getClass().getSimpleName() + " [id=" + node.id() + ", addrs=" + node.addresses() + ", order=" + node.order() + ", ver=" + node.version() + ", isClient=" + node.isClient() + ", consistentId=" + node.consistentId() + "]"; }

Target:
private static String nodeDescription(ClusterNode node) { return node.getClass().getSimpleName() + " [id=" + node.id() + ", addrs=" + node.addresses() + ", order=" + node.order() + ", ver=" + node.version() + ", isClient=" + node.isClient() + ", consistentId=" + node.consistentId() + "]"; }
Source:
public SchemaType getRootType() { if (rootType != null) { return rootType; } try { SchemaGlobalElement rootElement = schemas.findRootElement(rootElementName); if (rootElement != null) { rootType = rootElement.getType(); return rootType; } } catch (XmlException e) { throw new MetaDataGenerationException(e); } return null; }

Target:
public SchemaType getRootType() { if (rootType == null) { synchronized (this) { if (rootType == null) { rootType = getRootTypeFromSchemas(); } } } return rootType; }
Source:
public R transform(K k, V v) { Span span = kafkaStreamsTracing.nextSpan(processorContext); if (!span.isNoop()) { span.name(spanName); span.start(); } Tracer.SpanInScope ws = tracer.withSpanInScope(span); Throwable error = null; try { return delegateTransformer.transform(k, v); } catch (Throwable e) { error = e; throw e; } finally { kafkaStreamsTracing.injector.inject(span.context(), processorContext.headers()); if (error != null) span.error(error); span.finish(); ws.close(); } }

Target:
public R transform(K k, V v) { Span span = kafkaStreamsTracing.nextSpan(processorContext); if (!span.isNoop()) { span.name(spanName); span.start(); } Tracer.SpanInScope ws = tracer.withSpanInScope(span); Throwable error = null; try { return delegateTransformer.transform(k, v); } catch (Throwable e) { error = e; propagateIfFatal(e); throw e; } finally { kafkaStreamsTracing.injector.inject(span.context(), processorContext.headers()); if (error != null) span.error(error); span.finish(); ws.close(); } }
Source:
public boolean askRetryForNetworkIssue(Throwable ex) { if (CommonsPlugin.isJUnitTest()) { return false; } if (donnotRetryByCancel) { return false; } final AtomicBoolean retry = new AtomicBoolean(false); try { if (askUserForNetworkIssueSemaphore.availablePermits() <= 0) { askUserForNetworkIssueSemaphore.acquire(); askUserForNetworkIssueSemaphore.release(); return askUserForNetworkIssueRetryCache; } askUserForNetworkIssueSemaphore.acquire(); DisplayUtils.syncExecInNewUIThread(new Runnable() { @Override public void run() { Shell shell = new Shell(); retry.set(askRetryForNetworkIssueInDialog(shell, ex)); shell.dispose(); } }); } catch (Throwable t) { ExceptionHandler.process(t); } finally { askUserForNetworkIssueRetryCache = retry.get(); if (askUserForNetworkIssueSemaphore.availablePermits() <= 0) { askUserForNetworkIssueSemaphore.release(); } } return askUserForNetworkIssueRetryCache; }

Target:
public boolean askRetryForNetworkIssue(Throwable ex) { if (CommonsPlugin.isJUnitTest()) { return false; } if (donnotRetryByCancel) { return false; } final AtomicBoolean retry = new AtomicBoolean(false); try { if (askUserForNetworkIssueSemaphore.availablePermits() <= 0) { askUserForNetworkIssueSemaphore.acquire(); askUserForNetworkIssueSemaphore.release(); return askUserForNetworkIssueRetryCache; } askUserForNetworkIssueSemaphore.acquire(); if (Display.getCurrent() == null) { try { Display defaultDisplay = Display.getDefault(); if (defaultDisplay.getThread().getState() == Thread.State.RUNNABLE) { defaultDisplay.syncExec(new Runnable() { @Override public void run() { retry.set(askRetryForNetworkIssueInDialog(DisplayUtils.getDefaultShell(), ex)); } }); } else { final DeviceData deviceData = Display.getDefault().getDeviceData(); DisplayUtils.syncExecInNewUIThread(new Runnable() { @Override public void run() { Shell shell = DisplayUtils.getDefaultShell(false); retry.set(askRetryForNetworkIssueInDialog(shell, ex)); shell.dispose(); } }, deviceData); } } catch (Exception e) { ExceptionHandler.process(e); } } else { retry.set(askRetryForNetworkIssueInDialog(DisplayUtils.getDefaultShell(), ex)); } } catch (Throwable t) { ExceptionHandler.process(t); } finally { askUserForNetworkIssueRetryCache = retry.get(); if (askUserForNetworkIssueSemaphore.availablePermits() <= 0) { askUserForNetworkIssueSemaphore.release(); } } return askUserForNetworkIssueRetryCache; }
Source:
public static Expression systemEnvironmentExpression(final String propertyName, final String defaultValue) { return new ExpressionAdapter() { public Object evaluate(Exchange exchange) { String text = simpleExpression(propertyName.toUpperCase(Locale.ROOT)).evaluate(exchange, String.class); String answer = System.getenv(text); if (answer == null) { String text2 = simpleExpression(defaultValue).evaluate(exchange, String.class); answer = text2; } return answer; } @Override public String toString() { return "systemEnvironment(" + propertyName.toUpperCase(Locale.ROOT) + ")"; } }; }

Target:
public static Expression systemEnvironmentExpression(final String propertyName, final String defaultValue) { return new ExpressionAdapter() { public Object evaluate(Exchange exchange) { String text = simpleExpression(propertyName).evaluate(exchange, String.class); String answer = System.getenv(text.toUpperCase()); if (answer == null) { String text2 = simpleExpression(defaultValue).evaluate(exchange, String.class); answer = text2; } return answer; } @Override public String toString() { return "systemEnvironment(" + propertyName + ")"; } }; }
Source:
public static void output(@AggregationState DigestAndPercentileArrayState state, BlockBuilder out) { QuantileDigest digest = state.getDigest(); if (digest == null || digest.getCount() == 0.0) { out.appendNull(); } else { List<Long> bounds = digest.getQuantiles(state.getPercentiles()); Double mean = digestToTruncatedMean(digest, bounds, new QuantileDigestFunctions.RealMiddleFunction()); if (mean == null) { out.appendNull(); } else { REAL.writeLong(out, floatToRawIntBits(mean.floatValue())); } } }

Target:
public static void output(@AggregationState DigestAndPercentileArrayState state, BlockBuilder out) { QuantileDigest digest = state.getDigest(); if (digest == null || digest.getCount() == 0.0) { out.appendNull(); } else { List<Long> bounds = digest.getQuantiles(state.getPercentiles()); Double mean = digestToTruncatedMean(digest, bounds, REAL_MIDDLE_FUNCTION); if (mean == null) { out.appendNull(); } else { REAL.writeLong(out, floatToRawIntBits(mean.floatValue())); } } }
Source:
public boolean isSpatialJoin() { return criteria.isEmpty() && filter.isPresent() && type == INNER; }

Target:
public boolean isSpatialJoin() { return spatialJoin; }
Source:
public int compareTo(InstructorFeedbackResultsParticipantPanel o) { if (isHasResponses == o.isHasResponses) { return name.compareTo(o.name); } else { return isHasResponses ? -1 : 1; } }

Target:
public int compareTo(InstructorFeedbackResultsParticipantPanel o) { if (isHasResponses == o.isHasResponses) { return name.compareTo(o.name); } return isHasResponses ? -1 : 1; }
Source:
public RootDSEData(DirContext dirContext) throws NamingException { SearchControls controls = RootDSEQueryInfo.createSearchControls(); String query = RootDSEQueryInfo.ROOT_DSE_LDAP_QUERY; NamingEnumeration<SearchResult> searchResults = dirContext.search("", query, controls); while (searchResults.hasMoreElements()) { SearchResult searchResult = searchResults.nextElement(); Attributes attributes = searchResult.getAttributes(); Attribute attribute = attributes.get(RootDSEQueryInfo.DEFAULT_NAMING_CONTEXT_RESULT_ATTRIBUTE); if (attribute != null) { domainDN = (String) attribute.get(); ldapProviderType = LdapProviderType.activeDirectory; } else { Attribute namingContextAttribute = attributes.get(RootDSEQueryInfo.NAMING_CONTEXTS_RESULT_ATTRIBUTE); Attribute rhdsAttribute = attributes.get(RootDSEQueryInfo.RHDS_PROPERTY); if (namingContextAttribute != null) { domainDN = getDefaultNamingContextFromNamingContexts(namingContextAttribute); if (rhdsAttribute != null) { ldapProviderType = LdapProviderType.rhds; } else { ldapProviderType = LdapProviderType.ipa; } } } } }

Target:
public RootDSEData(DirContext dirContext) throws NamingException { SearchControls controls = RootDSEQueryInfo.createSearchControls(); String query = RootDSEQueryInfo.ROOT_DSE_LDAP_QUERY; NamingEnumeration<SearchResult> searchResults = dirContext.search("", query, controls); boolean succeeded = false; while (searchResults.hasMoreElements() && !succeeded) { SearchResult searchResult = searchResults.nextElement(); Attributes attributes = searchResult.getAttributes(); succeeded = applyDomainAttributes(attributes); } }
Source:
private String getVersionString(Class<?> serviceClass) { List<String> versions = new ArrayList<>(2); String maybeRemotingVersion = this.getClass().getPackage().getImplementationVersion(); if (maybeRemotingVersion != null) { versions.add("http-remoting " + maybeRemotingVersion); } String maybeServiceVersion = serviceClass.getPackage().getImplementationVersion(); if (maybeServiceVersion != null) { versions.add(String.format("Service API %s %s", serviceClass.getSimpleName(), maybeServiceVersion)); } return Joiner.on(",").join(versions); }

Target:
private String getVersionString(Class<?> serviceClass) { List<String> versions = new ArrayList<>(2); String maybeServiceVersion = serviceClass.getPackage().getImplementationVersion(); if (maybeServiceVersion != null) { versions.add("Service API " + serviceClass.getSimpleName() + " " + maybeServiceVersion); } String maybeRemotingVersion = this.getClass().getPackage().getImplementationVersion(); if (maybeRemotingVersion != null) { versions.add("http-remoting " + maybeRemotingVersion); } return Joiner.on(";").join(versions); }
Source:
private boolean checkNoDisksBasedOnTemplateDisks() { List<String> disksInfo = null; for (DiskImage diskImage : imageTemplates) { List<DiskImage> basedDisks = getDiskImageDAO().getAllSnapshotsForParent(diskImage.getImageId()); for (DiskImage basedDisk : basedDisks) { if (disksInfo == null) { disksInfo = new LinkedList<>(); } disksInfo.add(String.format("Disk Alias: %s, Disk Id: %s ", basedDisk.getDiskAlias(), basedDisk.getId())); } } if (disksInfo != null) { return failCanDoAction(VdcBllMessages.VMT_CANNOT_REMOVE_DETECTED_DERIVED_DISKS, String.format("$disksInfo %s", String.format(StringUtils.join(disksInfo, "%n")))); } return true; }

Target:
private boolean checkNoDisksBasedOnTemplateDisks() { List<String> disksInfo = null; for (DiskImage diskImage : imageTemplates) { List<DiskImage> basedDisks = getDiskImageDAO().getAllSnapshotsForParent(diskImage.getImageId()); for (DiskImage basedDisk : basedDisks) { if (disksInfo == null) { disksInfo = new LinkedList<>(); } disksInfo.add(String.format("%s (%s) ", basedDisk.getDiskAlias(), basedDisk.getId())); } } if (disksInfo != null) { return failCanDoAction(VdcBllMessages.VMT_CANNOT_REMOVE_DETECTED_DERIVED_DISKS, String.format("$disksInfo %s", String.format(StringUtils.join(disksInfo, "%n")))); } return true; }
Source:
protected Set<MambuEntity> getSupportedEntities() { return supportedEntities; }

Target:
public static MambuEntityType[] getSupportedEntities() { return supportedEntities; }
Source:
public void setAbbrev(final int abbrev) { this.abbreviationLength = abbrev; }

Target:
public DescribeCommand setAbbrev(final int abbrev) throws IllegalArgumentException { checkCallable(); if (abbrev < 0 || abbrev == 1 || abbrev > 40) { throw new IllegalArgumentException( JGitText.get().describeInvalidAbbreviation); } this.abbreviationLength = abbrev; return this; }
Source:
public void onCrdLastFinishedVersionReceived(AffinityTopologyVersion lastFinishedVer, AffinityTopologyVersion pendingVer, boolean receivedSingleMsg) { log.warning("Received check response from coordinator: " + "[lastFinishedVer=" + lastFinishedVer + ", pendingVer=" + pendingVer + ", receivedSingleMsg=" + receivedSingleMsg + ", localExchId=" + exchId + "]"); boolean failLocal; if (lastFinishedVer.compareTo(exchId.topologyVersion()) >= 0) failLocal = true; else if (pendingVer.equals(exchId.topologyVersion()) && !receivedSingleMsg) failLocal = true; else if (pendingVer.equals(exchId.topologyVersion()) && receivedSingleMsg) return; else failLocal = false; if (failLocal) cctx.kernalContext().failure().process(new FailureContext(FailureType.CRITICAL_ERROR, new IgniteException( "Coordinator topology version is greater than local."))); else cctx.discovery().failNode(crd.id(), null); }

Target:
public void onCrdLastFinishedVersionReceived(AffinityTopologyVersion lastFinishedVer, AffinityTopologyVersion pendingVer, boolean receivedSingleMsg) { log.warning("Received check response from coordinator: " + "[lastFinishedVer=" + lastFinishedVer + ", pendingVer=" + pendingVer + ", receivedSingleMsg=" + receivedSingleMsg + ", localExchId=" + exchId + "]"); boolean failLoc; if (lastFinishedVer.compareTo(exchId.topologyVersion()) >= 0) failLoc = true; else if (pendingVer.equals(exchId.topologyVersion()) && !receivedSingleMsg) failLoc = true; else if (pendingVer.equals(exchId.topologyVersion()) && receivedSingleMsg) return; else failLoc = false; if (failLoc) cctx.kernalContext().failure().process(new FailureContext(FailureType.CRITICAL_ERROR, new IgniteException( "Coordinator topology version is greater than local."))); else cctx.discovery().failNode(crd.id(), null); }
Source:
String value() default ""; EmptyHandling onEmpty() default EmptyHandling.THROW; enum EmptyHandling { VOID, NULL, THROW; public static final String valueNotHandledMessage = "EmptyHandling type on BindList not handled. Please report this to the jdbi developers."; }

Target:
String value() default ""; EmptyHandling onEmpty() default EmptyHandling.THROW; enum EmptyHandling { VOID, NULL, THROW; }
Source:
public WordnetLemmaReader(String wordnetPath) { try { if (IOUtils.lsResources(WordnetLemmaReader.class, wordnetPath).size() == 0) { logger.error("Wordnet path does not point to a directory."); System.exit(-1); } } catch (URISyntaxException | IOException e) { logger.error("Error while trying to access Wordnet."); System.exit(-1); } nounLemmas = new HashMap<>(); verbLemmas = new HashMap<>(); adjectiveLemmas = new HashMap<>(); adverbLemmas = new HashMap<>(); try { List<String> list = LineIO.readFromClasspath(wordnetPath + "/noun.exc"); for (String wordLemmas : list) { String[] wordLemma = wordLemmas.split("\\s+"); nounLemmas.put(wordLemma[0], wordLemma[1]); } list = LineIO.readFromClasspath(wordnetPath + "/verb.exc"); for (String wordLemmas : list) { String[] wordLemma = wordLemmas.split("\\s+"); verbLemmas.put(wordLemma[0], wordLemma[1]); } list = LineIO.readFromClasspath(wordnetPath + "/adj.exc"); for (String wordLemmas : list) { String[] wordLemma = wordLemmas.split("\\s+"); adjectiveLemmas.put(wordLemma[0], wordLemma[1]); } list = LineIO.readFromClasspath(wordnetPath + "/adv.exc"); for (String wordLemmas : list) { String[] wordLemma = wordLemmas.split("\\s+"); adverbLemmas.put(wordLemma[0], wordLemma[1]); } } catch (IOException e) { e.printStackTrace(); } }

Target:
public WordnetLemmaReader(String wordnetPath) { try { if (IOUtils.lsResources(WordnetLemmaReader.class, wordnetPath).size() == 0) { System.err.println("Wordnet path does not point to a directory."); System.exit(-1); } } catch (URISyntaxException | IOException e) { System.err.println("Error while trying to access Wordnet."); System.exit(-1); } nounLemmas = new HashMap<>(); verbLemmas = new HashMap<>(); adjectiveLemmas = new HashMap<>(); adverbLemmas = new HashMap<>(); try { List<String> list = LineIO.readFromClasspath(wordnetPath + "/noun.exc"); for (String wordLemmas : list) { String[] wordLemma = wordLemmas.split("\\s+"); nounLemmas.put(wordLemma[0], wordLemma[1]); } list = LineIO.readFromClasspath(wordnetPath + "/verb.exc"); for (String wordLemmas : list) { String[] wordLemma = wordLemmas.split("\\s+"); verbLemmas.put(wordLemma[0], wordLemma[1]); } list = LineIO.readFromClasspath(wordnetPath + "/adj.exc"); for (String wordLemmas : list) { String[] wordLemma = wordLemmas.split("\\s+"); adjectiveLemmas.put(wordLemma[0], wordLemma[1]); } list = LineIO.readFromClasspath(wordnetPath + "/adv.exc"); for (String wordLemmas : list) { String[] wordLemma = wordLemmas.split("\\s+"); adverbLemmas.put(wordLemma[0], wordLemma[1]); } } catch (IOException e) { e.printStackTrace(); } }
Source:
protected static DbFacade getDbFacade() { return DbFacade.getInstance(); }

Target:
private static DbFacade getDbFacade() { return DbFacade.getInstance(); }
Source:
public GetRevisionTaskThreaded(CouchDB sourceDb, List<BulkGetRequest> requests, boolean pullAttachmentsInline) { Preconditions.checkNotNull(sourceDb, "sourceDb cannot be null"); Preconditions.checkNotNull(requests, "requests cannot be null"); for(BulkGetRequest request : requests) { Preconditions.checkNotNull(request.id, "id cannot be null"); Preconditions.checkNotNull(request.revs, "revs cannot be null"); } this.sourceDb = sourceDb; this.requests = requests; this.pullAttachmentsInline = pullAttachmentsInline; this.executorService = new ThreadPoolExecutor(threads, threads, 1, TimeUnit.MINUTES, new LinkedBlockingQueue<Runnable>()); this.responses = new LinkedBlockingQueue<Future<DocumentRevsList>>(threads) { @Override public boolean add(Future<DocumentRevsList> documentRevsListFuture) { boolean offerResult; try { offerResult = offer(documentRevsListFuture, 5, TimeUnit.MINUTES); } catch (InterruptedException ie) { throw new RuntimeException("Offer interrupted", ie); } if (!offerResult) { throw new RuntimeException("Offer timed out"); } return true; } }; this.completionService = new ExecutorCompletionService<DocumentRevsList>(executorService, responses); this.requestsOutstanding = new AtomicInteger(requests.size()); for (final BulkGetRequest request : requests) { completionService.submit(new Callable<DocumentRevsList>() { @Override public DocumentRevsList call() throws Exception { return new DocumentRevsList(GetRevisionTaskThreaded.this.sourceDb.getRevisions (request.id, request.revs, request.atts_since, GetRevisionTaskThreaded.this .pullAttachmentsInline)); } }); } }

Target:
public GetRevisionTaskThreaded(CouchDB sourceDb, List<BulkGetRequest> requests, boolean pullAttachmentsInline) { Preconditions.checkNotNull(sourceDb, "sourceDb cannot be null"); Preconditions.checkNotNull(requests, "requests cannot be null"); for(BulkGetRequest request : requests) { Preconditions.checkNotNull(request.id, "id cannot be null"); Preconditions.checkNotNull(request.revs, "revs cannot be null"); } this.sourceDb = sourceDb; this.requests = requests; this.pullAttachmentsInline = pullAttachmentsInline; this.executorService = Executors.newFixedThreadPool(threads); this.responses = new LinkedBlockingQueue<Future<DocumentRevsList>>(threads) { @Override public boolean add(Future<DocumentRevsList> documentRevsListFuture) { boolean offerResult; try { offerResult = offer(documentRevsListFuture, responseTimeout, responseTimeoutUnits); } catch (InterruptedException ie) { throw new RuntimeException("Offer interrupted", ie); } if (!offerResult) { throw new RuntimeException("Offer timed out"); } return true; } }; this.completionService = new ExecutorCompletionService<DocumentRevsList>(executorService, responses); this.requestsOutstanding = new AtomicInteger(requests.size()); for (final BulkGetRequest request : requests) { completionService.submit(new Callable<DocumentRevsList>() { @Override public DocumentRevsList call() throws Exception { return new DocumentRevsList(GetRevisionTaskThreaded.this.sourceDb.getRevisions (request.id, request.revs, request.atts_since, GetRevisionTaskThreaded.this.pullAttachmentsInline)); } }); } }
Source:
public void ended() { this.onCompletionListener.onCompletion(this); }

Target:
public void ended() { if(this.onCompletionListener != null) this.onCompletionListener.onCompletion(this); }
Source:
private AbstractSelectTreeViewer(Composite parent, TriStateFilteredCheckboxTree checkboxTree, int legendIndex, String id) { super(parent, checkboxTree.getViewer()); TreeViewer treeViewer = checkboxTree.getViewer(); treeViewer.setComparator(COMPARATOR); if (treeViewer instanceof CheckboxTreeViewer) { ((CheckboxTreeViewer) treeViewer).addCheckStateListener(new CheckStateChangedListener()); } fCheckboxTree = checkboxTree; fLegendIndex = legendIndex; fId = id; checkboxTree.setPreCheckStateListener(new ManyEntriesSelectedDialogPreCheckedListener(checkboxTree)); }

Target:
private AbstractSelectTreeViewer(Composite parent, TriStateFilteredCheckboxTree checkboxTree, int legendIndex, String id) { super(parent, checkboxTree.getViewer()); TreeViewer treeViewer = checkboxTree.getViewer(); treeViewer.setComparator(COMPARATOR); if (treeViewer instanceof CheckboxTreeViewer) { ((CheckboxTreeViewer) treeViewer).addCheckStateListener(new CheckStateChangedListener()); } fCheckboxTree = checkboxTree; fLegendIndex = legendIndex; fId = id; }
Source:
private void addInitialOperations(DeviceIdentifier deviceIdentifier, String deviceType) throws DeviceManagementException { DeviceManagementProviderService deviceManagementProviderService = DeviceManagementDataHolder.getInstance(). getDeviceManagementProvider(); DeviceManagementService deviceManagementService = pluginRepository.getDeviceManagementService(deviceType, this.getTenantId()); InitialOperationConfig init = deviceManagementService.getInitialOperationConfig(); List<DeviceIdentifier> deviceIdentifiers = new ArrayList<>(); deviceIdentifiers.add(deviceIdentifier); if (init != null) { List<String> initialOperations = init.getOperations(); if (initialOperations != null) { for (String str : initialOperations) { CommandOperation operation = new CommandOperation(); operation.setEnabled(true); operation.setType(Operation.Type.COMMAND); operation.setCode(str); try { deviceManagementProviderService. addOperation(deviceType, operation, deviceIdentifiers); } catch (OperationManagementException e) { throw new DeviceManagementException( "Unable to find the device with the id: '" + deviceIdentifier.getId(), e); } catch (InvalidDeviceException e) { throw new DeviceManagementException( "Unable to find the device with the id: '" + deviceIdentifier.getId(), e); } } } } }

Target:
private void addInitialOperations(DeviceIdentifier deviceIdentifier, String deviceType) throws DeviceManagementException { DeviceManagementProviderService deviceManagementProviderService = DeviceManagementDataHolder.getInstance(). getDeviceManagementProvider(); DeviceManagementService deviceManagementService = pluginRepository.getDeviceManagementService(deviceType, this.getTenantId()); InitialOperationConfig init = deviceManagementService.getInitialOperationConfig(); List<DeviceIdentifier> deviceIdentifiers = new ArrayList<>(); deviceIdentifiers.add(deviceIdentifier); if (init != null) { List<String> initialOperations = init.getOperations(); if (initialOperations != null) { for (String str : initialOperations) { CommandOperation operation = new CommandOperation(); operation.setEnabled(true); operation.setType(Operation.Type.COMMAND); operation.setCode(str); try { deviceManagementProviderService.addOperation(deviceType, operation, deviceIdentifiers); } catch (OperationManagementException e) { throw new DeviceManagementException("Unable to add the operation for the device with the id: '" + deviceIdentifier.getId(), e); } catch (InvalidDeviceException e) { throw new DeviceManagementException("Unable to find the device with the id: '" + deviceIdentifier.getId(), e); } } } } }
Source:
private Collection<V> valuesForPagingPredicate(Predicate predicate) { PagingPredicateImpl pagingPredicate = unwrapPagingPredicate(predicate); pagingPredicate.setIterationType(IterationType.VALUE); ClientMessage request = MapValuesWithPagingPredicateCodec.encodeRequest(name, toData(predicate)); ClientMessage response = invokeWithPredicate(request, predicate); List<Entry> resultList = new ArrayList<>(); MapValuesWithPagingPredicateCodec.decodeResponse(response, (keyData, valueData) -> { K key = toObject(keyData); V value = toObject(valueData); resultList.add(new AbstractMap.SimpleEntry<>(key, value)); }); return (Collection<V>) getSortedQueryResultSet(resultList, pagingPredicate, IterationType.VALUE); }

Target:
private Collection<V> valuesForPagingPredicate(Predicate predicate) { PagingPredicateImpl pagingPredicate = unwrapPagingPredicate(predicate); pagingPredicate.setIterationType(IterationType.VALUE); ClientMessage request = MapValuesWithPagingPredicateCodec.encodeRequest(name, toData(predicate)); ClientMessage response = invokeWithPredicate(request, predicate); List<Entry> resultList = new ArrayList<>(); MapValuesWithPagingPredicateCodec.decodeResponse(response, (keyData, valueData) -> { K key = toObject(keyData); V value = toObject(valueData); resultList.add(new AbstractMap.SimpleImmutableEntry<>(key, value)); }); return (Collection<V>) getSortedQueryResultSet(resultList, pagingPredicate, IterationType.VALUE); }
Source:
private static ImmutableMap<String, String> parseAlternates(IniFile config) { if (!config.contains("alternates")) { return ImmutableMap.of(); } ImmutableMap.Builder<String, String> builder = ImmutableMap.builder(); PropertySet section = config.getSection("alternates"); for (String key : section.keys()) { String value = section.getValue(key); builder.put(key, value); } return builder.build(); }

Target:
private static ImmutableMap<String, String> parseAlternates(IniFile config) { if (!config.contains(ALTERNATES_SECTION)) { return ImmutableMap.of(); } ImmutableMap.Builder<String, String> builder = ImmutableMap.builder(); PropertySet section = config.getSection(ALTERNATES_SECTION); for (String key : section.keys()) { builder.put(key, section.getValue(key)); } return builder.build(); }
Source:
boolean start(File workingDir, String filename) { try { createProgressFile(workingDir, filename); watchDogThread = new Thread(new ProgressFileReaderThread(Duration.ofMillis(PASchedulerProperties.SCHEDULER_PROGRESS_FILE_READER_POLL_TIMEOUT.getValueAsInt()))); watchDogThread.setName(ProgressFileReaderThread.class.getName()); watchDogThread.start(); progress = 0; return true; } catch (IOException e) { logger.warn("Error while creating progress file. Progress will not be reported.", e); return false; } }

Target:
boolean start(File workingDir, String filename) { try { createProgressFileIfNeeded(workingDir, filename); String propertyValue = System.getProperty(TaskLauncher.PROGRESS_FILE_READER_PERIOD, DEFAULT_POLLER_PERIOD.toString()); Long periodInMs; try { periodInMs = Long.parseLong(propertyValue); } catch (NumberFormatException e) { logger.warn(String.format("Incorect property %s value: %s, using default value: %s.", TaskLauncher.PROGRESS_FILE_READER_PERIOD, propertyValue, DEFAULT_POLLER_PERIOD.toString())); periodInMs = DEFAULT_POLLER_PERIOD; } scheduledExecutorService.scheduleAtFixedRate(this::readValue, 0, periodInMs, TimeUnit.MILLISECONDS); progress = 0; return true; } catch (IOException e) { logger.warn("Error while creating progress file. Progress will not be reported.", e); return false; } }
Source:
public ResponseEntity<?> setDefaultStorage(@PathVariable("id") final String id, final NativeWebRequest request) { if (!adminService.isAdmin(AuthorizationService.Operation.WRITE)) { return status(FORBIDDEN).build(); } final Storage storage = storageService.setDefaultStorage(id); return status(OK).body(storage); }

Target:
public ResponseEntity<?> setDefaultStorage(@PathVariable("id") final String id, final NativeWebRequest request) throws PluginException, NoSuchStorageException, InternalNakadiException { if (!adminService.isAdmin(AuthorizationService.Operation.WRITE)) { return status(FORBIDDEN).build(); } final Storage storage = storageService.setDefaultStorage(id); return status(OK).body(storage); }
Source:
public void close(final ChannelHandlerContext context, final ChannelPromise promise) { this.traceOperation(context, "close"); if (!this.closingExceptionally) { this.completeAllPendingRequestsExceptionally(context, ON_CLOSE); } else { logger.debug("{} closed exceptionally", context); } final SslHandler sslHandler = context.pipeline().get(SslHandler.class); if (sslHandler != null) { try { sslHandler.closeOutbound(); } catch (Exception exception) { if (exception instanceof SSLException) { logger.debug( "SslException when attempting to close the outbound SSL connection: {}", exception.toString()); } else { logger.warn( "Exception when attempting to close the outbound SSL connection: {}", exception.toString()); throw exception; } } } context.close(promise); }

Target:
public void close(final ChannelHandlerContext context, final ChannelPromise promise) { this.traceOperation(context, "close"); if (!this.closingExceptionally) { this.completeAllPendingRequestsExceptionally(context, ON_CLOSE); } else { logger.debug("{} closed exceptionally", context); } final SslHandler sslHandler = context.pipeline().get(SslHandler.class); if (sslHandler != null) { try { sslHandler.closeOutbound(); } catch (Exception exception) { if (exception instanceof SSLException) { logger.debug( "SslException when attempting to close the outbound SSL connection: ", exception); } else { logger.warn( "Exception when attempting to close the outbound SSL connection: ", exception); throw exception; } } } context.close(promise); }
Source:
public OrganisationListWriter(EntityListWriter<Person> personListWriter) { this.personListWriter = personListWriter; }

Target:
public OrganisationListWriter(EntityListWriter<Person> personListWriter) { this.personListWriter = checkNotNull(personListWriter); }
Source:
public Response addAll(Collection<Map<String, Object>> events) { if (closed || inputFinished) { throw new IllegalStateException("Cannot add events to closed firehose!"); } log.debug("Adding %,d events to firehose: %s", events.size(), serviceName); try { if (writer == null) { writer = new PrintWriter(dataFile); } for (final Map<String, Object> event : events) { parser.parse(event); writer.println(objectMapper.writeValueAsString(event)); } writer.flush(); return Response.ok().entity(ImmutableMap.of("eventCount", events.size())).build(); } catch (IOException e) { return Response.serverError().entity(ImmutableMap.of("error", e.getMessage())).build(); } }

Target:
public Response addAll(Collection<Map<String, Object>> events) { if (closed || inputFinished) { throw new IllegalStateException("Cannot add events to closed firehose!"); } log.debug("Adding %,d events to firehose: %s", events.size(), serviceName); try { for (final Map<String, Object> event : events) { parser.parse(event); writer.println(objectMapper.writeValueAsString(event)); } writer.flush(); return Response.ok().entity(ImmutableMap.of("eventCount", events.size())).build(); } catch (IOException e) { return Response.serverError().entity(ImmutableMap.of("error", e.getMessage())).build(); } }
Source:
public void onlyAvailableOfflineOption(){ Intent i = new Intent(this, FileDisplayActivity.class); i.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); i.putExtra(EXTRA_ONLY_AVAILABLE_OFFLINE, true); startActivity(i); }

Target:
public void onlyAvailableOfflineOption(){ Intent intent = new Intent(this, FileDisplayActivity.class); intent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); intent.putExtra(EXTRA_ONLY_AVAILABLE_OFFLINE, true); startActivity(intent); }
Source:
protected void writeOVirtSection(StringBuilder configBuilder) { configBuilder.append("\n[ovirt]") .append("\nhost=").append(engineHost) .append("\nvm-guid=").append(vmId.toString()) .append("\njsessionid=").append(sessionId) .append("\nadmin=").append(Boolean.valueOf(admin)); }

Target:
protected void writeOVirtSection(StringBuilder configBuilder) { configBuilder.append("\n[ovirt]") .append("\nhost=").append(engineHost) .append("\nvm-guid=").append(vmId.toString()) .append("\njsessionid=").append(sessionId) .append("\nadmin=").append(admin ? 1 : 0); }
Source:
@Override public void parseArguments(CommandArgIterator argIter) { if (argIter.hasNextArg()) { String arg = argIter.peekNextArg(); if ("--force".equalsIgnoreCase(arg)) { force = true; argIter.nextArg(""); } } }

Target:
@Override public void parseArguments(CommandArgIterator argIter) { if (argIter.hasNextArg()) { String arg = argIter.peekNextArg(); if (FORCE_COMMAND.equalsIgnoreCase(arg)) { force = true; argIter.nextArg(""); } } }