auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void added(RuleTemplate element) { String templateUID = element.getUID(); Set<String> rules = new HashSet<String>(); synchronized (this) { Set<String> rulesForResolving = mapTemplateToRules.get(templateUID); if (rulesForResolving != null) { rules.addAll(rulesForResolving); } } for (String rUID : rules) { try { update(resolveRuleByTemplate(get(rUID))); } catch (Exception e) { logger.error("Resolving the rule '{}' by template '{}' failed", rUID, templateUID, e); } } }

Target:
public void added(RuleTemplate element) { String templateUID = element.getUID(); Set<String> rules = new HashSet<String>(); synchronized (this) { Set<String> rulesForResolving = mapTemplateToRules.get(templateUID); if (rulesForResolving != null) { rules.addAll(rulesForResolving); } } for (String rUID : rules) { try { Rule unresolvedRule = get(rUID); Rule resolvedRule = resolveRuleByTemplate(unresolvedRule); Provider<Rule> provider = getProvider(rUID); if (provider instanceof ManagedRuleProvider) { update(resolvedRule); } else { updated(provider, unresolvedRule, unresolvedRule); } } catch (IllegalArgumentException e) { logger.error("Resolving the rule '{}' by template '{}' failed", rUID, templateUID, e); } } }
Source:
public Matrix div(final Matrix matrix) { if (matrix.isDense()) { throw new UnsupportedOperationException(); } else { return new CSCMatrix((breeze.linalg.CSCMatrix<Double>) breezeMatrix.$div(((CSCMatrix) matrix).breezeMatrix, MatrixOps.EDIV_SS)); } }

Target:
public Matrix div(final Matrix matrix) { if (matrix.isDense()) { return new CSCMatrix((breeze.linalg.CSCMatrix<Double>) breezeMatrix.$div(((DenseMatrix) matrix).getBreezeMatrix(), MatrixOps.EDIV_MM)); } else { return new CSCMatrix((breeze.linalg.CSCMatrix<Double>) breezeMatrix.$div(((CSCMatrix) matrix).breezeMatrix, MatrixOps.EDIV_SS)); } }
Source:
private void init(final Context context) { mDropdownMultiQuestionViewStrategy = new DropdownMultiQuestionViewStrategy(context); inflate(context, R.layout.multi_question_tab_spinner_with_filter_row, this); header = (CustomTextView) findViewById(R.id.row_header_text); textViewButton = (TextView) findViewById(R.id.answer); textViewButton.setOnClickListener(new OnClickListener() { @Override public void onClick(View v) { dialog = inflate(context, R.layout.dialog_spinner_with_filter, null); builder = new AlertDialog.Builder(context); builder.setView(dialog); final AlertDialog alertDialog = builder.show(); listView = (ListView) dialog.findViewById(R.id.listView); EditText editText = (EditText) dialog.findViewById(R.id.filter); editText.addTextChangedListener(new TextWatcher() { @Override public void beforeTextChanged(CharSequence s, int start, int count, int after) { } @Override public void onTextChanged(CharSequence s, int start, int before, int count) { } @Override public void afterTextChanged(Editable s) { filter(listView, s.toString()); } }); setOptions(mOptionDBS); listView.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView<?> parent, View view, int position, long id) { alertDialog.dismiss(); selectedOptionDB = null; OptionDB optionDB = (OptionDB) parent.getItemAtPosition(position); textViewButton.setText(optionDB.getInternationalizedName().toString()); if (!optionSetFromSavedValue) { if (position > 0) { notifyAnswerChanged(optionDB); selectedOptionDB = optionDB; } } else { optionSetFromSavedValue = false; } if (BuildConfig.validationInline) { if (position > 0) { Validation.getInstance().removeInputError(header); header.setError(null); } else { Validation.getInstance().addinvalidInput(header, getContext().getString( R.string.error_empty_question)); } } } }); editText.requestFocus(); } }); }

Target:
private void init(final Context context) { mDropdownMultiQuestionViewStrategy = new DropdownMultiQuestionViewStrategy(context); inflate(context, R.layout.multi_question_tab_spinner_with_filter_row, this); header = (CustomTextView) findViewById(R.id.row_header_text); spinnerAsButton = (Spinner) findViewById(R.id.answer); if(isEnabled()){ spinnerAsButton.setOnTouchListener(new OnTouchListener(context)); } }
Source:
@NonNull public PreparedExecSql prepare() { Checks.checkNotNull(rawQuery, "Please set query object"); return new PreparedExecSql( storIOSQLiteDb, rawQuery ); }

Target:
@NonNull public PreparedExecSql prepare() { checkNotNull(rawQuery, "Please set query object"); return new PreparedExecSql( storIOSQLiteDb, rawQuery ); }
Source:
private String readablePoolsString() { StringBuffer pools = new StringBuffer("resourcePools:\n"); for(Map.Entry entry : serverConfiguration.getResourcePools().entrySet()) { pools.append(" " + entry.getKey() + ": " + entry.getValue() + "\n"); } return pools.toString(); }

Target:
private String readablePoolsString() { StringBuilder pools = new StringBuilder("resourcePools:\n"); for(Map.Entry entry : serverConfiguration.getResourcePools().entrySet()) { pools.append(" " + entry.getKey() + ": " + entry.getValue() + "\n"); } return pools.toString(); }
Source:
public static Map<String, Object> toMap(BytesReference bytes, XContentType xContentType) { try { final InputStream inputStream = getUncompressedInputStream(bytes); XContentParser parser = xContentType.xContent().createParser( NamedXContentRegistry.EMPTY, DeprecationHandler.THROW_UNSUPPORTED_OPERATION, inputStream ); return parser.map(); } catch (IOException e) { throw new UncheckedIOException(e); } }

