auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void readCacheStorageTest() { CacheStorageImpl cache = new CacheStorageImpl(); final Map<Identifier, OperatorState> queryState1= new HashMap<>(); queryState1.put(oid1, value1); queryState1.put(oid2, value2); cache.create(qid1, queryState1); Assert.assertEquals(value1, cache.read(qid1, oid1)); Assert.assertEquals(value2, cache.read(qid1, oid2)); Assert.assertSame(null, cache.read(qid1, oid3)); Assert.assertSame(null, cache.read(qid2, oid1)); Assert.assertSame(null, cache.read(qid2, oid3)); }

Target:
public void readCacheStorageTest() { final CacheStorage cache = new CacheStorageImpl(); final Map<Identifier, OperatorState> queryState1 = new HashMap<>(); queryState1.put(oid1, value1); queryState1.put(oid2, value2); cache.create(qid1, queryState1); Assert.assertEquals(value1, cache.read(qid1, oid1)); Assert.assertEquals(value2, cache.read(qid1, oid2)); Assert.assertSame(null, cache.read(qid1, oid3)); Assert.assertSame(null, cache.read(qid2, oid1)); Assert.assertSame(null, cache.read(qid2, oid3)); }
Source:
private static void checkLfs() { IPreferenceStore store = Activator.getDefault().getPreferenceStore(); boolean hidden = !store.getBoolean(UIPreferences.SHOW_LFS_CONFIG_CONFIRMATION); boolean auto = store.getBoolean(UIPreferences.LFS_AUTO_CONFIGURATION); if ((auto || !hidden) && !isLfsConfigured()) { Callable<?> installer; try { installer = (Callable<?>) Class.forName("org.eclipse.jgit.lfs.InstallLfsCommand").newInstance(); } catch(Exception e) { return; } int index = (auto && hidden) ? 0 : MessageDialog.open(MessageDialog.QUESTION, null, UIText.ConfigurationChecker_installLfsTitle, UIText.ConfigurationChecker_installLfsMessage, SWT.NONE, UIText.ConfigurationChecker_installLfsYes, UIText.ConfigurationChecker_installLfsNo, UIText.ConfigurationChecker_installLfsDontAsk); switch (index) { case 0: try { installer.call(); } catch (Exception e) { Activator.handleIssue(IStatus.WARNING, UIText.ConfigurationChecker_installLfsCannotInstall, e, true); } break; case 2: store.setValue(UIPreferences.SHOW_LFS_CONFIG_CONFIRMATION, false); try { InstanceScope.INSTANCE.getNode(Activator.getPluginId()) .flush(); } catch (BackingStoreException e) { } break; } } }

Target:
private static void checkLfs() { IPreferenceStore store = Activator.getDefault().getPreferenceStore(); boolean hidden = !store.getBoolean(UIPreferences.SHOW_LFS_CONFIG_CONFIRMATION); boolean auto = store.getBoolean(UIPreferences.LFS_AUTO_CONFIGURATION); if ((auto || !hidden) && !isLfsConfigured()) { Callable<?> installer; try { installer = (Callable<?>) Class.forName("org.eclipse.jgit.lfs.InstallLfsCommand").newInstance(); } catch(Exception e) { return; } int index = (auto && hidden) ? 0 : confirmLfsInstall(); switch (index) { case 0: try { installer.call(); } catch (Exception e) { Activator.handleIssue(IStatus.WARNING, UIText.ConfigurationChecker_installLfsCannotInstall, e, true); } break; case 2: store.setValue(UIPreferences.SHOW_LFS_CONFIG_CONFIRMATION, false); try { InstanceScope.INSTANCE.getNode(Activator.getPluginId()) .flush(); } catch (BackingStoreException e) { } break; } } }
Source:
protected String getOutputStream(String commandId) { String outputStream = EXPOSE_BLOB_STREAM; BulkCommand command = Framework.getService(BulkService.class).getCommand(commandId); if (command != null) { if (command.getParam(SORT_PARAMETER) != null) { sort = command.getParam(SORT_PARAMETER); } if (command.getParam(ZIP_PARAMETER) != null) { zip = command.getParam(ZIP_PARAMETER); } } if (sort) { outputStream = SORT_STREAM; } else if (zip) { outputStream = ZIP_STREAM; } return outputStream; }

Target:
protected String getOutputStream(String commandId) { String outputStream = EXPOSE_BLOB_STREAM; BulkCommand command = Framework.getService(BulkService.class).getCommand(commandId); boolean sort = true; boolean zip = false; if (command != null) { if (command.getParam(SORT_PARAMETER) != null) { sort = command.getParam(SORT_PARAMETER); } if (command.getParam(ZIP_PARAMETER) != null) { zip = command.getParam(ZIP_PARAMETER); } } if (sort) { outputStream = SORT_STREAM; } else if (zip) { outputStream = ZIP_STREAM; } return outputStream; }
Source:
public void purgeCondition(Condition condition) throws APIException { conditionDAO.deleteCondition(condition); }

