auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public BitOutputStream(Object outputBase, long outputAddress, int outputSize) { checkArgument(outputSize >= SIZE_OF_LONG, "Output buffer too small"); this.outputBase = outputBase; container = 0; <START> bitCount = 0; <END> this.outputAddress = outputAddress; outputLimit = this.outputAddress + outputSize - SIZE_OF_LONG; currentAddress = this.outputAddress; }</code><technical_language>want initialize Java defaults</technical_language>

Target:
public BitOutputStream(Object outputBase, long outputAddress, int outputSize) { checkArgument(outputSize >= SIZE_OF_LONG, "Output buffer too small"); this.outputBase = outputBase; this.outputAddress = outputAddress; outputLimit = this.outputAddress + outputSize - SIZE_OF_LONG; currentAddress = this.outputAddress; }
Source:
<code>protected File savePageSourceToFile(Config config, String fileName, WebDriver webdriver, boolean retryIfAlert) { File pageSource = new File(config.reportsFolder(), fileName + ".html"); try { writeToFile(webdriver.getPageSource(), pageSource); } catch (UnhandledAlertException e) { if (retryIfAlert) { try { Alert alert = webdriver.switchTo().alert(); log.error("{}: {}", e, alert.getText()); alert.accept(); savePageSourceToFile(config, fileName, webdriver, false); } catch (Exception unableToCloseAlert) { <START> log.error("Failed to close alert: " + unableToCloseAlert); <END> } } else { printOnce("savePageSourceToFile", e); } } catch (WebDriverException e) { log.warn("Failed to save page source to " + fileName + " because of " + e); writeToFile(e.toString(), pageSource); return pageSource; } catch (RuntimeException e) { log.error("Failed to save page source to " + fileName, e); writeToFile(e.toString(), pageSource); } return pageSource; }</code><technical_language>Format</technical_language>

Target:
protected File savePageSourceToFile(Config config, String fileName, WebDriver webdriver, boolean retryIfAlert) { File pageSource = new File(config.reportsFolder(), fileName + ".html"); try { writeToFile(webdriver.getPageSource(), pageSource); } catch (UnhandledAlertException e) { if (retryIfAlert) { try { Alert alert = webdriver.switchTo().alert(); log.error("{}: {}", e, alert.getText()); alert.accept(); savePageSourceToFile(config, fileName, webdriver, false); } catch (Exception unableToCloseAlert) { log.error("Failed to close alert", unableToCloseAlert); } } else { printOnce("savePageSourceToFile", e); } } catch (WebDriverException e) { log.warn("Failed to save page source to {}", fileName, e); writeToFile(e.toString(), pageSource); return pageSource; } catch (RuntimeException e) { log.error("Failed to save page source to {}", fileName, e); writeToFile(e.toString(), pageSource); } return pageSource; }
Source:
<code>private void initSharedCache(Configuration conf) { synchronized (lock) { if (!sharedCacheInited) { sharedCacheInited = true; } else { return; } } <START> SharedCache.Builder builder = new SharedCache.Builder(); <END> builder.configuration(conf).build(sharedCache); }</code><technical_language>this in !sharedCacheInited block? Is normal builder pattern for a singleton? need do some initialization for time? do need update conf for CachedStore instantiation</technical_language>

Target:
private void initSharedCache(Configuration conf) { synchronized (lock) { if (!sharedCacheInited) { sharedCacheInited = true; sharedCache.initialize(conf); } } }
Source:
<code>protected void refreshPieCharts(final boolean refreshGlobal, final boolean refreshSelection) { final Control viewerControl = getControl(); if (viewerControl.isDisposed()) { return; } TmfPieChartStatisticsModel pieChartModel = getPieChartModel(); if (pieChartModel == null || pieChartModel.getPieChartGlobalModel() == null) { return; } boolean moreThanOne = false; for (Entry<ITmfTrace, Map<String, Long>> entry : pieChartModel.getPieChartGlobalModel().entrySet()) { if(entry.getValue() != null && entry.getValue().size() > 1) { moreThanOne = true; break; } } if (!moreThanOne) { <START> setPieChartsVisible(false); <END> } else { setPieChartsVisible(true); } Display.getDefault().asyncExec(new Runnable() { @Override public void run() { if (!viewerControl.isDisposed()) { fPieChartViewer.refresh(refreshGlobal, refreshSelection); } } }); }</code><technical_language>setPieChartVisible(moreThanOne)</technical_language>

Target:
protected void refreshPieCharts(final boolean refreshGlobal, final boolean refreshSelection) { final Control viewerControl = getControl(); if (viewerControl.isDisposed()) { return; } TmfPieChartStatisticsModel pieChartModel = getPieChartModel(); if (pieChartModel == null || pieChartModel.getPieChartGlobalModel() == null) { return; } boolean moreThanOne = false; for (Entry<ITmfTrace, Map<String, Long>> entry : pieChartModel.getPieChartGlobalModel().entrySet()) { if(entry.getValue() != null && entry.getValue().size() > 1) { moreThanOne = true; break; } } setPieChartsVisible(moreThanOne); Display.getDefault().asyncExec(new Runnable() { @Override public void run() { if (!viewerControl.isDisposed()) { fPieChartViewer.refresh(refreshGlobal, refreshSelection); } } }); }
Source:
<code>public String renderReactComponent(String moduleName, JSONObject parameters) { Stopwatch watch = Stopwatch.createStarted(); try { StringBuilder builder = new StringBuilder(); builder.append("var reactResult = null;\n"); builder.append( "require(['eddyson/react/isomorphic/run', '%1$s'], function(ri) { reactResult = ri('%1$s', %2$s); } );\n"); builder.append("reactResult;"); <START> String script = String.format(builder.toString(), moduleName, parameters.toCompactString()); <END> ScriptEngine engine = getEngine(); Bindings bindings = copyGlobalBindings(); Object result = engine.eval(script, bindings); if (result == null) { resetEngine(); return null; } return result.toString(); } catch (Throwable e) { resetEngine(); throw new RuntimeException(e); } finally { log.info("Rendering module '{}' took {}", moduleName, watch); } }</code><technical_language>avoid this String.format call? expensive a StringBuilder anyway..</technical_language>