Target:
public static Map<String, Object> toMap(BytesReference bytes, XContentType xContentType) { try (InputStream inputStream = getUncompressedInputStream(bytes)) { XContentParser parser = xContentType.xContent().createParser( NamedXContentRegistry.EMPTY, DeprecationHandler.THROW_UNSUPPORTED_OPERATION, inputStream ); return parser.map(); } catch (IOException e) { throw new UncheckedIOException(e); } }
Source:
public Future<Map<String, Object>> setupNetworks(Map networks, Map bonding, Map options, final boolean isPolicyReset) { final JsonRpcRequest request = new RequestBuilder("Host.setupNetworks").withParameter("networks", networks) .withParameter("bondings", bonding) .withParameter("options", options) .build(); final FutureCallable callable = new FutureCallable(() -> { if (isPolicyReset) { int connectionId = client.getConnectionId(); updateHeartbeatPolicy(client.getClientRetryPolicy().clone(), false); if (client.isClosed() && client.getConnectionId() == connectionId) { waitUntilCheck(client -> client.isClosed(), "Waiting on losing connection to {}", "Connection lost for {}"); } if (!client.isClosed() && client.getConnectionId() != connectionId) { waitUntilCheck(client -> !client.isClosed(), "Waiting on opening connection for {}", "Done reconnecting for {}!"); } } return new FutureMap(client, request).withResponseKey("status"); }); FutureTask<Map<String, Object>> future = new FutureTask<Map<String, Object>>(callable) { @Override public boolean isDone() { if (callable.isDone()) { if (isPolicyReset) { updateHeartbeatPolicy(client.getClientRetryPolicy(), true); } return true; } return false; } }; ThreadPoolUtil.execute(future); return future; }

Target:
public Future<Map<String, Object>> setupNetworks(Map networks, Map bonding, Map options, final boolean isPolicyReset) { final JsonRpcRequest request = new RequestBuilder("Host.setupNetworks").withParameter("networks", networks) .withParameter("bondings", bonding) .withParameter("options", options) .build(); final FutureCallable callable = new FutureCallable(() -> { if (isPolicyReset) { int connectionId = client.getConnectionId(); updateHeartbeatPolicy(client.getClientRetryPolicy().clone(), false); if (client.isClosed() && client.getConnectionId() == connectionId) { waitUntilCheck(client -> client.isClosed(), "Waiting on losing connection to {}", "Connection lost for {}"); } } return new FutureMap(client, request).withResponseKey("status"); }); FutureTask<Map<String, Object>> future = new FutureTask<Map<String, Object>>(callable) { @Override public boolean isDone() { if (callable.isDone()) { if (isPolicyReset) { updateHeartbeatPolicy(client.getClientRetryPolicy(), true); } return true; } return false; } }; ThreadPoolUtil.execute(future); return future; }
Source:
public CacheStore(CachingTier<K, V> cachingTier, AuthoritativeTier<K, V> authoritativeTier) { this.cachingTierRef = new AtomicReference<CachingTier<K, V>>(cachingTier); this.authoritativeTier = authoritativeTier; this.realCachingTier = cachingTier; this.noopCachingTier = new NoopCachingTier<K, V>(authoritativeTier); cachingTier.setInvalidationListener(new CachingTier.InvalidationListener<K, V>() { @Override public void onInvalidation(K key, ValueHolder<V> valueHolder) { CacheStore.this.authoritativeTier.flush(key, valueHolder); } }); StatisticsManager.associate(cachingTier).withParent(this); StatisticsManager.associate(authoritativeTier).withParent(this); cacheStoreStatsSettings = new CacheStoreStatsSettings(cachingTier, authoritativeTier); StatisticsManager.associate(cacheStoreStatsSettings).withParent(this); }

Target:
public CacheStore(CachingTier<K, V> cachingTier, AuthoritativeTier<K, V> authoritativeTier) { this.cachingTierRef = new AtomicReference<CachingTier<K, V>>(cachingTier); this.authoritativeTier = authoritativeTier; this.realCachingTier = cachingTier; this.noopCachingTier = new NoopCachingTier<K, V>(authoritativeTier); this.realCachingTier.setInvalidationListener(new CachingTier.InvalidationListener<K, V>() { @Override public void onInvalidation(K key, ValueHolder<V> valueHolder) { CacheStore.this.authoritativeTier.flush(key, valueHolder); } }); StatisticsManager.associate(cachingTier).withParent(this); StatisticsManager.associate(authoritativeTier).withParent(this); cacheStoreStatsSettings = new CacheStoreStatsSettings(cachingTier, authoritativeTier); StatisticsManager.associate(cacheStoreStatsSettings).withParent(this); }
Source:
public int getTemporalID(byte[] buf, int off, int len) { REDBlock redBlock = getPayloadBlock(buf, off, len); if (redBlock == null || redBlock.getLength() == 0) { return -1; } final byte vp8PT = getDynamicRTPPayloadType(Constants.VP8); if (redBlock.getPayloadType() == vp8PT) { return org.jitsi.impl .neomedia.codec.video.vp8.DePacketizer.VP8PayloadDescriptor .getTemporalLayerIndex( buf, redBlock.getOffset(), redBlock.getLength()); } else { return -1; } }

Target:
public int getTemporalID(byte[] buf, int off, int len) { REDBlock redBlock = getPayloadBlock(buf, off, len); if (redBlock == null || redBlock.getLength() == 0) { return -1; } final byte vp8PT = getDynamicRTPPayloadType(Constants.VP8); if (redBlock.getPayloadType() == vp8PT) { return org.jitsi.impl .neomedia.codec.video.vp8.DePacketizer.VP8PayloadDescriptor .getTemporalLayerIndex( redBlock.getBuffer(), redBlock.getOffset(), redBlock.getLength()); } else { return -1; } }
Source:
private static void performWarmup() { connectionStartupExecutor.execute(new Runnable() { @Override public void run() { try { Class.forName("org.eclipse.jetty.alpn.ALPN"); } catch (ClassNotFoundException e1) { LOG.warn( "Could not asynchronously the ssl context, since ALPN is not installed."); return; } try { @SuppressWarnings("unused") SslContext warmup = createSslContext(); } catch (SSLException e) { LOG.warn("Could not asynchronously the ssl context", e); } } }); connectionStartupExecutor.execute(new Runnable() { @Override public void run() { try { @SuppressWarnings("unused") HttpTransport warmup = CredentialFactory.getHttpTransport(); } catch (IOException | GeneralSecurityException e) { LOG.warn("Could not asynchronously initialze httpTransport", e); } } }); for (final String host : Arrays.asList(BigtableOptions.BIGTABLE_DATA_HOST_DEFAULT, BigtableOptions.BIGTABLE_CLUSTER_ADMIN_HOST_DEFAULT, BigtableOptions.BIGTABLE_CLUSTER_ADMIN_HOST_DEFAULT)) { connectionStartupExecutor.execute(new Runnable() { @Override public void run() { try { @SuppressWarnings("unused") InetAddress warmup = InetAddress.getByName(host); } catch (UnknownHostException e) { LOG.warn("Could not asynchronously initialze host: " + host, e); } } }); } connectionStartupExecutor.shutdown(); }