Target:
public void purgeCondition(Condition condition) { conditionDAO.deleteCondition(condition); }
Source:
public BitOutputStream(Object outputBase, long outputAddress, int outputSize) { checkArgument(outputSize >= SIZE_OF_LONG, "Output buffer too small"); this.outputBase = outputBase; container = 0; bitCount = 0; this.outputAddress = outputAddress; outputLimit = this.outputAddress + outputSize - SIZE_OF_LONG; currentAddress = this.outputAddress; }

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:
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 + " 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; }

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:
private void initSharedCache(Configuration conf) { synchronized (lock) { if (!sharedCacheInited) { sharedCacheInited = true; } else { return; } } SharedCache.Builder builder = new SharedCache.Builder(); builder.configuration(conf).build(sharedCache); }

Target:
private void initSharedCache(Configuration conf) { synchronized (lock) { if (!sharedCacheInited) { sharedCacheInited = true; sharedCache.initialize(conf); } } }
Source:
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) { setPieChartsVisible(false); } else { setPieChartsVisible(true); } Display.getDefault().asyncExec(new Runnable() { @Override public void run() { if (!viewerControl.isDisposed()) { fPieChartViewer.refresh(refreshGlobal, refreshSelection); } } }); }

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:
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;"); String script = String.format(builder.toString(), moduleName, parameters.toCompactString()); 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); } }

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:
public ITextComponent getName() { return new TextComponentString(UtilLib.translate("entity.vampirism.vampire.name") + " " + (nil() ? super.getName() : entityCreature.getName())); }

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

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:
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); }

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:
private <T> T testLockReport(SupplierWithException<T> supplier, String expectedLockReportRegex) throws Exception { 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; }

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:
public RealmAwareZkClient getByteArrayRealmAwareZkClient() { 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; }

Target:
public RealmAwareZkClient getByteArrayRealmAwareZkClient() { if (_byteArrayZkClient == null) { synchronized (this) { if (_byteArrayZkClient == null) { _byteArrayZkClient = createRealmAwareZkClient(_byteArrayZkClient, false, new ByteArraySerializer()); } } } return _byteArrayZkClient; }
Source:
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 ); } } return "{ waitSeconds: " + waitTime + ", paths: {}, shim: {}, " + "map: { \"*\": }, bundles: {}, config: { \"pentaho/service\": }, packages: };\n"; }

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:
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){ LOGGER.warning("flush: could not publish data: " + e.getMessage()); } writeBuffer.clear(); }

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:
public List<Cohort> getCohortsContainingPatientId(Integer patientId) throws DAOException { return (List<Cohort>) sessionFactory.getCurrentSession().createCriteria(Cohort.class) .add(Restrictions.eq("voided", false)) .createAlias("members", "m") .createAlias("m.patientId", "p") .add(Restrictions.eq("p.patientId", patientId)) .list(); }

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

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:
private static boolean isSpecialInvalid(final String hostname, final Promise<?> promise) { if (INVALID.equalsIgnoreCase(hostname)) { promise.setFailure(StacklessUnknownHostException.newInstance( "Special domain name \"invalid.\" always returns NXDOMAIN", DnsNameResolver.class, "doResolve(...)")); return true; } return false; }

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:
public DatabasePeerManager(Context context, DatabaseFilesProvider databaseFilesProvider) { mContext = context; this.mDatabaseFilesProvider = databaseFilesProvider; setListener(mPeerRegistrationListener); }

Target:
public DatabasePeerManager(Context context, DatabaseFilesProvider databaseFilesProvider) { mContext = context; mDatabaseFilesProvider = databaseFilesProvider; setListener(mPeerRegistrationListener); }
Source:
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()) { throw new DatastreamRuntimeException(String.format("Validation failed after assignment, assigned partitions " + "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)); } }

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:
public List<Group> getAll() throws SecurityManagementException { final List<Group> roles = new LinkedList<>(); final RolesResource[] rolesResource = new RolesResource[1]; consumeRealm(realmResource -> { rolesResource[0] = getRolesResource(realmResource, useResourceRoleMapping); 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; }

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:
private void parse() { if (syntaxTree == null) { parsingPage = new ParsingPage(new WikiSourcePage(this), getVariableSource(), urlParams); syntaxTree = Parser.make(parsingPage, getData().getContent()).parse(); } }

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:
@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().cache().enableStatistics(cacheNames, enabled); return TRUE; } default: return super.processInStreamOutLong(type, reader); } }

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:
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); throw new LogReplicationDiscoveryServiceException(message); } } catch (Exception e) { String message = "Caught exception while fetching topology. Log Replication cannot start."; log.error(message, e); throw new LogReplicationDiscoveryServiceException(message); } }

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:
public void shouldReturnAuthorisationRejectedStatusFromValue2() throws Exception { InterpretedStatus status = EpdqStatusMapper.get().from("2", AUTHORISATION_SUBMITTED); assertThat(status.getType(), is(InterpretedStatus.Type.CHARGE_STATUS)); assertThat(((MappedChargeStatus) status).getChargeStatus(), is(AUTHORISATION_REJECTED)); }

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:
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"); s += "|item:" + ((item != null) ? item.getName() : "null_item"); return (s); }

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:
public List<@NonNull ITimeGraphEntry> getChildren() { return Collections.<@NonNull ITimeGraphEntry>emptyList(); }