Target:
public String renderReactComponent(String moduleName, JSONObject parameters) { Stopwatch watch = Stopwatch.createStarted(); try { ScriptEngine engine = getEngine(); Object result = ((Invocable) engine).invokeFunction("TAPESTRY_REACT_RENDER", moduleName, parameters.toCompactString()); if (result == null) { resetEngine(); return null; } log.info("Rendering module '{}' took {}", moduleName, watch); return result.toString(); } catch (Throwable e) { resetEngine(); throw new RuntimeException(e); } }
Source:
<code>public ITextComponent getName() { <START> return new TextComponentString(UtilLib.translate("entity.vampirism.vampire.name") + " " + (nil() ? super.getName() : entityCreature.getName())); <END> }</code><technical_language>TextComponentTranslation</technical_language>

Target:
public ITextComponent getName() { return new TextComponentString(new TextComponentTranslation("entity.vampirism.vampire.name") + " " + (nil() ? super.getName() : entityCreature.getName())); }
Source:
<code>public void execute(final MavenProject project, final MojoExecution execution, final IProgressMonitor monitor) throws CoreException { <START> context().execute(project, new ICallable<Void>() { <END> public Void call(IMavenExecutionContext context, IProgressMonitor monitor) { execute(context.getSession(), execution, monitor); return null; } }, monitor); }</code><technical_language>unnecessary change</technical_language>

Target:
public void execute(final MavenProject project, final MojoExecution execution, final IProgressMonitor monitor) throws CoreException { context().execute(project, (context, pm) -> { execute(context.getSession(), execution, pm); return null; }, monitor); }
Source:
<code>public void onVolumeMuteClicked(View v) { Application.SetMute action = new Application.SetMute(); action.execute(hostManager.getConnection(), new ApiCallback<Boolean>() { @Override public void onSuccess(Boolean result) { <START> setVolumeMuteButton(!result); <END> } @Override public void onError(int errorCode, String description) { } }, callbackHandler); }</code><technical_language>I tested this yet, odd... passing !result setVolumeMuteButton code is removed (which relied result)</technical_language>

Target:
public void onVolumeMuteClicked(View v) { Application.SetMute action = new Application.SetMute(); action.execute(hostManager.getConnection(), new ApiCallback<Boolean>() { @Override public void onSuccess(Boolean result) { setVolumeMuteButton(result); } @Override public void onError(int errorCode, String description) { } }, callbackHandler); }
Source:
<code>private <T> T testLockReport(SupplierWithException<T> supplier, <START> String expectedLockReportRegex) throws Exception { <END> logs.clearOutput(); T ret = userGroupInfo.doAs((PrivilegedExceptionAction<T>) supplier::get); boolean matches = false; for (String line : logs.getOutput().split(System.lineSeparator())) { if (line.matches(expectedLockReportRegex)) { matches = true; break; } } assertTrue(matches); return ret; }</code><technical_language>This is in previous method. Extract</technical_language>

Target:
private <T> T testLockReport(SupplierWithException<T> supplier, String expectedLockReportRegex) throws Exception { logs.clearOutput(); T ret = userGroupInfo.doAs((PrivilegedExceptionAction<T>) supplier::get); assertTrue(matches(expectedLockReportRegex)); return ret; }
Source:
<code><START> public RealmAwareZkClient getByteArrayRealmAwareZkClient() { <END> if (_byteArrayZkClient == null) { synchronized (this) { if (_byteArrayZkClient == null) { if (_isMultiZkEnabled || Boolean .parseBoolean(System.getProperty(SystemPropertyKeys.MULTI_ZK_ENABLED))) { try { RealmAwareZkClient.RealmAwareZkConnectionConfig.Builder connectionConfigBuilder = new RealmAwareZkClient.RealmAwareZkConnectionConfig.Builder(); if (_msdsEndpoint != null && !_msdsEndpoint.isEmpty()) { connectionConfigBuilder.setRoutingDataSourceEndpoint(_msdsEndpoint) .setRoutingDataSourceType(RoutingDataReaderType.HTTP.name()); } _byteArrayZkClient = new FederatedZkClient(connectionConfigBuilder.build(), new RealmAwareZkClient.RealmAwareZkClientConfig() .setZkSerializer(new ByteArraySerializer())); LOG.info( "ServerContext::getByteArrayRealmAwareZkClient(): FederatedZkClient created successfully!"); } catch (InvalidRoutingDataException | IllegalStateException e) { throw new HelixException( "ServerContext::getByteArrayRealmAwareZkClient(): Failed to create FederatedZkClient!", e); } } else { HelixZkClient.ZkClientConfig clientConfig = new HelixZkClient.ZkClientConfig(); clientConfig.setZkSerializer(new ByteArraySerializer()); _byteArrayZkClient = SharedZkClientFactory.getInstance() .buildZkClient(new HelixZkClient.ZkConnectionConfig(_zkAddr), clientConfig); } } } } return _byteArrayZkClient; }</code><technical_language>suggestion. duplicated pieces previous function. abstract a private function called in public method</technical_language>

Target:
public RealmAwareZkClient getByteArrayRealmAwareZkClient() { if (_byteArrayZkClient == null) { synchronized (this) { if (_byteArrayZkClient == null) { _byteArrayZkClient = createRealmAwareZkClient(_byteArrayZkClient, false, new ByteArraySerializer()); } } } return _byteArrayZkClient; }
Source:
<code>private String getRequireCfg() throws IOException { Integer waitTime = null; if ( cache != null ) { waitTime = (Integer) cache.getFromGlobalCache( PentahoSystem.WAIT_SECONDS ); } if ( waitTime == null ) { try { waitTime = Integer.valueOf( PentahoSystem.getSystemSetting( PentahoSystem.WAIT_SECONDS, "30" ) ); } catch ( NumberFormatException e ) { waitTime = 30; } if ( cache != null ) { cache.putInGlobalCache( PentahoSystem.WAIT_SECONDS, waitTime ); } <START> } <END> return "{ waitSeconds: " + waitTime + ", paths: {}, shim: {}, " + "map: { \"*\": }, bundles: {}, config: { \"pentaho/service\": }, packages: };\n"; }</code><technical_language>Put default a class constant constant here</technical_language>