Target:
private static void performWarmup() { connectionStartupExecutor.execute(new Runnable() { @Override public void run() { try { Class.forName("org.eclipse.jetty.alpn.ALPN"); } catch (ClassNotFoundException e1) { LOG.warn( "Could not asynchronously create the ssl context, since ALPN is not installed."); return; } try { createSslContext(); } catch (SSLException e) { LOG.warn("Could not asynchronously create the ssl context", e); } } }); connectionStartupExecutor.execute(new Runnable() { @Override public void run() { try { CredentialFactory.getHttpTransport(); } catch (IOException | GeneralSecurityException e) { LOG.warn("Could not asynchronously initialze httpTransport", e); } } }); for (final String host : Arrays.asList(BigtableOptions.BIGTABLE_DATA_HOST_DEFAULT, BigtableOptions.BIGTABLE_CLUSTER_ADMIN_HOST_DEFAULT, BigtableOptions.BIGTABLE_CLUSTER_ADMIN_HOST_DEFAULT)) { connectionStartupExecutor.execute(new Runnable() { @Override public void run() { try { InetAddress.getByName(host); } catch (UnknownHostException e) { LOG.warn("Could not asynchronously initialze host: " + host, e); } } }); } connectionStartupExecutor.shutdown(); }
Source:
public String getOffsetForPosition(final long offset) { return StringUtils.leftPad(String.valueOf(offset), VERSION_ZERO_MIN_OFFSET_LENGTH, '0'); }

Target:
public String getOffsetForPosition(final long offset) { return KafkaCursor.toNakadiOffset(offset); }
Source:
String formatStepText(String keyword, String stepText, Format textFormat, Format argFormat, List<Argument> arguments) { int textStart = 0; StringBuilder result = new StringBuilder(textFormat.text(keyword)); for (Argument argument : arguments) { if (argument.getOffset() != null) { int textEnd = argument.getOffset(); if (textStart <= textEnd ) { String text = stepText.substring(textStart, textEnd); result.append(textFormat.text(text)); } } if (argument.getVal() != null) { result.append(argFormat.text(argument.getVal())); textStart = argument.getOffset() + argument.getVal().length(); } } if (textStart != stepText.length() && textStart >= 0) { String text = stepText.substring(textStart, stepText.length()); result.append(textFormat.text(text)); } return result.toString(); }

Target:
String formatStepText(String keyword, String stepText, Format textFormat, Format argFormat, List<Argument> arguments) { int beginIndex = 0; StringBuilder result = new StringBuilder(textFormat.text(keyword)); for (Argument argument : arguments) { if (argument.getOffset() != null) { int argumentOffset = argument.getOffset(); if (argumentOffset < beginIndex ) { continue; } String text = stepText.substring(beginIndex, argumentOffset); result.append(textFormat.text(text)); } if (argument.getVal() != null) { result.append(argFormat.text(argument.getVal())); int argumentEnd = argument.getOffset() + argument.getVal().length(); beginIndex = argumentEnd; } } if (beginIndex != stepText.length() && beginIndex >= 0) { String text = stepText.substring(beginIndex, stepText.length()); result.append(textFormat.text(text)); } return result.toString(); }
Source:
public void allowsOverrideDefaultHeader() throws IOException { final String expected = String.format("%s: Non-Default-Value", DEF_HEADER); MatcherAssert.assertThat( new RqPrint( new RqWithDefaultHeader( new RqWithHeader( new RqFake(), DEF_HEADER, "Non-Default-Value" ), DEF_HEADER, DEF_HEADER_VAL ) ).print(), Matchers.startsWith( Joiner.on("\r\n").join( "GET /", "Host: www.example.com", expected ) ) ); }

Target:
public void allowsOverrideDefaultHeader() throws IOException { final String req = "POST /"; final String header = "X-Default-Header2"; MatcherAssert.assertThat( new RqPrint( new RqWithDefaultHeader( new RqWithHeader( new RqFake(Collections.singletonList(req), "body2"), header, "Non-Default-Value2" ), header, "X-Default-Value" ) ).print(), Matchers.startsWith( Joiner.on(RqWithDefaultHeaderTest.CRLF).join( req, "X-Default-Header2: Non-Default-Value" ) ) ); }
Source:
public int hashCode() { return Objects.hash(position, scores); }

Target:
public int hashCode() { int result = Objects.hash(position); result = 31 * result + Arrays.hashCode(scores); return result; }
Source:
public void testOnLoadClassWithClassAndNullHandler() { when(view.getNewClassName()).thenReturn("NewClassName"); presenter.addLoadClassesHandler(null); assertNull(presenter.getClasses()); presenter.onLoadClass(); assertNotNull(presenter.getClasses()); assertEquals(1, presenter.getClasses().size()); assertEquals("NewClassName", presenter.getClasses().get(0).getClassName()); verify(view, times(1)).redraw(); }

Target:
public void testOnLoadClassWithClassAndNullHandler() { when(view.getNewClassName()).thenReturn("NewClassName"); presenter.addLoadClassesHandler(null); assertThat(presenter.getClasses()).isNull(); presenter.onLoadClass(); assertThat(presenter.getClasses()).hasSize(1); assertThat(presenter.getClasses().get(0).getClassName()).isEqualTo("NewClassName"); verify(view, times(1)).redraw(); }
Source:
public void testCloseNotifyWaiters() throws Exception { final int numWorkers = 2; BufferPool pool = new BufferPool(1, 1, metrics, Time.SYSTEM, metricGroup); ByteBuffer buffer = pool.allocate(1, Long.MAX_VALUE); CountDownLatch ready = new CountDownLatch(numWorkers); CountDownLatch completed = new CountDownLatch(numWorkers); ExecutorService executor = Executors.newFixedThreadPool(numWorkers); Callable<Void> work = new Callable<Void>() { public Void call() throws Exception { ready.countDown(); assertThrows(KafkaException.class, () -> pool.allocate(1, Long.MAX_VALUE)); completed.countDown(); return null; } }; for (int i = 0; i < numWorkers; ++i) { executor.submit(work); } ready.await(15, TimeUnit.SECONDS); Thread.sleep(100); assertEquals("Allocation shouldn't have happened yet, waiting on memory", numWorkers, completed.getCount()); pool.close(); completed.await(15, TimeUnit.SECONDS); pool.deallocate(buffer); }