Target:
public List<@NonNull ITimeGraphEntry> getChildren() { return null; }
Source:
default boolean isUnallowed(@Nullable ItemStack item) { if (item == null) { return false; } SlimefunItem sfItem = SlimefunItem.getByItem(item); return sfItem != null && !(sfItem instanceof VanillaItem) && !sfItem.isDisabled(); }

Target:
default boolean isUnallowed(@Nullable ItemStack item) { if (item == null) { return false; } SlimefunItem sfItem = SlimefunItem.getByItem(item); return isUnallowed(sfItem); }
Source:
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) { Handler mainHandler = new Handler(Sentry.getInstance().context.getMainLooper()); Runnable runnable = new Runnable() { @Override public void run() { doCaptureEventPost(requestData); } }; mainHandler.post(runnable); } }

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:
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; }

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:
public ResponseEntity<?> getAllCategories() { String username = ControllerUtil.getCurrentLoggedUsername(); List<Category> categoryList = categoryDao.findCategoriesByUsername(username); if(categoryList.isEmpty()){ return new ResponseEntity<String>(HttpStatus.NO_CONTENT); } return new ResponseEntity<List<Category>>(categoryList, HttpStatus.OK); }

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:
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) { assertTrue("Exception on @Explain of windowed expression", false); } }

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:
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 RuntimeException(e); } }

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:
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); } } return null; }

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:
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); this.webServiceResponseMessageSender.send( ResponseMessage.newResponseMessageBuilder() .withCorrelationUid(deviceMessageMetadata.getCorrelationUid()) .withOrganisationIdentification(deviceMessageMetadata.getOrganisationIdentification()) .withDeviceIdentification(deviceMessageMetadata.getDeviceIdentification()).withResult(result) .withOsgpException(exception).withDataObject(alarmRegisterValueDomain) .withMessagePriority(deviceMessageMetadata.getMessagePriority()).build(), deviceMessageMetadata.getMessageType()); }

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:
private Set<String> getScopes(SingularityAuthorizationScope scope) { switch (scope) { case READ: return Sets.union(scopesConfiguration.getRead(), scopesConfiguration.getWrite()); case WRITE: return scopesConfiguration.getWrite(); case DEPLOY: return scopesConfiguration.getDeploy().isEmpty() ? scopesConfiguration.getWrite() : scopesConfiguration.getDeploy(); case EXEC: return scopesConfiguration.getExec(); case ADMIN: default: return scopesConfiguration.getAdmin(); } }

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:
private void handleLogReplicationEntry(CorfuPayloadMsg<LogReplicationEntry> msg, ChannelHandlerContext ctx, IServerRouter r) { log.info("Log Replication Entry received by Server."); 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(ctx, msg, CorfuMsgType.LOG_REPLICATION_ENTRY.payloadMsg(ack)); } }

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:
public int hashCode() { return _nuageVspEntity != null ? _nuageVspEntity.hashCode() : 0; }

Target:
public int hashCode() { int result = super.hashCode(); result = 31 * result + (_nuageVspEntity != null ? _nuageVspEntity.hashCode() : 0); return result; }
Source:
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); long softExpiryTime = System.currentTimeMillis() + ttlInMillis; 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; }

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:
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()); User u = new User(); 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; }

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:
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()); } 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()); } } } } }

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:
LeftCompareScript(final ScriptContainer<?> script, final AdapterFactoryLabelProvider labelProvider) { super(script, labelProvider); }

Target:
protected LeftCompareScript(final ScriptContainer<?> script, final AdapterFactoryLabelProvider labelProvider) { super(script, labelProvider); }
Source:
private String convertListToString(ModelNode modelNode) { StringBuffer sb = new StringBuffer(); String[] ss = strip(modelNode.asString().trim(), '[', ']').split(","); boolean first = true; for (String s : ss) { if (first) { first = false; } else { sb.append(","); } sb.append(strip(s.trim(), '"', '"')); } return sb.toString(); }

Target:
private String convertListToString(ModelNode modelNode) { StringBuilder sb = new StringBuilder(); boolean first = true; for (ModelNode value : modelNode.asList()) { if (first) { first = false; } else { sb.append(","); } sb.append(value.asString()); } return sb.toString(); }