Target:
private String getRequireCfg() { StringBuilder requireCfg = new StringBuilder(); requireCfg .append( "{" ) .append( "\n waitSeconds: " ).append( getRequireWaitTime() ).append( "," ) .append( "\n paths: {}," ) .append( "\n shim: {}," ) .append( "\n map: { \"*\": }," ) .append( "\n bundles: {}," ) .append( "\n config: { \"pentaho/service\": }," ) .append( "\n packages: []" ) .append( "\n}" ); return requireCfg.toString(); }
Source:
<code>public void flush() throws TTransportException { if (!isOpen()) { throw getClosedConditionException(conn, "flush:"); } byte[] data = new byte[writeBuffer.position()]; writeBuffer.flip(); writeBuffer.get(data); if (data.length == 0) { return; } if (data.length > TNatsServiceTransport.NATS_MAX_MESSAGE_SIZE) { throw new FMessageSizeException(String.format( "Message exceeds %d bytes, was %d bytes", TNatsServiceTransport.NATS_MAX_MESSAGE_SIZE, data.length)); } try{ conn.publish(writeTo, data); }catch(IOException e){ <START> LOGGER.warning("flush: could not publish data: " + e.getMessage()); <END> } writeBuffer.clear(); }</code><technical_language>Throw a TTransportException</technical_language>

Target:
public void flush() throws TTransportException { if (!isOpen()) { throw getClosedConditionException(conn, "flush:"); } byte[] data = new byte[writeBuffer.position()]; writeBuffer.flip(); writeBuffer.get(data); if (data.length == 0) { return; } if (data.length > TNatsServiceTransport.NATS_MAX_MESSAGE_SIZE) { throw new FMessageSizeException(String.format( "Message exceeds %d bytes, was %d bytes", TNatsServiceTransport.NATS_MAX_MESSAGE_SIZE, data.length)); } try { conn.publish(writeTo, data); } catch (IOException e) { throw new TTransportException("flush: could not publish data: " + e.getMessage()); } writeBuffer.clear(); }
Source:
<code>public List<Cohort> getCohortsContainingPatientId(Integer patientId) throws DAOException { return (List<Cohort>) sessionFactory.getCurrentSession().createCriteria(Cohort.class) <START> .add(Restrictions.eq("voided", false)) <END> .createAlias("members", "m") .createAlias("m.patientId", "p") .add(Restrictions.eq("p.patientId", patientId)) .list(); }</code><technical_language>Do a voided field in this cohort_member table? In theory members get removed set. need update Cohort.removeMember() set stop date instead of removing. means getCohortsContainingPatientId() return cohorts patient of current date i.e members stop date startDate is current date end date is current date</technical_language>

Target:
public List<Cohort> getCohortsContainingPatientId(Integer patientId) throws DAOException { return getCohortsContainingPatientId(patientId, false); }
Source:
<code>public void negativeWaterLevelSingleScore() { GreatDelugeAcceptor acceptor = new GreatDelugeAcceptor(); acceptor.setInitialLevels(SimpleScore.of(-100)); try { acceptor.phaseStarted(null); } <START> catch (IllegalArgumentException e) { <END> assertEquals("The initial level (" + acceptor.getInitialLevels() + ") cannot have negative level (" + "-100.0" + ").", e.getMessage()); } }</code><technical_language>I code style dictates catch line closing parenthesis of try block</technical_language>

Target:
public void negativeWaterLevelSingleScore() { GreatDelugeAcceptor acceptor = new GreatDelugeAcceptor(); acceptor.setInitialWaterLevel(SimpleScore.of(-100)); try { acceptor.phaseStarted(null); } catch (IllegalArgumentException e) { assertEquals("The initial level (" + acceptor.getInitialWaterLevel() + ") cannot have negative level (" + "-100.0" + ").", e.getMessage()); } }
Source:
<code>private static boolean isSpecialInvalid(final String hostname, final Promise<?> promise) { <START> if (INVALID.equalsIgnoreCase(hostname)) { <END> promise.setFailure(StacklessUnknownHostException.newInstance( "Special domain name \"invalid.\" always returns NXDOMAIN", DnsNameResolver.class, "doResolve(...)")); return true; } return false; }</code><technical_language>I is good enough</technical_language>

Target:
private static boolean isSpecialInvalid(final String hostname, final Promise<?> promise) { if (INVALID.equalsIgnoreCase(hostname)) { promise.setFailure(new UnknownHostException("Special domain name \"invalid.\" always returns NXDOMAIN")); return true; } return false; }
Source:
<code><START> public DatabasePeerManager(Context context, DatabaseFilesProvider databaseFilesProvider) { <END> mContext = context; this.mDatabaseFilesProvider = databaseFilesProvider; setListener(mPeerRegistrationListener); }</code><technical_language>style: new line; mark databaseFilesProvider @Nullable</technical_language>

Target:
public DatabasePeerManager(Context context, DatabaseFilesProvider databaseFilesProvider) { mContext = context; mDatabaseFilesProvider = databaseFilesProvider; setListener(mPeerRegistrationListener); }
Source:
<code>private void partitionSanityChecks(Map<String, Set<DatastreamTask>> assignedTasks, DatastreamGroupPartitionsMetadata allPartitions) { int total = 0; List<String> unassignedPartitions = new ArrayList<>(allPartitions.getPartitions()); String datastreamGroupName = allPartitions.getDatastreamGroup().getName(); for (Set<DatastreamTask> tasksSet : assignedTasks.values()) { for (DatastreamTask task : tasksSet) { if (datastreamGroupName.equals(task.getTaskPrefix())) { total += task.getPartitionsV2().size(); unassignedPartitions.removeAll(task.getPartitionsV2()); } } } if (total != allPartitions.getPartitions().size()) { <START> throw new DatastreamRuntimeException(String.format("Validation failed after assignment, assigned partitions " <END> + "size: is not equal to all partitions size: {}", total, allPartitions.getPartitions().size())); } if (unassignedPartitions.size() > 0) { throw new DatastreamRuntimeException(String.format("Validation failed after assignment, " + "unassigned partition: {}", unassignedPartitions)); } }</code><technical_language>typically log throw exception. return in duplicate logs. is a defensive pattern following, instances exception thrown result in process crash exception is logged</technical_language>