Target:
public void testCloseNotifyWaiters() throws Exception { final int numWorkers = 2; BufferPool pool = new BufferPool(1, 1, metrics, Time.SYSTEM, metricGroup); ByteBuffer buffer = pool.allocate(1, Long.MAX_VALUE); ExecutorService executor = Executors.newFixedThreadPool(numWorkers); Callable<Void> work = new Callable<Void>() { public Void call() throws Exception { assertThrows(KafkaException.class, () -> pool.allocate(1, Long.MAX_VALUE)); return null; } }; for (int i = 0; i < numWorkers; ++i) { executor.submit(work); } TestUtils.waitForCondition(() -> pool.queued() == numWorkers, "Awaiting " + numWorkers + " workers to be blocked on allocation"); pool.close(); TestUtils.waitForCondition(() -> pool.queued() == 0, "Awaiting " + numWorkers + " workers to be interrupted from allocation"); pool.deallocate(buffer); }
Source:
public void testParseMetadataFromToolWithTagNameAndReferenceMismatch() { ContainersApi toolsApi = setupWebService(); DockstoreTool tool = getContainer(); tool.setDefaultVersion("1.0"); DockstoreTool toolTest = toolsApi.registerManual(tool); toolsApi.refresh(toolTest.getId()); DockstoreTool refreshedTool = toolsApi.getContainer(toolTest.getId()); assertTrue("Author should be set, even if tag name and tag reference are mismatched.", refreshedTool.getAuthor() != null); }

Target:
public void testParseMetadataFromToolWithTagNameAndReferenceMismatch() { ContainersApi toolsApi = setupWebService(); DockstoreTool tool = getContainer(); tool.setDefaultVersion("1.0"); DockstoreTool toolTest = toolsApi.registerManual(tool); toolsApi.refresh(toolTest.getId()); DockstoreTool refreshedTool = toolsApi.getContainer(toolTest.getId()); assertNotNull("Author should be set, even if tag name and tag reference are mismatched.", refreshedTool.getAuthor()); }
Source:
private void updateConfigs() { Gson gson = new Gson(); String jsonText = gson.toJson(configs, Configs.class); ByteArrayResource resource = new ByteArrayResource(jsonText.getBytes()); settingsFacade.saveRawConfig(OPEN_MRS_CONFIGS_FILE_NAME, resource); Map<String, Object> parameters = new HashMap<>(); eventRelay.sendEventMessage(new MotechEvent(Constants.CONFIG_CHANGE_EVENT, parameters)); }

Target:
private void updateConfigs() { Gson gson = new Gson(); String jsonText = gson.toJson(configs, Configs.class); ByteArrayResource resource = new ByteArrayResource(jsonText.getBytes()); settingsFacade.saveRawConfig(OPEN_MRS_CONFIGS_FILE_NAME, resource); eventRelay.sendEventMessage(new MotechEvent(Constants.CONFIG_CHANGE_EVENT)); }
Source:
public void setContentType(String type) throws RestServiceException { HttpHeaders headers = changeResponseHeader(HttpHeaders.Names.CONTENT_TYPE, type); if (!type.equals(headers.get(HttpHeaders.Names.CONTENT_TYPE))) { nettyMetrics.responseMetadataBuildingFailure.inc(); throw new RestServiceException("Unable to set content-type to " + type, RestServiceErrorCode.ResponseMetadataBuildingFailure); } logger.trace("Set content type to for response on channel {}", type, ctx.channel()); }

Target:
public void setContentType(String type) throws RestServiceException { HttpHeaders headers = setResponseHeader(HttpHeaders.Names.CONTENT_TYPE, type); if (!type.equals(headers.get(HttpHeaders.Names.CONTENT_TYPE))) { nettyMetrics.responseMetadataBuildingFailure.inc(); throw new RestServiceException("Unable to set content-type to " + type, RestServiceErrorCode.ResponseMetadataBuildingFailure); } logger.trace("Set content type to for response on channel {}", type, ctx.channel()); }
Source:
public void setPrimaryItem(@NonNull ViewGroup container, int position, @NonNull Object object) { Fragment fragment = (Fragment)object; if (fragment != mCurrentPrimaryItem) { if (mCurrentPrimaryItem != null) { mCurrentPrimaryItem.setMenuVisibility(false); if (mResumeOnlyCurrentFragment) { if (mCurTransaction == null) { mCurTransaction = mFragmentManager.beginTransaction(); } mCurTransaction.setMaxLifecycle(mCurrentPrimaryItem, Lifecycle.State.STARTED); } else { fragment.setUserVisibleHint(false); } } fragment.setMenuVisibility(true); if (mCurTransaction != null && mResumeOnlyCurrentFragment) { mCurTransaction.setMaxLifecycle(fragment, Lifecycle.State.RESUMED); } else { fragment.setUserVisibleHint(true); } mCurrentPrimaryItem = fragment; } }

Target:
public void setPrimaryItem(@NonNull ViewGroup container, int position, @NonNull Object object) { Fragment fragment = (Fragment)object; if (fragment != mCurrentPrimaryItem) { if (mCurrentPrimaryItem != null) { mCurrentPrimaryItem.setMenuVisibility(false); if (mResumeOnlyCurrentFragment) { if (mCurTransaction == null) { mCurTransaction = mFragmentManager.beginTransaction(); } mCurTransaction.setMaxLifecycle(mCurrentPrimaryItem, Lifecycle.State.STARTED); } else { fragment.setUserVisibleHint(false); } } fragment.setMenuVisibility(true); if (mResumeOnlyCurrentFragment) { if (mCurTransaction == null) { mCurTransaction = mFragmentManager.beginTransaction(); } mCurTransaction.setMaxLifecycle(fragment, Lifecycle.State.RESUMED); } else { fragment.setUserVisibleHint(true); } mCurrentPrimaryItem = fragment; } }
Source:
private <P extends Properties> void resolvePropertiesList(ArrayNode objectNode, PropertiesList<P> properties) throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException, IOException { List<P> subProperties = new ArrayList<>(); for (int i = 0; i < objectNode.size(); i++) { P nestedProps = properties.getNestedPropertiesFactory().createAndInit("row" + i); subProperties.add(resolveJson((ObjectNode) objectNode.get(i), nestedProps)); } properties.setRows(subProperties); }

Target:
private <P extends Properties> void resolvePropertiesList(ArrayNode objectNode, PropertiesList<P> properties) throws ClassNotFoundException, NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException, IOException { List<P> subProperties = new ArrayList<>(); for (int i = 0; i < objectNode.size(); i++) { P nestedProps = properties.getNestedPropertiesFactory().createAndInit(PropertiesList.ROW_NAME_PREFIX + i); subProperties.add(resolveJson((ObjectNode) objectNode.get(i), nestedProps)); } properties.setRows(subProperties); }
Source:
public static double getImagingSetupSec(Config conf) { if (conf.containsItem(GUIDE_WITH_OIWFS_KEY)) { String guideWithOIWFS = conf.getItemValue(GUIDE_WITH_OIWFS_KEY).toString(); if (guideWithOIWFS.equals("guide")) { return IMAGING_SETUP_TIME_OIWFS; } } return IMAGING_SETUP_TIME_PWFS2; }