Target:
private void partitionSanityChecks(Map<String, Set<DatastreamTask>> assignedTasks, DatastreamGroupPartitionsMetadata allPartitions) { int total = 0; List<String> unassignedPartitions = new ArrayList<>(allPartitions.getPartitions()); String datastreamGroupName = allPartitions.getDatastreamGroup().getName(); for (Set<DatastreamTask> tasksSet : assignedTasks.values()) { for (DatastreamTask task : tasksSet) { if (datastreamGroupName.equals(task.getTaskPrefix())) { total += task.getPartitionsV2().size(); unassignedPartitions.removeAll(task.getPartitionsV2()); } } } if (total != allPartitions.getPartitions().size()) { String errorMsg = String.format(String.format("Validation failed after assignment, assigned partitions " + "size: %s is not equal to all partitions size: %s", total, allPartitions.getPartitions().size())); LOG.error(errorMsg); throw new DatastreamRuntimeException(errorMsg); } if (unassignedPartitions.size() > 0) { String errorMsg = String.format("Validation failed after assignment, " + "unassigned partition: %s", unassignedPartitions); LOG.error(errorMsg); throw new DatastreamRuntimeException(errorMsg); } }
Source:
<code>public List<Group> getAll() throws SecurityManagementException { final List<Group> roles = new LinkedList<>(); final RolesResource[] rolesResource = new RolesResource[1]; consumeRealm(realmResource -> { <START> rolesResource[0] = getRolesResource(realmResource, useResourceRoleMapping); <END> final List<RoleRepresentation> roleRepresentations = rolesResource[0].list(); final Set<String> registeredRoles = SecurityManagementUtils.getRegisteredRoleNames(); if (roleRepresentations != null && !roleRepresentations.isEmpty()) { for (RoleRepresentation role : roleRepresentations) { final String name = role.getName(); if (!registeredRoles.contains(name)) { final Group group = createGroup(name); roles.add(group); } } } }); return roles; }</code><technical_language>this null fail somehow</technical_language>

Target:
public List<Group> getAll() throws SecurityManagementException { final List<Group> roles = new LinkedList<>(); consumeRealm(realmResource -> { RolesResource rolesResource = getRolesResource(realmResource, getKeyCloakInstance().getUseRoleResourceMappings()); final List<RoleRepresentation> roleRepresentations = rolesResource.list(); final Set<String> registeredRoles = SecurityManagementUtils.getRegisteredRoleNames(); if (roleRepresentations != null && !roleRepresentations.isEmpty()) { for (RoleRepresentation role : roleRepresentations) { final String name = role.getName(); if (!registeredRoles.contains(name)) { final Group group = createGroup(name); roles.add(group); } } } }); return roles; }
Source:
<code>private void parse() { if (syntaxTree == null) { <START> parsingPage = new ParsingPage(new WikiSourcePage(this), getVariableSource(), urlParams); <END> syntaxTree = Parser.make(parsingPage, getData().getContent()).parse(); } }</code><technical_language>I ParsingPage extra map of parameters. This put in UrlPathVariableSource</technical_language>

Target:
private void parse() { if (syntaxTree == null) { parsingPage = new ParsingPage(new WikiSourcePage(this), new UrlPathVariableSource( getVariableSource(), urlParams)); syntaxTree = Parser.make(parsingPage, getData().getContent()).parse(); } }
Source:
<code>@Override public long processInStreamOutLong(int type, BinaryRawReaderEx reader) throws IgniteCheckedException { switch (type) { case OP_PING_NODE: return pingNode(reader.readUuid()) ? TRUE : FALSE; case OP_RESET_LOST_PARTITIONS: { int cnt = reader.readInt(); Collection<String> cacheNames = new ArrayList<>(cnt); for (int i = 0; i < cnt; i++) { cacheNames.add(reader.readString()); } platformCtx.kernalContext().grid().resetLostPartitions(cacheNames); return TRUE; } case OP_ENABLE_STATISTICS: { boolean enabled = reader.readBoolean(); int cnt = reader.readInt(); Collection<String> cacheNames = new ArrayList<>(cnt); for (int i = 0; i < cnt; i++) { cacheNames.add(reader.readString()); } <START> platformCtx.kernalContext().cache().enableStatistics(cacheNames, enabled); <END> return TRUE; } default: return super.processInStreamOutLong(type, reader); } }</code><technical_language>Please public API possible: platformCtx.kernalContext().grid().cluster().enableStatistics(cacheNames, enabled) is a difference in exception handling GridKernalGateway.readLock call</technical_language>

Target:
@Override public long processInStreamOutLong(int type, BinaryRawReaderEx reader) throws IgniteCheckedException { switch (type) { case OP_PING_NODE: return pingNode(reader.readUuid()) ? TRUE : FALSE; case OP_RESET_LOST_PARTITIONS: { int cnt = reader.readInt(); Collection<String> cacheNames = new ArrayList<>(cnt); for (int i = 0; i < cnt; i++) { cacheNames.add(reader.readString()); } platformCtx.kernalContext().grid().resetLostPartitions(cacheNames); return TRUE; } case OP_ENABLE_STATISTICS: { boolean enabled = reader.readBoolean(); int cnt = reader.readInt(); Collection<String> cacheNames = new ArrayList<>(cnt); for (int i = 0; i < cnt; i++) { cacheNames.add(reader.readString()); } platformCtx.kernalContext().grid().cluster().enableStatistics(cacheNames, enabled); return TRUE; } default: return super.processInStreamOutLong(type, reader); } }
Source:
<code>private void startDiscovery() throws LogReplicationDiscoveryServiceException { try { log.info("Connect to Cluster Manager adapter."); this.clusterManagerAdapter.connect(this); log.info("Fetch topology from Cluster Manager..."); topologyDescriptor = new TopologyDescriptor(clusterManagerAdapter.fetchTopology()); if (clusterPresentInTopology(topologyDescriptor)) { log.info("Node[{}] belongs to cluster, descriptor={}", localEndpoint, localClusterDescriptor); LogReplicationContext context = buildLogReplicationContext(); discoveryCallback.complete(context); registerToLogReplicationLock(); } else { String message = String.format("Node[%s] does not belong to any Cluster provided by the discovery service, topology=%s", localEndpoint, topologyDescriptor); log.warn(message); <START> throw new LogReplicationDiscoveryServiceException(message); <END> } } catch (Exception e) { String message = "Caught exception while fetching topology. Log Replication cannot start."; log.error(message, e); throw new LogReplicationDiscoveryServiceException(message); } }</code><technical_language>If cluster is present in topology require retry logic side</technical_language>

Target:
private void startDiscovery() throws LogReplicationDiscoveryServiceException { connectAndQueryTopology(); if (!clusterPresentInTopology(topologyDescriptor)) { String message = String.format("Node[%s] does not belong to any Cluster provided by the discovery service, topology=%s", localEndpoint, topologyDescriptor); log.warn(message); throw new LogReplicationDiscoveryServiceException(message); } log.info("Node[{}] belongs to cluster, descriptor={}", localEndpoint, localClusterDescriptor); buildLogReplicationContext(); serverCallback.complete(interClusterReplicationService); registerToLogReplicationLock(); }
Source:
<code>public void shouldReturnAuthorisationRejectedStatusFromValue2() throws Exception { InterpretedStatus status = EpdqStatusMapper.get().from("2", AUTHORISATION_SUBMITTED); assertThat(status.getType(), is(InterpretedStatus.Type.CHARGE_STATUS)); <START> assertThat(((MappedChargeStatus) status).getChargeStatus(), is(AUTHORISATION_REJECTED)); <END> }</code><technical_language>need (MappedChargeStatus) cast</technical_language>

Target:
public void shouldReturnAuthorisationRejectedStatusFromValue2() throws Exception { InterpretedStatus status = EpdqStatusMapper.get().from("2", AUTHORISATION_SUBMITTED); assertThat(status.getType(), is(InterpretedStatus.Type.CHARGE_STATUS)); assertThat(status.getChargeStatus(), is(AUTHORISATION_REJECTED)); }
Source:
<code>public String toString() { String s = "ctrl=" + ((controller != null) ? controller.toString() : "null_controller"); s += "|addr:" + ((address != null) ? address.toString() : "null_address"); s += "|cmd:" + ((controlCommand != null) ? controlCommand.toString() : "null_controlCommand"); s += "|type:" + ((type != null) ? type.toString() : "null_type"); <START> s += "|item:" + ((item != null) ? item.getName() : "null_item"); <END> return (s); }</code><technical_language>String concatenation + operator "null" for null Strings, this simplified</technical_language>

Target:
public String toString() { return new StringBuilder() .append("ctrl=") .append(controller) .append("|addr:") .append(address) .append("|cmd:") .append(controlCommand) .append("|type:") .append(type) .append("|item:") .append(item.getName()) .toString(); }
Source:
<code>public List<@NonNull ITimeGraphEntry> getChildren() { <START> return Collections.<@NonNull ITimeGraphEntry>emptyList(); <END> }</code><technical_language>This is changing behaviour. do separately</technical_language>

Target:
public List<@NonNull ITimeGraphEntry> getChildren() { return null; }
Source:
<code>default boolean isUnallowed(@Nullable ItemStack item) { if (item == null) { return false; } SlimefunItem sfItem = SlimefunItem.getByItem(item); <START> return sfItem != null && !(sfItem instanceof VanillaItem) && !sfItem.isDisabled(); <END> }</code><technical_language>This is exact line 34. utilise this method: suggestion return isUnallowed(sfItem);</technical_language>

Target:
default boolean isUnallowed(@Nullable ItemStack item) { if (item == null) { return false; } SlimefunItem sfItem = SlimefunItem.getByItem(item); return isUnallowed(sfItem); }
Source:
<code>public static void captureEvent(SentryEventBuilder builder) { if (Sentry.getInstance().captureListener != null) { builder = Sentry.getInstance().captureListener.beforeCapture(builder); } final JSONRequestData requestData = new JSONRequestData(builder.event); requestData.addHeader("X-Sentry-Auth", createXSentryAuthHeader()); requestData.addHeader("User-Agent", "sentry-android/" + VERSION); requestData.addHeader("Content-Type", "text/html; charset=utf-8"); Log.d(TAG, "Request - " + new JSONObject(builder.event).toString()); if (Looper.myLooper() == Looper.getMainLooper()) { doCaptureEventPost(requestData); } else if (Sentry.getInstance().context != null) { <START> Handler mainHandler = new Handler(Sentry.getInstance().context.getMainLooper()); <END> Runnable runnable = new Runnable() { @Override public void run() { doCaptureEventPost(requestData); } }; mainHandler.post(runnable); } }</code><technical_language>This solve issue Sentry is initiated SyncAdapter SyncService runs a separate background thread initializing Handler Looper.getMainLooper() error. easiest fix for this create a new thread post message thread. Is mandatory thread application is currently running? code work. java HandlerThread thread = new HandlerThread("SentryThread") {}; thread.start(); Runnable runnable = new Runnable() { @Override public void run() { doCaptureEventPost(requestData); } }; Handler h = new Handler(thread.getLooper()); h.post(runnable);</technical_language>

Target:
public static void captureEvent(SentryEventBuilder builder) { if (Sentry.getInstance().captureListener != null) { builder = Sentry.getInstance().captureListener.beforeCapture(builder); } final Map<String, Object> requestData = new HashMap<String, Object>(); requestData.putAll(builder.event); Log.d(TAG, "Request - " + new JSONObject(builder.event).toString()); if (Looper.myLooper() == Looper.getMainLooper()) { doCaptureEventPost(requestData); } else if (Sentry.getInstance().context != null) { HandlerThread thread = new HandlerThread("SentryThread") {}; thread.start(); Runnable runnable = new Runnable() { @Override public void run() { doCaptureEventPost(requestData); } }; Handler h = new Handler(thread.getLooper()); h.post(runnable); } }
Source:
<code>public int scheduleNewTask(Task task, int engineID) throws InternalErrorException { int newTaskId = 0; try { newTaskId = Utils.getNewId(this.getJdbcTemplate(), "tasks_id_seq"); this.getJdbcTemplate().update( "insert into tasks(id, exec_service_id, facility_id, schedule, recurrence, delay, status, engine_id) values (?,?,?, " + Compatibility.toDate("?","'DD-MM-YYYY HH24:MI:SS'") + ",?,?,?,?)", <START> newTaskId, task.getExecServiceId(), task.getFacilityId(), getDateFormatter().format(task.getSchedule()), task.getRecurrence(), task.getDelay(), task.getStatus().toString(), engineID < 0 ? "null" : engineID); <END> return newTaskId; } catch (DataIntegrityViolationException ex) { log.error("Data: id, exec_service_id, facility_id, schedule, recurrence, delay, status is: " + newTaskId + ", " + task.getExecServiceId() + ", " + task.getFacilityId() + ", " + getDateFormatter().format(task.getSchedule()) + ", " + task.getRecurrence() + ", " + task.getDelay() + ", " + task.getStatus().toString() + ". Exception:" + ex.toString(), ex); } return 0; }</code><technical_language>store string "null" in integer type column. correspond change in DB, engine_id null</technical_language>