Target:
public static double getImagingSetupSec(Config conf) { return ImOption.apply(conf.getItemValue(GUIDE_WITH_OIWFS_KEY)) .exists(g -> ((GuideOption) g).isActive()) ? IMAGING_SETUP_TIME_OIWFS : IMAGING_SETUP_TIME_PWFS2; }
Source:
public void configurePhoneNumber() { PhoneNumber phoneNumber = new PhoneNumber("PHONENUMBER_TO_CONFIGURE"); PstnConfiguration pstnConfiguration = new PstnConfiguration(); pstnConfiguration.setApplicationId("APPLICATION_ID"); pstnConfiguration.setAzurePstnTargetId("AZURE_PSTN_TARGET_ID"); pstnConfiguration.setCallbackUrl("CALLBACK_URL"); try { PhoneNumberClient phoneNumberClient = createPhoneNumberClient(); phoneNumberClient.configureNumber(phoneNumber, pstnConfiguration); } catch (Exception e) { e.printStackTrace(); } }

Target:
public void configurePhoneNumber() { PhoneNumber phoneNumber = new PhoneNumber("PHONENUMBER_TO_CONFIGURE"); PstnConfiguration pstnConfiguration = new PstnConfiguration(); pstnConfiguration.setApplicationId("APPLICATION_ID"); pstnConfiguration.setCallbackUrl("CALLBACK_URL"); try { PhoneNumberClient phoneNumberClient = createPhoneNumberClient(); phoneNumberClient.configureNumber(phoneNumber, pstnConfiguration); } catch (Exception e) { e.printStackTrace(); } }
Source:
public ThingImpl(ThingUID thingUID) throws IllegalArgumentException { this.uid = thingUID; this.thingTypeUID = new ThingTypeUID(thingUID.getBindingId(), thingUID.getThingTypeId()); this.channels = new ArrayList<>(0); }

Target:
public ThingImpl(ThingUID thingUID) throws IllegalArgumentException { if ("".equals(thingUID.getThingTypeId())) { throw new IllegalArgumentException( "The given ThingUID does not specify a ThingType. You might want to use ThingImpl(ThingTypeUID, ThingUID) instead."); } this.uid = thingUID; this.thingTypeUID = new ThingTypeUID(thingUID.getBindingId(), thingUID.getThingTypeId()); this.channels = new ArrayList<>(0); }
Source:
private List<String> getCapabilitiesFromServer() { if (config.isJms()) { if (config.isJmsTransactional()) { kieServerInfo = getServerInfoInTransaction(); } else { ResponseHandler responseHandler = getResponseHandler(); setResponseHandler(new RequestReplyResponseHandler()); kieServerInfo = getServerInfo().getResult(); setResponseHandler(responseHandler); } } else { kieServerInfo = getServerInfo().getResult(); } logger.debug("KieServicesClient connected to: version {}", kieServerInfo.getServerId(), kieServerInfo.getVersion()); List<String> capabilities = kieServerInfo.getCapabilities(); logger.debug("Supported capabilities by the server: {}", capabilities); return capabilities; }

Target:
private List<String> getCapabilitiesFromServer() { ResponseHandler responseHandler = getResponseHandler(); if (config.isJms() && !(responseHandler instanceof RequestReplyResponseHandler)) { setResponseHandler(new RequestReplyResponseHandler()); kieServerInfo = getServerInfo().getResult(); setResponseHandler(responseHandler); } else { kieServerInfo = getServerInfo().getResult(); } logger.debug("KieServicesClient connected to: version {}", kieServerInfo.getServerId(), kieServerInfo.getVersion()); List<String> capabilities = kieServerInfo.getCapabilities(); logger.debug("Supported capabilities by the server: {}", capabilities); return capabilities; }
Source:
public SizeOfEngineProvider create(ServiceCreationConfiguration<SizeOfEngineProvider> configuration) { long maxDepth = Long.MAX_VALUE; long maxSize = Long.MAX_VALUE; if(configuration != null) { DefaultSizeOfEngineProviderConfiguration sizeOfEngineConfiguration = (DefaultSizeOfEngineProviderConfiguration)configuration; maxDepth = sizeOfEngineConfiguration.getMaxDepth(); maxSize = sizeOfEngineConfiguration.getMaxSize(); } return new DefaultSizeOfEngineProvider(maxDepth, maxSize); }

Target:
public SizeOfEngineProvider create(ServiceCreationConfiguration<SizeOfEngineProvider> configuration) { long maxDepth = 1000; long maxSize = Long.MAX_VALUE; if(configuration != null) { DefaultSizeOfEngineProviderConfiguration sizeOfEngineConfiguration = (DefaultSizeOfEngineProviderConfiguration)configuration; maxDepth = sizeOfEngineConfiguration.getMaxDepth(); maxSize = sizeOfEngineConfiguration.getMaxSize(); } return new DefaultSizeOfEngineProvider(maxDepth, maxSize); }
Source:
static void setInputPortType(JsonObject op, int index, String schema) { JsonArray inputs = op.get("inputs").getAsJsonArray(); JsonObject input = inputs.get(index).getAsJsonObject(); input.remove("type"); input.addProperty("type", schema); }

Target:
static void setInputPortType(JsonObject op, int index, String schema) { JsonArray inputs = op.get("inputs").getAsJsonArray(); JsonObject input = inputs.get(index).getAsJsonObject(); input.addProperty("type", schema); }
Source:
public BufferedHttpResponse(HttpResponse innerHttpResponse) { super(innerHttpResponse.getRequest()); this.innerHttpResponse = innerHttpResponse; this.cachedBody = FluxUtil.collectBytesInByteBufferStream(innerHttpResponse.getBody()) .map(bytes -> ByteBuffer.wrap(bytes)) .flux() .cache(); }

Target:
public BufferedHttpResponse(HttpResponse innerHttpResponse) { super(innerHttpResponse.getRequest()); this.innerHttpResponse = innerHttpResponse; this.cachedBody = FluxUtil.collectBytesInByteBufferStream(innerHttpResponse.getBody()) .map(ByteBuffer::wrap) .flux() .cache(); }
Source:
protected String formatCommand(Command command, String format, String... keys) { return super.formatCommand(command, format, this, keys); }