Target:
public int scheduleNewTask(Task task, int engineID) throws InternalErrorException { int newTaskId = 0; try { newTaskId = Utils.getNewId(this.getJdbcTemplate(), "tasks_id_seq"); this.getJdbcTemplate().update( "insert into tasks(id, exec_service_id, facility_id, schedule, recurrence, delay, status, engine_id) values (?,?,?, " + Compatibility.toDate("?","'DD-MM-YYYY HH24:MI:SS'") + ",?,?,?,?)", newTaskId, task.getExecServiceId(), task.getFacilityId(), getDateFormatter().format(task.getSchedule()), task.getRecurrence(), task.getDelay(), task.getStatus().toString(), engineID < 0 ? null : engineID); return newTaskId; } catch (DataIntegrityViolationException ex) { log.error("Data: id, exec_service_id, facility_id, schedule, recurrence, delay, status is: " + newTaskId + ", " + task.getExecServiceId() + ", " + task.getFacilityId() + ", " + getDateFormatter().format(task.getSchedule()) + ", " + task.getRecurrence() + ", " + task.getDelay() + ", " + task.getStatus().toString() + ". Exception:" + ex.toString(), ex); } return 0; }
Source:
<code>public ResponseEntity<?> getAllCategories() { String username = ControllerUtil.getCurrentLoggedUsername(); List<Category> categoryList = categoryDao.findCategoriesByUsername(username); if(categoryList.isEmpty()){ <START> return new ResponseEntity<String>(HttpStatus.NO_CONTENT); <END> } return new ResponseEntity<List<Category>>(categoryList, HttpStatus.OK); }</code><technical_language>return string string is returned in body</technical_language>

Target:
public ResponseEntity<List<Category>> getAllCategories() { String username = ControllerUtil.getCurrentLoggedUsername(); List<Category> categoryList = categoryDao.findByUsername(username); if(categoryList.isEmpty()){ return new ResponseEntity<List<Category>>(HttpStatus.NO_CONTENT); } return new ResponseEntity<List<Category>>(categoryList, HttpStatus.OK); }
Source:
<code>public void testExplainPlan() throws Exception { Client client = getClient(); String sql = "select rank() over ( partition by A, B order by C ) from T;"; ClientResponse cr; try { cr = client.callProcedure("@Explain", sql); assertEquals(ClientResponse.SUCCESS, cr.getStatus()); VoltTable vt = cr.getResults()[0]; <START> assertTrue(true); <END> } catch (Exception ex) { assertTrue("Exception on @Explain of windowed expression", false); } }</code><technical_language>assertTrue(true)</technical_language>

Target:
public void testExplainPlan() throws Exception { Client client = getClient(); String sql = "select rank() over ( partition by A, B order by C ) from T;"; ClientResponse cr; try { cr = client.callProcedure("@Explain", sql); assertEquals(ClientResponse.SUCCESS, cr.getStatus()); VoltTable vt = cr.getResults()[0]; assertTrue(true); } catch (Exception ex) { fail("Exception on @Explain of windowed expression"); } }
Source:
<code>private static ECDSASignature decodeSignatureLax(ByteArrayInputStream input) { checkArgument(input.read() == 0x30); try { readLength(input); checkArgument(input.read() == 0x02); int lenR = readLength(input); byte[] r = new byte[lenR]; input.read(r); checkArgument(input.read() == 0x02); int lenS = readLength(input); byte[] s = new byte[lenS]; input.read(s); return new ECDSASignature(new BigInteger(1, r), new BigInteger(1, s)); } catch (IOException e) { <START> throw new RuntimeException(e); <END> } }</code><technical_language>Please throw RuntimeException(). previous code threw IllegalArgumentException, right</technical_language>

Target:
private static ECDSASignature decodeSignatureLax(ByteArrayInputStream input) { checkArgument(input.read() == 0x30); try { readLength(input); checkArgument(input.read() == 0x02); int lenR = readLength(input); byte[] r = new byte[lenR]; input.read(r); checkArgument(input.read() == 0x02); int lenS = readLength(input); byte[] s = new byte[lenS]; input.read(s); return new ECDSASignature(new BigInteger(1, r), new BigInteger(1, s)); } catch (IOException e) { throw new IllegalArgumentException(e); } }
Source:
<code>private Multimap<ComponentCategory, SnomedComponentCreateRequest> extractBulkCreateRequests(final Request<?, ?> next) { final Request<?, ?> firstNonDelegateRequest = getFirstNonDelegatingRequest(next); if (firstNonDelegateRequest instanceof TransactionalRequest) { final TransactionalRequest transactionalRequest = (TransactionalRequest) firstNonDelegateRequest; final Request<?, ?> nextRequest = transactionalRequest.getNext(); if (nextRequest instanceof BulkRequest) { return collectCreateRequests((BulkRequest<?>) nextRequest); } } <START> return null; <END> }</code><technical_language>is return empty collection instances nulls</technical_language>

Target:
private Multimap<ComponentCategory, BaseSnomedComponentCreateRequest> extractBulkCreateRequests(final Request<?, ?> next) { final Request<?, ?> firstNonDelegateRequest = getFirstNonDelegatingRequest(next); if (firstNonDelegateRequest instanceof TransactionalRequest) { final TransactionalRequest transactionalRequest = (TransactionalRequest) firstNonDelegateRequest; final Request<?, ?> nextRequest = transactionalRequest.getNext(); if (nextRequest instanceof BulkRequest) { return collectCreateRequests((BulkRequest<?>) nextRequest); } } return ImmutableMultimap.<ComponentCategory, BaseSnomedComponentCreateRequest> of(); }
Source:
<code>public void handleReadAlarmRegisterResponse(final DeviceMessageMetadata deviceMessageMetadata, final ResponseMessageResultType deviceResult, final OsgpException exception, final AlarmRegisterResponseDto alarmRegisterDto) { LOGGER.info("handleReadAlarmRegisterResponse for MessageType: {}", deviceMessageMetadata.getMessageType()); ResponseMessageResultType result = deviceResult; if (exception != null) { LOGGER.error(DEVICE_RESPONSE_NOT_OK_LOG_MSG, exception); result = ResponseMessageResultType.NOT_OK; } final AlarmRegister alarmRegisterValueDomain = this.monitoringMapper.map(alarmRegisterDto, AlarmRegister.class); <START> this.webServiceResponseMessageSender.send( <END> ResponseMessage.newResponseMessageBuilder() .withCorrelationUid(deviceMessageMetadata.getCorrelationUid()) .withOrganisationIdentification(deviceMessageMetadata.getOrganisationIdentification()) .withDeviceIdentification(deviceMessageMetadata.getDeviceIdentification()).withResult(result) .withOsgpException(exception).withDataObject(alarmRegisterValueDomain) .withMessagePriority(deviceMessageMetadata.getMessagePriority()).build(), deviceMessageMetadata.getMessageType()); }</code><technical_language>Extract building of ResponseMessage variable (in eclipse, select text, right-click > refactor > extract local variable / select code + shift+alt+L). This code a bit more readable, especially passing in other besides ResponseMessage</technical_language>