Target:
protected String formatCommand(Command command, String format, String... keys) { return formatCommand(command, format, this, keys); }
Source:
public String getProxyTicketIdFor(final String proxyGrantingTicketId, final String targetService) { try { final String url = constructUrl(proxyGrantingTicketId, targetService); final String response = CommonUtils.getResponseFromServer(new URL(url), this.urlConnectionFactory, this.encoding); final String error = XmlUtils.getTextForElement(response, "proxyFailure"); if (CommonUtils.isNotEmpty(error)) { logger.debug(error); return null; } return XmlUtils.getTextForElement(response, "proxyTicket"); } catch (final MalformedURLException ex) { throw new RuntimeException(ex); } }

Target:
public String getProxyTicketIdFor(final String proxyGrantingTicketId, final String targetService) { CommonUtils.assertNotNull(proxyGrantingTicketId, "proxyGrantingTicketId cannot be null."); CommonUtils.assertNotNull(targetService, "targetService cannot be null."); final URL url = constructUrl(proxyGrantingTicketId, targetService); final String response = CommonUtils.getResponseFromServer(url, this.urlConnectionFactory, this.encoding); final String error = XmlUtils.getTextForElement(response, "proxyFailure"); if (CommonUtils.isNotEmpty(error)) { logger.debug(error); return null; } return XmlUtils.getTextForElement(response, "proxyTicket"); }
Source:
public void waitForFinish() { try { shutdownLatch.await(); } catch (Throwable t) { log.error("Wait is interrupted by exception", t); throw new SamzaException(t); } }

Target:
public void waitForFinish() { try { shutdownLatch.await(); } catch (Exception e) { log.error("Wait is interrupted by exception", e); throw new SamzaException(e); } }
Source:
private void updateFilteringWarning() { final SharedPreferences p = SharedPrefsHelper.getSharedPrefs(MachineActivity.this); boolean filtering = p.getBoolean("filter", false); if(filterWarningBar == null) { filterWarningBar = Snackbar.make(mMainContent, "Only showing available machines.", Snackbar.LENGTH_INDEFINITE) .setAction("Show all", new View.OnClickListener() { @Override public void onClick(View v) { setFilter(false); } }).setCallback(new Snackbar.Callback() { @Override public void onDismissed(Snackbar snackbar, int event) { filterWarningBar = null; } @Override public void onShown(Snackbar snackbar) { } }); } if(filtering) { filterWarningBar.show(); } else { filterWarningBar.dismiss(); } }

Target:
private void updateFilteringWarning() { final SharedPreferences p = SharedPrefsHelper.getSharedPrefs(MachineActivity.this); boolean filtering = p.getBoolean("filter", false); if(filterWarningBar == null) { filterWarningBar = Snackbar.make(mMainContent, "Only showing available machines.", Snackbar.LENGTH_INDEFINITE) .setAction("Show all", new View.OnClickListener() { @Override public void onClick(View v) { setFilter(false); } }) .addCallback(new BaseTransientBottomBar.BaseCallback<Snackbar>() { @Override public void onDismissed(Snackbar transientBottomBar, int event) { super.onDismissed(transientBottomBar, event); filterWarningBar = null; } }); } if(filtering) { filterWarningBar.show(); } else { filterWarningBar.dismiss(); } }
Source:
public void setControlling(boolean isControlling) { this.logger.info(() -> "Changing agent " + this.toString() + " role from controlling = " + this.isControlling + " to controlling = " + isControlling); this.isControlling = isControlling; for (IceMediaStream stream : getStreams()) { CheckList list = stream.getCheckList(); if (list != null) { list.recomputePairPriorities(); } } }

Target:
public void setControlling(boolean isControlling) { if (this.isControlling != isControlling) { this.logger.info(() -> "Changing agent " + this.toString() + " role from controlling = " + this.isControlling + " to controlling = " + isControlling); } this.isControlling = isControlling; for (IceMediaStream stream : getStreams()) { CheckList list = stream.getCheckList(); if (list != null) { list.recomputePairPriorities(); } } }
Source:
public static LogicalUnit map(LUNs entity, LogicalUnit template) { LogicalUnit model = template != null ? template : new LogicalUnit(); model.setId(entity.getLUN_id()); if (entity.getVendorId()!=null && !entity.getVendorId().isEmpty()) { model.setVendorId(entity.getVendorId()); } if (entity.getProductId()!=null && !entity.getProductId().isEmpty()) { model.setProductId(entity.getProductId()); } if (entity.getSerial()!=null && !entity.getSerial().isEmpty()) { model.setSerial(entity.getSerial()); } if (entity.getLunMapping()!=null) { model.setLunMapping(entity.getLunMapping()); } if (entity.getvolume_group_id() != null && !entity.getvolume_group_id().isEmpty()) { model.setVolumeGroupId(entity.getvolume_group_id()); } if (entity.getStorageDomainId() != null) { model.setStorageDomainId(entity.getStorageDomainId().toString()); } if (entity.getDiskId() != null) { model.setDiskId(entity.getDiskId().toString()); } if (entity.getStatus() != null) { model.setStatus(entity.getStatus().name()); } model.setSize(SizeConverter.gigasToBytes(entity.getDeviceSize())); model.setPaths(entity.getPathCount()); model.setPartitioned(entity.isPartitioned()); return model; }

Target:
public static LogicalUnit map(LUNs entity, LogicalUnit template) { LogicalUnit model = template != null ? template : new LogicalUnit(); model.setId(entity.getLUN_id()); if (entity.getVendorId()!=null && !entity.getVendorId().isEmpty()) { model.setVendorId(entity.getVendorId()); } if (entity.getProductId()!=null && !entity.getProductId().isEmpty()) { model.setProductId(entity.getProductId()); } if (entity.getSerial()!=null && !entity.getSerial().isEmpty()) { model.setSerial(entity.getSerial()); } if (entity.getLunMapping()!=null) { model.setLunMapping(entity.getLunMapping()); } if (entity.getvolume_group_id() != null && !entity.getvolume_group_id().isEmpty()) { model.setVolumeGroupId(entity.getvolume_group_id()); } if (entity.getStorageDomainId() != null) { model.setStorageDomainId(entity.getStorageDomainId().toString()); } if (entity.getDiskId() != null) { model.setDiskId(entity.getDiskId().toString()); } if (entity.getStatus() != null) { model.setStatus(map(entity.getStatus(), null).value()); } model.setSize(SizeConverter.gigasToBytes(entity.getDeviceSize())); model.setPaths(entity.getPathCount()); return model; }
Source:
public void progress() { if (!this.bPlayer.canBendIgnoreCooldowns(this)) { this.remove(); return; } if (System.currentTimeMillis() > this.getStartTime() + this.chargeTime && !this.charged) { this.charged = true; } if (!this.player.isSneaking()) { if (this.charged) { this.sphereBurst(); } else { this.remove(); } } else if (this.charged) { final Location location = this.player.getEyeLocation().clone(); location.add(location.getDirection().clone()); playFirebendingParticles(location, 1, .01, .01, .01); } }