Target:
public void handleReadAlarmRegisterResponse(final DeviceMessageMetadata deviceMessageMetadata, final ResponseMessageResultType deviceResult, final OsgpException exception, final AlarmRegisterResponseDto alarmRegisterDto) { LOGGER.info("handleReadAlarmRegisterResponse for MessageType: {}", deviceMessageMetadata.getMessageType()); ResponseMessageResultType result = deviceResult; if (exception != null) { LOGGER.error(DEVICE_RESPONSE_NOT_OK_LOG_MSG, exception); result = ResponseMessageResultType.NOT_OK; } final AlarmRegister alarmRegisterValueDomain = this.monitoringMapper.map(alarmRegisterDto, AlarmRegister.class); final ResponseMessage responseMessage = ResponseMessage.newResponseMessageBuilder() .withCorrelationUid(deviceMessageMetadata.getCorrelationUid()) .withOrganisationIdentification(deviceMessageMetadata.getOrganisationIdentification()) .withDeviceIdentification(deviceMessageMetadata.getDeviceIdentification()).withResult(result) .withOsgpException(exception).withDataObject(alarmRegisterValueDomain) .withMessagePriority(deviceMessageMetadata.getMessagePriority()).build(); this.webServiceResponseMessageSender.send(responseMessage, deviceMessageMetadata.getMessageType()); }
Source:
<code>private Set<String> getScopes(SingularityAuthorizationScope scope) { switch (scope) { case READ: return Sets.union(scopesConfiguration.getRead(), scopesConfiguration.getWrite()); case WRITE: return scopesConfiguration.getWrite(); <START> case DEPLOY: <END> return scopesConfiguration.getDeploy().isEmpty() ? scopesConfiguration.getWrite() : scopesConfiguration.getDeploy(); case EXEC: return scopesConfiguration.getExec(); case ADMIN: default: return scopesConfiguration.getAdmin(); } }</code><technical_language>If simpler in implementation, fine DEPLOY scope behave similar new (i.e. falls WRITE overriden a request). I originally separated out DEPLOY for future internal automation, turned enforced default</technical_language>

Target:
private Set<String> getScopes(SingularityAuthorizationScope scope) { switch (scope) { case READ: return Sets.union(scopesConfiguration.getRead(), scopesConfiguration.getWrite()); case WRITE: return scopesConfiguration.getWrite(); case ADMIN: default: return scopesConfiguration.getAdmin(); } }
Source:
<code>private void handleLogReplicationEntry(CorfuPayloadMsg<LogReplicationEntry> msg, ChannelHandlerContext ctx, IServerRouter r) { log.info("Log Replication Entry received by Server."); <START> LogReplicationEntry ack = sinkManager.receive(msg.getPayload()); <END> if (ack != null) { long ts = ack.getMetadata().getMessageMetadataType().equals(MessageType.LOG_ENTRY_REPLICATED) ? ack.getMetadata().getTimestamp() : ack.getMetadata().getSnapshotTimestamp(); log.info("Sending ACK on to Client ", ack.getMetadata(), ts); r.sendResponse(ctx, msg, CorfuMsgType.LOG_REPLICATION_ENTRY.payloadMsg(ack)); } }</code><technical_language>I this is clear in code. receive return some sort of ack a LogReplicationEntry. code confusing read</technical_language>

Target:
private void handleLogReplicationEntry(CorfuPayloadMsg<LogReplicationEntry> msg, ChannelHandlerContext ctx, IServerRouter r) { log.trace("Log Replication Entry received by Server."); if (isLeader(msg, r)) { LogReplicationEntry ack = sinkManager.receive(msg.getPayload()); if (ack != null) { long ts = ack.getMetadata().getMessageMetadataType().equals(MessageType.LOG_ENTRY_REPLICATED) ? ack.getMetadata().getTimestamp() : ack.getMetadata().getSnapshotTimestamp(); log.info("Sending ACK on to Client ", ack.getMetadata(), ts); r.sendResponse(msg, CorfuMsgType.LOG_REPLICATION_ENTRY.payloadMsg(ack)); } } }
Source:
<code>public int hashCode() { return _nuageVspEntity != null ? _nuageVspEntity.hashCode() : 0; <START> } <END></code><technical_language>Please implement toString() provide debugging state information for debugging purposes</technical_language>

Target:
public int hashCode() { int result = super.hashCode(); result = 31 * result + (_nuageVspEntity != null ? _nuageVspEntity.hashCode() : 0); return result; }
Source:
<code>public DnsCacheEntry cache(String hostname, DnsRecord[] additionals, InetAddress address, long originalTtl, EventLoop loop) { checkNotNull(hostname, "hostname"); checkNotNull(address, "address"); checkNotNull(loop, "loop"); int ttl = Math.max(minTtl, (int) Math.min(maxTtl, originalTtl)); long ttlInMillis = TimeUnit.SECONDS.toMillis(ttl); <START> long softExpiryTime = System.currentTimeMillis() + ttlInMillis; <END> long hardExpiryTime = softExpiryTime + gracePeriodTtlInMillis; DefaultDnsCacheEntry e = new DefaultDnsCacheEntry(hostname, address, originalTtl, softExpiryTime, hardExpiryTime); if (maxTtl == 0 || !emptyAdditionals(additionals)) { return e; } resolveCache.cache(appendDot(hostname), e, ttl + gracePeriodTtl, loop); return e; }</code><technical_language>I System.nanoTime() effected time changes</technical_language>