Target:
public void progress() { if (!this.bPlayer.canBendIgnoreCooldowns(this)) { this.remove(); return; } if (System.currentTimeMillis() > this.getStartTime() + this.chargeTime && !this.charged) { this.charged = true; } if (!this.player.isSneaking()) { if (this.charged) { this.sphereBurst(); } else { this.remove(); } } else if (this.charged) { final Location location = this.player.getEyeLocation(); location.add(location.getDirection()); playFirebendingParticles(location, 1, .01, .01, .01); } }
Source:
private void cleanUpSuperfluousContainers(DockerClient client, Map<String, Node> nodeMap, ContainerNodeNameMap csm, DockerCloud dc, Instant snapshotInstant) { Collection<Container> allContainers = csm.getAllContainers(); for (Container container : allContainers) { String nodeName = csm.getNodeName(container.getId()); Node node = nodeMap.get(nodeName); if (node != null) { continue; } if (isStillTooYoung(container.getCreated(), snapshotInstant)) { continue; } this.checkForTimeout(snapshotInstant); LOGGER.info("Container {}, which is reported to be assigned to node {}, " + "is no longer associated (node might be gone already?). " + "The container's last status is {}; it was created on {}", container.getId(), nodeName, container.getStatus(), container.getCreated()); try { terminateContainer(dc, client, container); } catch (Exception e) { LOGGER.warn("Graceful termination of Container failed; terminating directly via API - this may cause remnants to be left behind", container.getId(), e); } } }

Target:
private void cleanUpSuperfluousContainers(DockerClient client, Map<String, Node> nodeMap, ContainerNodeNameMap csm, DockerCloud dc, Instant snapshotInstant) { Collection<Container> allContainers = csm.getAllContainers(); for (Container container : allContainers) { String nodeName = csm.getNodeName(container.getId()); Node node = nodeMap.get(nodeName); if (node != null) { continue; } if (isStillTooYoung(container.getCreated(), snapshotInstant)) { continue; } checkForTimeout(snapshotInstant); LOGGER.info("Container {}, which is reported to be assigned to node {}, " + "is no longer associated (node might be gone already?). " + "The container's last status is {}; it was created on {}", container.getId(), nodeName, container.getStatus(), container.getCreated()); try { terminateContainer(dc, client, container); } catch (Exception e) { LOGGER.warn("Graceful termination of Container failed; terminating directly via API - this may cause remnants to be left behind", container.getId(), e); } } }
Source:
public BPMNShapeFactory(final BasicShapesFactory basicShapesFactory, final SVGShapeFactory svgShapeFactory, final DelegateShapeFactory<BPMNDefinition, Shape> delegateShapeFactory, final ManagedInstance<WorkItemDefinitionRegistry> workItemDefinitionRegistry, final DefinitionUtils definitionUtils, final StunnerPreferencesRegistries preferencesRegistries) { this.basicShapesFactory = basicShapesFactory; this.svgShapeFactory = svgShapeFactory; this.delegateShapeFactory = delegateShapeFactory; this.workItemDefinitionRegistry = () -> workItemDefinitionRegistry.get(); this.definitionUtils = definitionUtils; this.preferencesRegistries = preferencesRegistries; }

Target:
public BPMNShapeFactory(final BasicShapesFactory basicShapesFactory, final SVGShapeFactory svgShapeFactory, final DelegateShapeFactory<BPMNDefinition, Shape> delegateShapeFactory, final ManagedInstance<WorkItemDefinitionRegistry> workItemDefinitionRegistry, final DefinitionUtils definitionUtils, final StunnerPreferencesRegistries preferencesRegistries) { this.basicShapesFactory = basicShapesFactory; this.svgShapeFactory = svgShapeFactory; this.delegateShapeFactory = delegateShapeFactory; this.workItemDefinitionRegistry = workItemDefinitionRegistry::get; this.definitionUtils = definitionUtils; this.preferencesRegistries = preferencesRegistries; }
Source:
MultiRange(List<Filter> filters, boolean nullAllowed) { super(nullAllowed); this.filters = filters.toArray(new Filter[0]); if (filters.get(0) instanceof BigintRange) { this.longLowerBounds = filters.stream() .mapToLong(filter -> ((BigintRange) filter).getLower()) .toArray(); long[] upperBounds = filters.stream() .mapToLong(filter -> ((BigintRange) filter).getUpper()) .toArray(); for (int i = 1; i < longLowerBounds.length; i++) { checkArgument(longLowerBounds[i] >= upperBounds[i - 1], "bigint ranges must not overlap"); } } else { this.longLowerBounds = null; } }

Target:
MultiRange(List<Filter> filters, boolean nullAllowed) { super(nullAllowed); requireNonNull(filters, "filters is null"); checkArgument(filters.size() > 0, "filters is empty"); this.filters = filters.toArray(new Filter[0]); if (filters.get(0) instanceof BigintRange) { this.longLowerBounds = filters.stream() .mapToLong(filter -> ((BigintRange) filter).getLower()) .toArray(); long[] upperBounds = filters.stream() .mapToLong(filter -> ((BigintRange) filter).getUpper()) .toArray(); for (int i = 1; i < longLowerBounds.length; i++) { checkArgument(longLowerBounds[i] >= upperBounds[i - 1], "bigint ranges must not overlap"); } } else { this.longLowerBounds = null; } }
Source:
public void clickCancel() { String label = PropUtils.get("modals.window.cancel.label"); clickButton(label); }

Target:
protected void clickCancel() { String label = PropUtils.get("modals.window.cancel.label"); clickButton(label); }
Source:
BaseVerification(Algorithm algorithm) throws IllegalArgumentException { if (algorithm == null) { throw new IllegalArgumentException("The Algorithm cannot be null."); } this.algorithm = algorithm; this.claims = new HashMap<>(48); this.defaultLeeway = 0; }

Target:
BaseVerification(Algorithm algorithm) throws IllegalArgumentException { if (algorithm == null) { throw new IllegalArgumentException("The Algorithm cannot be null."); } this.algorithm = algorithm; this.claims = new HashMap<>(); this.defaultLeeway = 0; }
Source:
static void setProxyFromEnv() { String envHttpProxy = System.getenv("HTTP_PROXY"); if (envHttpProxy != null && !envHttpProxy.isEmpty()) { try { URL httpProxyUrl = new URL(envHttpProxy); String httpProxyHost = System.getProperty("http.proxyHost"); if ((httpProxyHost == null || httpProxyHost.isEmpty())) { System.setProperty("http.proxyHost", httpProxyUrl.getHost()); System.setProperty("http.proxyPort", Integer.toString( httpProxyUrl.getPort() == -1 ? httpProxyUrl.getDefaultPort() : httpProxyUrl.getPort())); } } catch (MalformedURLException e) { System.err.println("invalid http proxy configuration: " + e.getMessage()); System.exit(1); } } String envHttpsProxy = System.getenv("HTTPS_PROXY"); if (envHttpsProxy != null && !envHttpsProxy.isEmpty()) { try { URL httpsProxyUrl = new URL(envHttpsProxy); String httpsProxyHost = System.getProperty("https.proxyHost"); if ((httpsProxyHost == null || httpsProxyHost.isEmpty())) { System.setProperty("https.proxyHost", httpsProxyUrl.getHost()); System.setProperty("https.proxyPort", Integer.toString( httpsProxyUrl.getPort() == -1 ? httpsProxyUrl.getDefaultPort() : httpsProxyUrl.getPort())); } } catch (MalformedURLException e) { System.err.println("invalid https proxy configuration: " + e.getMessage()); System.exit(1); } } }

Target:
static void setProxyFromEnv() { setProtocolProxyFromEnv("http", System.getenv("HTTP_PROXY")); setProtocolProxyFromEnv("https", System.getenv("HTTPS_PROXY")); }
Source:
public void testServiceTopologyInitialized() throws Exception { IgniteEx loc = startGrids(NODES_CNT); IgniteEx rmt = grid(NODES_CNT - 1); fullMsgUnblockedLatch.countDown(); deployServices(loc); fullMsgHandledLatch.await(getTestTimeout(), MILLISECONDS); assertThrowsWithCause( () -> rmt.services().serviceProxy(BROKEN_SRVC, Invoker.class, false).invoke(), IgniteException.class); assertTrue(rmt.services().serviceProxy(DECENT_SRVC, Invoker.class, false).invoke()); }

Target:
public void testServiceTopologyInitialized() throws Exception { IgniteEx loc = startGrids(NODES_CNT); IgniteEx rmt = grid(NODES_CNT - 1); assertEquals(1, fullMsgUnblockedLatch.getCount()); fullMsgUnblockedLatch.countDown(); assertEquals(1, fullMsgHandledLatch.getCount()); deployServices(loc); assertTrue(fullMsgHandledLatch.await(getTestTimeout(), MILLISECONDS)); assertThrowsWithCause( () -> rmt.services().serviceProxy(BROKEN_SRVC, Invoker.class, false).invoke(), IgniteException.class); assertTrue(rmt.services().serviceProxy(DECENT_SRVC, Invoker.class, false).invoke()); }
Source:
public synchronized void close() { try { if (properties.isSchemaPolicyCreateDrop()) { for (Map.Entry<String, MappedEntity> me : entities.entrySet()) { try { final PreparedStatement insert = me.getValue().getInsert(); final PreparedStatement insertReturning = me.getValue().getInsertReturning(); try { insert.executeBatch(); if (insertReturning != null) { insertReturning.executeBatch(); } } catch (SQLException ex) { logger.debug(String.format("Failed to flush before dropping entity '%s'", me.getValue().getEntity().getName()), ex); } finally { try { me.getValue().close(); } catch (Exception e) { logger.trace("Could not close insert statements.", e); } } dropEntity(me.getValue().getEntity()); } catch (DatabaseEngineException ex) { logger.debug(String.format("Failed to drop entity '%s'", me.getValue().getEntity().getName()), ex); } } } for (PreparedStatementCapsule ps : stmts.values()) { ps.ps.close(); } stmts.clear(); conn.close(); logger.debug("Connection to database closed"); } catch (SQLException ex) { logger.warn("Unable to close connection"); } }

Target:
public synchronized void close() { try { for (final PreparedStatementCapsule preparedStatement : stmts.values()) { try { preparedStatement.ps.close(); } catch (final SQLException e) { logger.warn("Could not close statement.", e); } } stmts.clear(); entities.forEach((key, mappedEntity) -> closeMappedEntity(mappedEntity)); if (properties.isSchemaPolicyCreateDrop()) { dropAllEntities(); } conn.close(); logger.debug("Connection to database closed"); } catch (final SQLException ex) { logger.warn("Unable to close connection", ex); } }
Source:
public void addTOC() { clearContent(); appendContent(PageContent.articleWithTOCline01); appendNewLine(PageContent.articleWithTOCline02); appendNewLine(PageContent.articleWithTOCline03); appendNewLine(PageContent.articleWithTOCline04); appendNewLine(PageContent.articleWithTOCline05); appendNewLine(PageContent.articleWithTOCline06); appendNewLine(PageContent.articleWithTOCline07); appendNewLine(PageContent.articleWithTOCline08); }

Target:
public void addTOC() { clearContent(); appendContent(PageContent.articleWithTOClines); }
Source:
public LoadType loadType() { return null; }

Target:
public LoadType loadType() { throw new UnsupportedOperationException(); }
Source:
public Set<SchemaTableName> filterTables(ConnectorTransactionHandle transactionHandle, Identity identity, Set<SchemaTableName> tableNames) { return tableNames.stream().filter(tableName -> checkTablePermission(transactionHandle, identity, tableName, SELECT)).collect(Collectors.toSet()); }

Target:
public Set<SchemaTableName> filterTables(ConnectorTransactionHandle transactionHandle, Identity identity, Set<SchemaTableName> tableNames) { return tableNames.stream().filter(tableName -> checkAnyTablePermission(transactionHandle, identity, tableName)).collect(Collectors.toSet()); }
Source:
public void actionPerformed(ActionEvent e) { if (hasInstance() && MapillaryProperties.DEVELOPER.get() && !getData().getMultiSelectedImages().isEmpty()) MapillaryRecord.getInstance().addCommand( new CommandDelete(getData().getMultiSelectedImages())); }

Target:
public void actionPerformed(ActionEvent e) { if (hasInstance() && !getData().getMultiSelectedImages().isEmpty()) MapillaryRecord.getInstance().addCommand( new CommandDelete(getData().getMultiSelectedImages())); }