Target:
public DnsCacheEntry cache(String hostname, DnsRecord[] additionals, InetAddress address, long originalTtl, EventLoop loop) { checkNotNull(hostname, "hostname"); checkNotNull(address, "address"); checkNotNull(loop, "loop"); DefaultDnsCacheEntry e = new DefaultDnsCacheEntry(hostname, address); if (maxTtl == 0 || !emptyAdditionals(additionals)) { return e; } resolveCache.cache(appendDot(hostname), e, Math.max(minTtl, (int) Math.min(maxTtl, originalTtl)), loop); return e; }
Source:
<code>public LiveData<Integer> changePassword(String newPassword) { if (changePasswordResponse == null) { changePasswordResponse = new MutableLiveData<>(); } if (TextUtils.isEmpty(newPassword)) { changePasswordResponse.setValue(ON_EMPTY_PASSWORD); return changePasswordResponse; } int id; try { id = JWTUtils.getIdentity(AuthUtil.getAuthorization()); <START> User u = new User(); <END> u.setId(id); u.setPassword(newPassword); compositeDisposable.add(APIClient.getOpenEventAPI().updateUser(u, id) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .flatMapCompletable(user -> RealmDataRepository .getDefaultInstance() .saveUser(user)) .subscribe(() -> { changePasswordResponse.setValue(ON_COMPLETE); Timber.d("User data saved in database"); Timber.d("Password changed successfully"); }, throwable -> { changePasswordResponse.setValue(ON_ERROR); Timber.d("Error changing password" + throwable.getMessage()); })); } catch (JSONException e) { changePasswordResponse.setValue(ON_ERROR); Timber.e(e); } return changePasswordResponse; }</code><technical_language>Proper naming please - user</technical_language>

Target:
public LiveData<Integer> changePassword(String newPassword) { if (changePasswordResponse == null) { changePasswordResponse = new MutableLiveData<>(); } if (TextUtils.isEmpty(newPassword)) { changePasswordResponse.setValue(ON_EMPTY_PASSWORD); return changePasswordResponse; } int id; try { id = JWTUtils.getIdentity(AuthUtil.getAuthorization()); compositeDisposable.add(APIClient.getOpenEventAPI().updateUser(User.builder().id(id).password(newPassword).build(), id) .subscribeOn(Schedulers.io()) .observeOn(AndroidSchedulers.mainThread()) .flatMapCompletable(user -> RealmDataRepository .getDefaultInstance() .saveUser(user)) .subscribe(() -> { changePasswordResponse.setValue(ON_COMPLETE); Timber.d("User data saved in database"); Timber.d("Password changed successfully"); }, throwable -> { changePasswordResponse.setValue(ON_ERROR); Timber.d("Error changing password" + throwable.getMessage()); })); } catch (JSONException e) { changePasswordResponse.setValue(ON_ERROR); Timber.e(e); } return changePasswordResponse; }
Source:
<code>private void assignNewImage(URI pagesDirectory, String currentPngFile) { File temporaryTifFile = null; try { temporaryTifFile = File.createTempFile("tempTif_", ".tif"); } catch (IOException e) { logger.error(e); } if (this.image != null) { try { URI tifFile = this.currentTifFolder.resolve(this.image); logger.trace("tiffconverterpfad: {}", tifFile); if (!fileService.fileExist(tifFile)) { tifFile = serviceManager.getProcessService().getImagesTifDirectory(true, this.process) .resolve(this.image); Helper.setFehlerMeldung("formularOrdner:TifFolders", "", "image " + this.image + " does not exist in folder " + this.currentTifFolder + ", using image from " + new File(serviceManager.getProcessService().getImagesTifDirectory(true, this.process)) .getName()); } <START> InputStream tifFileInputStream = fileService.read(tifFile); <END> if (temporaryTifFile != null) { FileUtils.copyInputStreamToFile(tifFileInputStream, temporaryTifFile); this.imageHelper.scaleFile(temporaryTifFile.toURI(), pagesDirectory.resolve(currentPngFile), this.imageSize, this.imageRotation); logger.trace("scaleFile"); } } catch (Exception e) { Helper.setFehlerMeldung("could not getById image folder", e); logger.error(e); } finally { if (temporaryTifFile != null) { try { if (!fileService.delete(temporaryTifFile.toURI())) { logger.error( "Error while deleting temporary tif file: " + temporaryTifFile.getAbsolutePath()); } } catch (IOException e) { logger.error("Error while deleting temporary tif file: " + e.getMessage()); } } } } }</code><technical_language>is stream closed? a try resources statement. moved code fix touch code</technical_language>

Target:
private void assignNewImage(URI pagesDirectory, String currentPngFile) { File temporaryTifFile = null; try { temporaryTifFile = File.createTempFile("tempTif_", ".tif"); } catch (IOException e) { logger.error(e); } if (this.image != null) { try { URI tifFile = this.currentTifFolder.resolve(this.image); logger.trace("tiffconverterpfad: {}", tifFile); if (!fileService.fileExist(tifFile)) { tifFile = serviceManager.getProcessService().getImagesTifDirectory(true, this.process) .resolve(this.image); Helper.setFehlerMeldung("formularOrdner:TifFolders", "", "image " + this.image + " does not exist in folder " + this.currentTifFolder + ", using image from " + new File(serviceManager.getProcessService().getImagesTifDirectory(true, this.process)) .getName()); } try (InputStream tifFileInputStream = fileService.read(tifFile)) { if (temporaryTifFile != null) { FileUtils.copyInputStreamToFile(tifFileInputStream, temporaryTifFile); this.imageHelper.scaleFile(temporaryTifFile.toURI(), pagesDirectory.resolve(currentPngFile), this.imageSize, this.imageRotation); logger.trace("scaleFile"); } } } catch (Exception e) { Helper.setFehlerMeldung("could not getById image folder", e); logger.error(e); } finally { if (temporaryTifFile != null) { try { if (!fileService.delete(temporaryTifFile.toURI())) { logger.error( "Error while deleting temporary tif file: " + temporaryTifFile.getAbsolutePath()); } } catch (IOException e) { logger.error("Error while deleting temporary tif file: " + e.getMessage()); } } } } }
Source:
<code><START> LeftCompareScript(final ScriptContainer<?> script, final AdapterFactoryLabelProvider labelProvider) { <END> super(script, labelProvider); }</code><technical_language>a constructor Default package</technical_language>

Target:
protected LeftCompareScript(final ScriptContainer<?> script, final AdapterFactoryLabelProvider labelProvider) { super(script, labelProvider); }