auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private synchronized boolean isInDateFormat(String dateString, DateFormat dateFormat) { try { dateFormat.parse(dateString); return true; } catch (ParseException e) { return false; } }

Target:
private boolean isInDateFormat(String dateString, DateFormat dateFormat) { try { dateFormat.parse(dateString); return true; } catch (ParseException e) { return false; } }
Source:
public TDClient createClient(SystemDefaultConfig systemDefaultConfig, Map<String, String> env, Config params, SecretProvider secrets) { logger.info("YY createClient called"); return clientFromConfig(systemDefaultConfig, env, params, secrets); }

Target:
public TDClient createClient(SystemDefaultConfig systemDefaultConfig, Map<String, String> env, Config params, SecretProvider secrets) { return clientFromConfig(systemDefaultConfig, env, params, secrets); }
Source:
public static LogResult postLog(final Geocache cache, final LogType logType, final Calendar date, final String log, boolean isRetry) { final Parameters params = new Parameters("cache_id", cache.getGeocode()); params.add("type", logType.type); params.add("log", log); params.add("date", LOG_DATE_FORMAT.format(date.getTime())); final String uri = "<LINK_0>"; final HttpResponse response = Network.postRequest(uri, params); if (response == null) { return new LogResult(StatusCode.LOG_POST_ERROR_EC, ""); } if (!isRetry && response.getStatusLine().getStatusCode() == 403) { if (ECLogin.login() == StatusCode.NO_ERROR) { apiRequest(uri, params, true); } } if (response.getStatusLine().getStatusCode() != 200) { return new LogResult(StatusCode.LOG_POST_ERROR_EC, ""); } final String data = Network.getResponseDataAlways(response); if (data != null && !StringUtils.isBlank(data) && StringUtils.contains(data, "success")) { final String uid = StringUtils.remove(data, "success:"); return new LogResult(StatusCode.NO_ERROR, uid); } return new LogResult(StatusCode.LOG_POST_ERROR_EC, ""); }

Target:
public static LogResult postLog(final Geocache cache, final LogType logType, final Calendar date, final String log, boolean isRetry) { final Parameters params = new Parameters("cache_id", cache.getGeocode()); params.add("type", logType.type); params.add("log", log); params.add("date", LOG_DATE_FORMAT.format(date.getTime())); final String uri = API_HOST + "log.php"; final HttpResponse response = Network.postRequest(uri, params); if (response == null) { return new LogResult(StatusCode.LOG_POST_ERROR_EC, ""); } if (!isRetry && response.getStatusLine().getStatusCode() == 403) { if (ECLogin.login() == StatusCode.NO_ERROR) { apiRequest(uri, params, true); } } if (response.getStatusLine().getStatusCode() != 200) { return new LogResult(StatusCode.LOG_POST_ERROR_EC, ""); } final String data = Network.getResponseDataAlways(response); if (!StringUtils.isBlank(data) && StringUtils.contains(data, "success")) { final String uid = StringUtils.remove(data, "success:"); return new LogResult(StatusCode.NO_ERROR, uid); } return new LogResult(StatusCode.LOG_POST_ERROR_EC, ""); }
Source:
protected void rotate() { for (RotatingMap map : spoutTasksToRotatingMap.values()) { map.rotate(); } looper.registerTimerEvent(rotateInterval, this::rotate); }

Target:
protected void rotate() { for (RotatingMap map : spoutTasksToRotatingMap.values()) { map.rotate(); } Runnable r = new Runnable() { @Override public void run() { rotate(); } }; looper.registerTimerEvent(rotateInterval, r); }
Source:
protected void run(RegistrationClient regClient) throws Exception { List<BookieSocketAddress> bookies = Lists.newArrayList(); if (readwrite) { bookies.addAll( result( regClient.getWritableBookies() ).getValue() ); bookies.addAll( result( regClient.getReadOnlyBookies() ).getValue() ); } else if (readonly) { bookies.addAll( result( regClient.getReadOnlyBookies() ).getValue() ); } for (BookieSocketAddress b : bookies) { System.out.println(getBookieSocketAddrStringRepresentation(b)); } if (bookies.isEmpty()) { System.err.println("No bookie exists!"); } }

Target:
protected void run(RegistrationClient regClient) throws Exception { if (!readwrite && !readonly) { readwrite = true; readonly = true; } boolean hasBookies = false; if (readwrite) { Set<BookieSocketAddress> bookies = result( regClient.getWritableBookies() ).getValue(); if (!bookies.isEmpty()) { System.out.println("ReadWrite Bookies :"); printBookies(bookies); hasBookies = true; } } if (readonly) { Set<BookieSocketAddress> bookies = result( regClient.getReadOnlyBookies() ).getValue(); if (!bookies.isEmpty()) { System.out.println("Readonly Bookies :"); printBookies(bookies); hasBookies = true; } } if (!hasBookies) { System.err.println("No bookie exists!"); } }
Source:
public void handleCancelOk(String consumerTag) { if (this.logger.isDebugEnabled()) { this.logger.debug("CancelOk " + this); } synchronized (DirectMessageListenerContainer.this.consumersMonitor) { DirectMessageListenerContainer.this.cancellationLock.release(this); DirectMessageListenerContainer.this.consumers.remove(this); } RabbitUtils.closeChannel(getChannel()); }

Target:
public void handleCancelOk(String consumerTag) { if (this.logger.isDebugEnabled()) { this.logger.debug("CancelOk " + this); } removeConsumer(); }
Source:
public void analyze(UUID userAnonymizedId, UUID deviceAnonymizedId, AppActivitiesDto appActivities) { UserAnonymizedDto userAnonymized = userAnonymizedService.getUserAnonymized(userAnonymizedId); DeviceAnonymizedDto deviceAnonymized = deviceService.getDeviceAnonymized(userAnonymized, deviceAnonymizedId); Duration deviceTimeOffset = determineDeviceTimeOffset(appActivities); ActivityPayload[] activityPayloads = appActivities.getActivitiesSorted().stream() .map(appActivity -> createActivityPayload(deviceTimeOffset, appActivity, userAnonymized, deviceAnonymized)) .toArray(ActivityPayload[]::new); analyze(activityPayloads); }

Target:
public void analyze(UUID userAnonymizedId, UUID deviceAnonymizedId, AppActivitiesDto appActivities) { UserAnonymizedDto userAnonymized = userAnonymizedService.getUserAnonymized(userAnonymizedId); DeviceAnonymizedDto deviceAnonymized = deviceService.getDeviceAnonymized(userAnonymized, deviceAnonymizedId); Duration deviceTimeOffset = determineDeviceTimeOffset(appActivities); List<ActivityPayload> activityPayloads = appActivities.getActivitiesSorted().stream() .map(appActivity -> createActivityPayload(deviceTimeOffset, appActivity, userAnonymized, deviceAnonymized)) .collect(Collectors.toList()); analyze(activityPayloads, userAnonymized); }
Source:
private static void updatePscanTagMailtoPattern(XMLConfiguration config) { String autoTagScannersKey = "pscans.autoTagScanners.scanner"; List<HierarchicalConfiguration> tagScanners = config.configurationsAt(autoTagScannersKey); String badPattern = "<.*href\\s*['\"]?mailto:"; String goodPattern = "<.*href\\s*=['\"]?mailto:"; for (int i = 0, size = tagScanners.size(); i < size; ++i) { String elementBaseKey = autoTagScannersKey + "(" + i + ")."; String currentKeyResBodyRegex = elementBaseKey + "resBodyRegex"; if (config.getProperty(currentKeyResBodyRegex).equals(badPattern)) { config.setProperty(currentKeyResBodyRegex, goodPattern); break; } } try { config.save(); } catch (ConfigurationException ce) { LOG.warn("Unable to save config after upgrading MailTo autoTagScanner", ce); } }

Target:
private static void updatePscanTagMailtoPattern(XMLConfiguration config) { String autoTagScannersKey = "pscans.autoTagScanners.scanner"; List<HierarchicalConfiguration> tagScanners = config.configurationsAt(autoTagScannersKey); String badPattern = "<.*href\\s*['\"]?mailto:"; String goodPattern = "<.*href\\s*=\\s*['\"]?mailto:"; for (int i = 0, size = tagScanners.size(); i < size; ++i) { String currentKeyResBodyRegex = autoTagScannersKey + "(" + i + ").resBodyRegex"; if (config.getProperty(currentKeyResBodyRegex).equals(badPattern)) { config.setProperty(currentKeyResBodyRegex, goodPattern); break; } } }
Source:
protected void onPostExecute(final String response) { if (response != null) { try { final JsonObject githubStableObject = JsonParser.object().from(response) .getObject("flavors").getObject("github").getObject("stable"); System.err.println("appelflapsausautomaat"); System.err.println(JsonWriter.string(githubStableObject)); final String versionName = githubStableObject.getString("version"); final int versionCode = githubStableObject.getInt("version_code"); final String apkLocationUrl = githubStableObject.getString("apk"); compareAppVersionAndShowNotification(versionName, apkLocationUrl, versionCode); } catch (JsonParserException e) { if (DEBUG) { Log.w(TAG, Log.getStackTraceString(e)); } } } }

Target:
protected void onPostExecute(final String response) { if (response != null) { try { final JsonObject githubStableObject = JsonParser.object().from(response) .getObject("flavors").getObject("github").getObject("stable"); final String versionName = githubStableObject.getString("version"); final int versionCode = githubStableObject.getInt("version_code"); final String apkLocationUrl = githubStableObject.getString("apk"); compareAppVersionAndShowNotification(versionName, apkLocationUrl, versionCode); } catch (JsonParserException e) { if (DEBUG) { Log.w(TAG, Log.getStackTraceString(e)); } } } }
Source:
protected Traverser<GraphQLType> initTraverser() { return Traverser.depthFirst(getChildren); }

Target:
private Traverser<GraphQLType> initTraverser() { return Traverser.depthFirst(getChildren); }
Source:
public static String convertEOL(String input, EOLType type) { input = input.replace("\r\n","\n"); input = input.replace("\r","\n"); if (EOLType.Unix == type) { return input; } input = input.replace("\n","\r\n"); return input; }

Target:
public static String convertEOL(String input, EOLType type) { if (null == input || 0 == input.length()) { return input; } input = input.replace("\r\n","\n"); input = input.replace("\r","\n"); switch (type) { case CR: case Mac: input = input.replace("\n", "\r"); break; case CRLF: case Windows: input = input.replace("\n", "\r\n"); break; default: case LF: case Unix: return input; case LFCR: input = input.replace("\n", "\n\r"); break; } return input; }
Source:
protected void addColumns() { for (ActionParameter actionParameter: actionsTable.getActionParameters()) { String columnName = actionParameter.getName(); TableViewerColumn column = createColumn( columnName, 2, new DataboundCellLabelProvider<ScriptGeneratorAction>(observeProperty(columnName)) { @Override protected String stringFromRow(ScriptGeneratorAction row) { return row.getActionParameterValue(columnName); } }); column.setEditingSupport(new StringEditingSupport<ScriptGeneratorAction>(viewer(), ScriptGeneratorAction.class) { @Override protected String valueFromRow(ScriptGeneratorAction row) { return row.getActionParameterValue(columnName); } @Override protected void setValueForRow(ScriptGeneratorAction row, String value) { row.setActionParameterValue(columnName, value); } }); } }

Target:
protected void addColumns() { for (ActionParameter actionParameter: actionsTable.getActionParameters()) { String columnName = actionParameter.getName(); TableViewerColumn column = createColumn( columnName, 2, new DataboundCellLabelProvider<ScriptGeneratorAction>(observeProperty(columnName)) { @Override protected String stringFromRow(ScriptGeneratorAction row) { return row.getActionParameterValue(actionParameter); } }); column.setEditingSupport(new StringEditingSupport<ScriptGeneratorAction>(viewer(), ScriptGeneratorAction.class) { @Override protected String valueFromRow(ScriptGeneratorAction row) { return row.getActionParameterValue(actionParameter); } @Override protected void setValueForRow(ScriptGeneratorAction row, String value) { row.setActionParameterValue(actionParameter, value); } }); } }
Source:
private Map<String, String> parsePanickedAttributes() { List<String> buffer = ContainerUtil.newArrayList(); Matcher matcher; int i = myStdOut.size() - 1; while (StringUtil.isEmptyOrSpaces(myStdOut.get(i))) { --i; } while (!StringUtil.isEmptyOrSpaces(myStdOut.get(i))) { buffer.add(myStdOut.get(i)); --i; } Collections.reverse(buffer); String details = StringUtil.join(buffer, ""); --i; String errorMessage = ""; if ((matcher = PANIC_VALUE.matcher(myStdOut.get(i))).matches()) { String stdoutLeftover = matcher.group(1); if (!StringUtil.isEmptyOrSpaces(stdoutLeftover)) { myStdOut.set(i, stdoutLeftover); ++i; } errorMessage = matcher.group(2); } Map<String, String> attributes = ContainerUtil.newHashMap(); attributes.put("message", errorMessage); attributes.put("details", details); myStdOut = myStdOut.subList(0, i); return attributes; }

Target:
private Map<String, String> parsePanickedAttributes() { assert myStdOut != null: "expected to be called from a context where myStdOut is not null"; int i = myStdOut.size() - 1; Map<String, String> attributes = ContainerUtil.newHashMap(); try { List<String> buffer = ContainerUtil.newArrayList(); Matcher matcher; while (StringUtil.isEmptyOrSpaces(myStdOut.get(i))) { --i; }; while (!StringUtil.isEmptyOrSpaces(myStdOut.get(i))) { buffer.add(myStdOut.get(i--)); } Collections.reverse(buffer); attributes.put("details", StringUtil.join(buffer, "")); --i; String errorMessage = ""; if ((matcher = PANIC_VALUE.matcher(myStdOut.get(i))).matches()) { String stdoutLeftover = matcher.group(1); if (!StringUtil.isEmptyOrSpaces(stdoutLeftover)) { myStdOut.set(i, stdoutLeftover); ++i; } errorMessage = matcher.group(2); } attributes.put("message", errorMessage); } catch (IndexOutOfBoundsException e) { return Collections.emptyMap(); } myStdOut = myStdOut.subList(0, i); return attributes; }
Source:
protected void initialize() { DefaultListModel<CharsetEntry> defaultListModel = new DefaultListModel<>(); for (CharsetEntry commonCharsetEntry : commonCharsetEntries) { try { if (Charset.isSupported(commonCharsetEntry.getCharsetName())) { defaultListModel.addElement(commonCharsetEntry); } } catch (IllegalCharsetNameException e) { } } SortedMap<String,Charset> charsetSortedMap = Charset.availableCharsets(); for (Map.Entry<String, Charset> charsetMapEntry : charsetSortedMap.entrySet()) { CharsetEntry charsetEntry = new CharsetEntry(charsetMapEntry.getValue().displayName(), charsetMapEntry.getKey()); if (!defaultListModel.contains(charsetEntry)) { defaultListModel.addElement(charsetEntry); } } listCharset.setModel(defaultListModel); if (defaultListModel.size() > 0) { listCharset.setSelectedIndex(0); listCharset.addListSelectionListener(e -> updatePreview()); } else { JOptionPane.showMessageDialog(this, "It appears that your installed Java Runtime Environment does not support any charset encodings!", "Error", JOptionPane.ERROR_MESSAGE); } }

Target:
protected void initialize() { DefaultListModel<CharsetEntry> defaultListModel = new DefaultListModel<>(); for (CharsetEntry commonCharsetEntry : commonCharsetEntries) { try { if (Charset.isSupported(commonCharsetEntry.getCharsetName())) { defaultListModel.addElement(commonCharsetEntry); } } catch (IllegalCharsetNameException e) { } } SortedMap<String,Charset> charsetSortedMap = Charset.availableCharsets(); for (Map.Entry<String, Charset> charsetMapEntry : charsetSortedMap.entrySet()) { CharsetEntry charsetEntry = new CharsetEntry(charsetMapEntry.getValue().displayName(), charsetMapEntry.getKey()); if (!defaultListModel.contains(charsetEntry)) { defaultListModel.addElement(charsetEntry); } } listCharset.setModel(defaultListModel); if (defaultListModel.size() > 0) { listCharset.setSelectedIndex(0); listCharset.addListSelectionListener(__ -> updatePreview()); } else { JOptionPane.showMessageDialog(this, "It appears that your installed Java Runtime Environment does not support any charset encodings!", "Error", JOptionPane.ERROR_MESSAGE); } }
Source:
public void stop() { try { cloudTable.deleteIfExists(); } catch (StorageException e) { LOG.error("Azure Storage failed when creating a table", e); } taskNames.clear(); }

Target:
public void stop() { }
Source:
public void removeFromTabListDelayed(@Nullable final ServerPlayerEntity player, final SPlayerListItemPacket removePacket) { final int delay = SpongeImpl.getGlobalConfigAdapter().getConfig().getEntity().getHumanPlayerListRemoveDelay(); final Runnable removeTask = () -> this.pushPackets(player, removePacket); if (delay == 0) { removeTask.run(); } else { SpongeImpl.getGame().getAsyncScheduler().submit(Task.builder() .execute(removeTask) .delayTicks(delay) .plugin(SpongeImpl.getPlugin()) .build()); } }

Target:
public void removeFromTabListDelayed(@Nullable final ServerPlayerEntity player, final SPlayerListItemPacket removePacket) { final int delay = SpongeImpl.getGlobalConfigAdapter().getConfig().getEntity().getHumanPlayerListRemoveDelay(); final Runnable removeTask = () -> this.pushPackets(player, removePacket); if (delay == 0) { removeTask.run(); } else { Sponge.getServer().getScheduler().submit(Task.builder() .execute(removeTask) .delayTicks(delay) .plugin(SpongeImpl.getPlugin()) .build()); } }
Source:
static ConfigDef getConfigDefFromTransformation(String key, Class<?> transformationCls) { if (transformationCls == null || !Transformation.class.isAssignableFrom(transformationCls)) { throw new ConfigException(key, String.valueOf(transformationCls), "Not a Transformation"); } if (Modifier.isAbstract(transformationCls.getModifiers())) { String[] childClasses = Stream.of(transformationCls.getClasses()) .filter(transformationCls::isAssignableFrom) .filter(c -> !Modifier.isAbstract(c.getModifiers())) .filter(c -> Modifier.isPublic(c.getModifiers())) .map(Class::getName) .toArray(String[]::new); String message = childClasses.length > 0 ? "Transformation is abstract and cannot be created. Did you mean " + String.join(", ", childClasses) + "?" : "Transformation is abstract and cannot be created."; throw new ConfigException(key, String.valueOf(transformationCls), message); } Transformation transformation; try { transformation = transformationCls.asSubclass(Transformation.class).newInstance(); } catch (Exception e) { ConfigException exception = new ConfigException(key, String.valueOf(transformationCls), "Error getting config definition from Transformation: " + e.getMessage()); exception.initCause(e); throw exception; } ConfigDef configDef = transformation.config(); if (null == configDef) { throw new ConnectException( String.format( "%s.config() must return a ConfigDef that is not null.", transformationCls.getName() ) ); } return configDef; }

Target:
static ConfigDef getConfigDefFromTransformation(String key, Class<?> transformationCls) { if (transformationCls == null || !Transformation.class.isAssignableFrom(transformationCls)) { throw new ConfigException(key, String.valueOf(transformationCls), "Not a Transformation"); } if (Modifier.isAbstract(transformationCls.getModifiers())) { String childClassNames = Stream.of(transformationCls.getClasses()) .filter(transformationCls::isAssignableFrom) .filter(c -> !Modifier.isAbstract(c.getModifiers())) .filter(c -> Modifier.isPublic(c.getModifiers())) .map(Class::getName) .collect(Collectors.joining(", ")); String message = childClassNames.trim().isEmpty() ? "Transformation is abstract and cannot be created." : "Transformation is abstract and cannot be created. Did you mean " + childClassNames + "?"; throw new ConfigException(key, String.valueOf(transformationCls), message); } Transformation transformation; try { transformation = transformationCls.asSubclass(Transformation.class).newInstance(); } catch (Exception e) { ConfigException exception = new ConfigException(key, String.valueOf(transformationCls), "Error getting config definition from Transformation: " + e.getMessage()); exception.initCause(e); throw exception; } ConfigDef configDef = transformation.config(); if (null == configDef) { throw new ConnectException( String.format( "%s.config() must return a ConfigDef that is not null.", transformationCls.getName() ) ); } return configDef; }
Source:
public MetricsMode register(MetricsMode mode) { metricsModes.add(mode); return mode; }

Target:
public boolean register(MetricsMode mode) { Preconditions.checkNotNull(mode, "Illegal argument passed, mode is null."); if (!modes.contains(mode)) { return modes.add(mode); } else { return false; } }
Source:
final protected void executeValidatedCommands(CommandBase<?> command) { if (command.getReturnValue().getCanDoAction()) { String correlationId = command.getParameters().getCorrelationId(); command.setCorrelationId(correlationId); if (executionContext == null || executionContext.isMonitored()) { ExecutionHandler.prepareCommandForMonitoring(command, command.getActionType(), command.isInternalExecution(), correlationId); } ThreadLocalParamsContainer.setCorrelationId(correlationId); command.ExecuteAction(); } }

Target:
final protected void executeValidatedCommands(CommandBase<?> command) { if (command.getReturnValue().getCanDoAction()) { if (executionContext == null || executionContext.isMonitored()) { ExecutionHandler.prepareCommandForMonitoring(command, command.getActionType(), command.isInternalExecution()); } ThreadLocalParamsContainer.setCorrelationId(command.getCorrelationId()); command.ExecuteAction(); } }
Source:
protected boolean validate() { if (getParameters() == null || getParameters().getAgent() == null || getParameters().getAgent().getIp() == null || getParameters().getAgent().getHostId() == null || getParameters().getAgent().getPassword() == null || getParameters().getAgent().getType() == null || getParameters().getAgent().getUser() == null) { return failValidation(EngineMessage.VDS_ADD_FENCE_AGENT_MANDATORY_PARAMETERS_MISSING); } Guid vdsId = getParameters().getAgent().getHostId(); VDS vds = vdsDao.get(vdsId); Guid vdsClusterId = vds.getClusterId(); Cluster cluster = clusterDao.get(vdsClusterId); String clusterCompatibilityVersion = cluster.getCompatibilityVersion().toString(); if (!Regex.isMatch(FenceConfigHelper.getFenceConfigurationValue(ConfigValues.VdsFenceType.name(), clusterCompatibilityVersion), String.format("(,|^)%1$s(,|$)", getParameters().getAgent().getType()))) { return failValidation(EngineMessage.ACTION_TYPE_FAILED_AGENT_NOT_SUPPORTED); } return super.validate(); }

Target:
protected boolean validate() { if (getParameters() == null || getParameters().getAgent() == null || getParameters().getAgent().getIp() == null || getParameters().getAgent().getHostId() == null || getParameters().getAgent().getPassword() == null || getParameters().getAgent().getType() == null || getParameters().getAgent().getUser() == null) { return failValidation(EngineMessage.VDS_ADD_FENCE_AGENT_MANDATORY_PARAMETERS_MISSING); } Guid vdsId = getParameters().getAgent().getHostId(); VDS vds = vdsDao.get(vdsId); Guid vdsClusterId = vds.getClusterId(); Cluster cluster = clusterDao.get(vdsClusterId); String clusterCompatibilityVersion = cluster.getCompatibilityVersion().toString(); if (!FenceConfigHelper.getValidFenceAgentTypes(clusterCompatibilityVersion) .contains(getParameters().getAgent().getType())) { return failValidation(EngineMessage.ACTION_TYPE_FAILED_AGENT_NOT_SUPPORTED); } return super.validate(); }
Source:
private void setClasspath(IProject project, IFeatureModel model, IProgressMonitor monitor) throws JavaModelException { IJavaProject jProject = JavaCore.create(project); IClasspathEntry jreCPEntry = JavaCore.newContainerEntry(new Path("org.eclipse.jdt.launching.JRE_CONTAINER")); String libName = model.getFeature().getInstallHandler().getLibrary(); IClasspathEntry handlerCPEntry = JavaCore.newLibraryEntry(project.getFullPath().append(libName), null, null); jProject.setRawClasspath(new IClasspathEntry[] {jreCPEntry, handlerCPEntry}, monitor); }

Target:
private void setClasspath(IProject project, IFeatureModel model, IProgressMonitor monitor) throws JavaModelException { SubMonitor subMonitor = SubMonitor.convert(monitor); IJavaProject jProject = JavaCore.create(project); IClasspathEntry jreCPEntry = JavaCore.newContainerEntry(new Path("org.eclipse.jdt.launching.JRE_CONTAINER")); String libName = model.getFeature().getInstallHandler().getLibrary(); IClasspathEntry handlerCPEntry = JavaCore.newLibraryEntry(project.getFullPath().append(libName), null, null); jProject.setRawClasspath(new IClasspathEntry[] { jreCPEntry, handlerCPEntry }, subMonitor); }
Source:
private boolean isNewerFormVersionAvailable(String md5Hash) { if (md5Hash == null) { return false; } return formRepository.getAll().stream().noneMatch(f -> f.getMD5Hash().equals(md5Hash)); }

Target:
private boolean isNewerFormVersionAvailable(String md5Hash) { if (md5Hash == null) { return false; } return formRepository.getByMd5Hash(md5Hash) == null; }
Source:
public void shouldMergeLimboPlayers() { Location newLocation = mock(Location.class); LimboPlayer newLimbo = new LimboPlayer(newLocation, false, Collections.singletonList("grp-new"), false, 0.0f, 0.0f); Location oldLocation = mock(Location.class); LimboPlayer oldLimbo = new LimboPlayer(oldLocation, true, Collections.singletonList("grp-old"), true, 0.1f, 0.8f); LimboPlayer result = limboServiceHelper.merge(newLimbo, oldLimbo); assertThat(result.getLocation(), equalTo(oldLocation)); assertThat(result.isOperator(), equalTo(true)); assertThat(result.getGroups(), equalTo(Collections.singletonList("grp-new"))); assertThat(result.isCanFly(), equalTo(true)); assertThat(result.getWalkSpeed(), equalTo(0.1f)); assertThat(result.getFlySpeed(), equalTo(0.8f)); }

Target:
public void shouldMergeLimboPlayers() { Location newLocation = mock(Location.class); LimboPlayer newLimbo = new LimboPlayer(newLocation, false, Collections.singletonList("grp-new"), false, 0.0f, 0.0f); Location oldLocation = mock(Location.class); LimboPlayer oldLimbo = new LimboPlayer(oldLocation, true, Collections.singletonList("grp-old"), true, 0.1f, 0.8f); LimboPlayer result = limboServiceHelper.merge(newLimbo, oldLimbo); assertThat(result.getLocation(), equalTo(oldLocation)); assertThat(result.isOperator(), equalTo(true)); assertThat(result.getGroups(), contains("grp-old")); assertThat(result.isCanFly(), equalTo(true)); assertThat(result.getWalkSpeed(), equalTo(0.1f)); assertThat(result.getFlySpeed(), equalTo(0.8f)); }
Source:
public void close() throws StreamingIOFailure { boolean haveError = false; String partition = null; if (LOG.isDebugEnabled()) { logStats("Stats before close:"); } for (Map.Entry<String, List<RecordUpdater>> entry : updaters.entrySet()) { partition = entry.getKey(); if (LOG.isDebugEnabled()) { LOG.debug("Closing updater for partitions: {}", partition); } for (RecordUpdater updater : entry.getValue()) { if (updater != null) { try { updater.close(false); } catch (Exception ex) { haveError = true; LOG.error("Unable to close " + updater + " due to: " + ex.getMessage(), ex); } } } entry.getValue().clear(); } updaters.clear(); if (LOG.isDebugEnabled()) { logStats("Stats after close:"); } try { this.fs.close(); } catch (IOException e) { LOG.error("Error while closing FileSystem", e); } if (haveError) { throw new StreamingIOFailure("Encountered errors while closing (see logs) " + getWatermark(partition)); } }

Target:
public void close() throws StreamingIOFailure { boolean haveError = false; String partition = null; if (LOG.isDebugEnabled()) { logStats("Stats before close:"); } for (Map.Entry<String, List<RecordUpdater>> entry : updaters.entrySet()) { partition = entry.getKey(); if (LOG.isDebugEnabled()) { LOG.debug("Closing updater for partitions: {}", partition); } for (RecordUpdater updater : entry.getValue()) { if (updater != null) { try { updater.close(false); } catch (Exception ex) { haveError = true; LOG.error("Unable to close " + updater + " due to: " + ex.getMessage(), ex); } } } entry.getValue().clear(); } updaters.clear(); if (LOG.isDebugEnabled()) { logStats("Stats after close:"); } try { this.fs.close(); } catch (IOException e) { throw new StreamingIOFailure("Error while closing FileSystem", e); } if (haveError) { throw new StreamingIOFailure("Encountered errors while closing (see logs) " + getWatermark(partition)); } }
Source:
public void runAll() { String cronExecutingUser = (String) getConfig().get("cronExecutingUser"); synchronized (paragraphs) { if (!paragraphs.isEmpty()) { setLastReplName(paragraphs.get(paragraphs.size() - 1)); } for (Paragraph p : paragraphs) { if (!p.isEnabled()) { continue; } AuthenticationInfo authenticationInfo = new AuthenticationInfo(); authenticationInfo.setUser(cronExecutingUser); p.setAuthenticationInfo(authenticationInfo); try { run(p.getId()); } catch (InterpreterException intpException) { throw intpException; } } } }

Target:
public void runAll() { String cronExecutingUser = (String) getConfig().get("cronExecutingUser"); synchronized (paragraphs) { if (!paragraphs.isEmpty()) { setLastReplName(paragraphs.get(paragraphs.size() - 1)); } for (Paragraph p : paragraphs) { if (!p.isEnabled()) { continue; } AuthenticationInfo authenticationInfo = new AuthenticationInfo(); authenticationInfo.setUser(cronExecutingUser); p.setAuthenticationInfo(authenticationInfo); run(p.getId()); } } }
Source:
public Mono<? extends AsyncKeyEncryptionKey> buildAsyncKeyEncryptionKey(JsonWebKey key) { if (key == null) { throw logger.logExceptionAsError(new IllegalStateException( "Json Web key value cannot be null and is required to create local key encryption key async client.")); } else if (key.getId() == null) { throw logger.logExceptionAsError(new IllegalArgumentException( "Json Web Key's id property is not configured")); } return Mono.defer(() -> Mono.just(new LocalKeyEncryptionKeyAsyncClient(key))); }

Target:
public Mono<? extends AsyncKeyEncryptionKey> buildAsyncKeyEncryptionKey(JsonWebKey key) { if (key == null) { throw logger.logExceptionAsError(new IllegalStateException( "Json Web key value cannot be null and is required to create local key encryption key async client.")); } else if (key.getId() == null) { throw logger.logExceptionAsError(new IllegalArgumentException( "Json Web Key's id property is not configured.")); } return Mono.defer(() -> Mono.just(new LocalKeyEncryptionKeyAsyncClient(key))); }
Source:
protected Object handleRequestMessage(Message<?> requestMessage) { Message<?> theRequestMessage = requestMessage; try { theRequestMessage = embeddedHeadersMessageConverter.extractHeaders((Message<byte[]>) requestMessage); } catch (Exception e) { logger.error("Could not convert message", e); } Message<?> result = deserializePayloadIfNecessary(theRequestMessage); return result; }

Target:
protected Object handleRequestMessage(Message<?> requestMessage) { Message<?> theRequestMessage = requestMessage; try { theRequestMessage = embeddedHeadersMessageConverter.extractHeaders((Message<byte[]>) requestMessage); } catch (Exception e) { logger.error(EmbeddedHeadersMessageConverter.decodeExceptionMessage(requestMessage), e); } return deserializePayloadIfNecessary(theRequestMessage); }
Source:
private void logContext(RelationshipOp operation, Environment environment) { List<Field> children = (environment.field.getSelectionSet() != null) ? (List) environment.field.getSelectionSet().getChildren() : new ArrayList<>(); String requestedFields = environment.field.getName() + (children.size() > 0 ? "(" + children.stream().map(Field::getName).collect(Collectors.toList()) + ")" : ""); GraphQLType parent = environment.parentType; if (log.isDebugEnabled()) { log.debug("{} fields with parent {}<{}>", operation, requestedFields, parent.getClass().getSimpleName(), parent.getName()); } }

Target:
private void logContext(RelationshipOp operation, Environment environment) { List<Field> children = (environment.field.getSelectionSet() != null) ? (List) environment.field.getSelectionSet().getChildren() : new ArrayList<>(); String requestedFields = environment.field.getName() + (children.size() > 0 ? "(" + children.stream().map(Field::getName).collect(Collectors.toList()) + ")" : ""); GraphQLType parent = environment.parentType; if (log.isDebugEnabled()) { log.debug("{} fields with parent {}<{}>", operation, requestedFields, EntityDictionary.getSimpleName(parent.getClass()), parent.getName()); } }
Source:
public void testSyncDownForMetadataTarget() throws Exception { trySyncDown(MergeMode.LEAVE_IF_CHANGED, new MetadataSyncDownTarget(Constants.ACCOUNT), ACCOUNTS_SOUP); final QuerySpec smartStoreQuery = QuerySpec.buildAllQuerySpec(ACCOUNTS_SOUP, SyncTarget.SYNC_ID, QuerySpec.Order.ascending, 1); final JSONArray rows = smartStore.query(smartStoreQuery, 0); Assert.assertEquals("Number of rows should be 1", rows.length(), 1); }

Target:
public void testSyncDownForMetadataTarget() throws Exception { trySyncDown(MergeMode.LEAVE_IF_CHANGED, new MetadataSyncDownTarget(Constants.ACCOUNT), ACCOUNTS_SOUP); final QuerySpec smartStoreQuery = QuerySpec.buildAllQuerySpec(ACCOUNTS_SOUP, SyncTarget.SYNC_ID, QuerySpec.Order.ascending, 1); final JSONArray rows = smartStore.query(smartStoreQuery, 0); Assert.assertEquals("Number of rows should be 1", 1, rows.length()); final JSONObject metadata = rows.optJSONObject(0); Assert.assertNotNull("Metadata should not be null", metadata); final String keyPrefix = metadata.optString(Constants.KEYPREFIX_FIELD); final String label = metadata.optString(Constants.LABEL_FIELD); Assert.assertEquals("Key prefix should be 001", Constants.ACCOUNT_KEY_PREFIX, keyPrefix); Assert.assertEquals("Label should be " + Constants.ACCOUNT, Constants.ACCOUNT, label); }
Source:
ColumnReaderBase(ColumnDescriptor path, PageReader pageReader, PrimitiveConverter converter, ParsedVersion writerVersion) { this.path = Objects.requireNonNull(path, "path canot be null"); this.pageReader = Objects.requireNonNull(pageReader, "pageReader canot be null"); this.converter = Objects.requireNonNull(converter, "converter canot be null"); this.writerVersion = writerVersion; this.maxDefinitionLevel = path.getMaxDefinitionLevel(); DictionaryPage dictionaryPage = pageReader.readDictionaryPage(); if (dictionaryPage != null) { try { this.dictionary = dictionaryPage.getEncoding().initDictionary(path, dictionaryPage); if (converter.hasDictionarySupport()) { converter.setDictionary(dictionary); } } catch (IOException e) { throw new ParquetDecodingException("could not decode the dictionary for " + path, e); } } else { this.dictionary = null; } this.totalValueCount = pageReader.getTotalValueCount(); if (totalValueCount <= 0) { throw new ParquetDecodingException("totalValueCount '" + totalValueCount + "' <= 0"); } }

Target:
ColumnReaderBase(ColumnDescriptor path, PageReader pageReader, PrimitiveConverter converter, ParsedVersion writerVersion) { this.path = Objects.requireNonNull(path, "path cannot be null"); this.pageReader = Objects.requireNonNull(pageReader, "pageReader cannot be null"); this.converter = Objects.requireNonNull(converter, "converter cannot be null"); this.writerVersion = writerVersion; this.maxDefinitionLevel = path.getMaxDefinitionLevel(); DictionaryPage dictionaryPage = pageReader.readDictionaryPage(); if (dictionaryPage != null) { try { this.dictionary = dictionaryPage.getEncoding().initDictionary(path, dictionaryPage); if (converter.hasDictionarySupport()) { converter.setDictionary(dictionary); } } catch (IOException e) { throw new ParquetDecodingException("could not decode the dictionary for " + path, e); } } else { this.dictionary = null; } this.totalValueCount = pageReader.getTotalValueCount(); if (totalValueCount <= 0) { throw new ParquetDecodingException("totalValueCount '" + totalValueCount + "' <= 0"); } }
Source:
private void downloadProjectList() { ApplicationManager.getApplication().assertIsDispatchThread(); SonarQubeServer selectedServer = getSelectedServer(); ServerDownloadProjectTask downloadTask = new ServerDownloadProjectTask(project, engine, selectedServer); try { downloadTask.queue(); Map<String, RemoteModule> map = downloadTask.getResult(); setProjectsInList(map.values()); } catch (Exception e) { String msg = e.getMessage() != null ? e.getMessage() : "Failed to download list of projects"; Messages.showErrorDialog(rootPanel, msg, "Error Downloading Project List"); } }

Target:
private void downloadProjectList() { ApplicationManager.getApplication().assertIsDispatchThread(); SonarQubeServer selectedServer = getSelectedServer(); if (selectedServer == null) { return; } ServerDownloadProjectTask downloadTask = new ServerDownloadProjectTask(project, engine, selectedServer); try { downloadTask.queue(); Map<String, RemoteModule> map = downloadTask.getResult(); setProjectsInList(map.values()); } catch (Exception e) { String msg = e.getMessage() != null ? e.getMessage() : "Failed to download list of projects"; Messages.showErrorDialog(rootPanel, msg, "Error Downloading Project List"); } }
Source:
public static void writeMetadataFile(String jobName, String jobId, String containerId, Optional<String> execEnvContainerId, Config config) { Option<File> metadataFile = JobConfig.getMetadataFile(Option.apply(execEnvContainerId.orElse(null))); if (metadataFile.isDefined()) { StringBuilder metadata = new StringBuilder("Version: 1"); metadata.append(System.lineSeparator()); MetricsHeader metricsHeader = new MetricsHeader(jobName, jobId, "samza-container-" + containerId, execEnvContainerId.orElse(""), LocalContainerRunner.class.getName(), Util.getTaskClassVersion(config), Util.getSamzaVersion(), Util.getLocalHost().getHostName(), System.currentTimeMillis(), System.currentTimeMillis()); MetricsSnapshot metricsSnapshot = new MetricsSnapshot(metricsHeader, new Metrics()); metadata.append("MetricsSnapshot: "); metadata.append(new String(new MetricsSnapshotSerdeV2().toBytes(metricsSnapshot))); FileUtil.writeToTextFile(metadataFile.get(), metadata.toString(), false); } else { log.info("Skipping writing metadata file."); } }

Target:
public static void writeMetadataFile(String jobName, String jobId, String containerId, Optional<String> execEnvContainerId, Config config) { Option<File> metadataFile = JobConfig.getMetadataFile(Option.apply(execEnvContainerId.orElse(null))); if (metadataFile.isDefined()) { StringBuilder metadata = new StringBuilder("Version: 1"); metadata.append(System.lineSeparator()); MetricsHeader metricsHeader = new MetricsHeader(jobName, jobId, "samza-container-" + containerId, execEnvContainerId.orElse(""), LocalContainerRunner.class.getName(), Util.getTaskClassVersion(config), Util.getSamzaVersion(), Util.getLocalHost().getHostName(), System.currentTimeMillis(), System.currentTimeMillis()); MetricsSnapshot metricsSnapshot = new MetricsSnapshot(metricsHeader, new Metrics()); metadata.append("ContainerMetadata: "); metadata.append(new String(new MetricsSnapshotSerdeV2().toBytes(metricsSnapshot))); FileUtil.writeToTextFile(metadataFile.get(), metadata.toString(), false); } else { log.info("Skipping writing metadata file."); } }
Source:
private boolean isWindowPlatform() { if (Platform.getOS().equals(Platform.WS_WIN32)) { return true; } return false; }

Target:
private boolean isWindowPlatform() { return Platform.getOS().equals(Platform.WS_WIN32); }
Source:
public static ObjectMapper createCustomMapper() { ObjectMapper result = new ObjectMapper(); result.configure(Feature.INDENT_OUTPUT, true); SimpleModule module = new SimpleModule("hRavenModule", new Version(0, 4, 0, null)); addJobMappings(module); module.addSerializer(Flow.class, new FlowSerializer()); module.addSerializer(AppSummary.class, new AppSummarySerializer()); module.addSerializer(TaskDetails.class, new TaskDetailsSerializer()); module.addSerializer(JobDetails.class, new JobDetailsSerializer()); result.registerModule(module); return result; }

Target:
public static ObjectMapper createCustomMapper() { ObjectMapper result = new ObjectMapper(); result.configure(Feature.INDENT_OUTPUT, true); SimpleModule module = createhRavenModule(); addJobMappings(module); module.addSerializer(Flow.class, new FlowSerializer()); module.addSerializer(AppSummary.class, new AppSummarySerializer()); module.addSerializer(TaskDetails.class, new TaskDetailsSerializer()); module.addSerializer(JobDetails.class, new JobDetailsSerializer()); result.registerModule(module); return result; }
Source:
private void closeStatementIfNeeded() throws SQLException { try { if (stmtHandle != null) { TCloseOperationReq closeReq = new TCloseOperationReq(stmtHandle); TCloseOperationResp closeResp = client.CloseOperation(closeReq); Utils.verifySuccessWithInfo(closeResp.getStatus()); stmtHandle = null; } } catch (SQLException e) { throw e; } catch (Exception e) { if (e instanceof TApplicationException && ((TApplicationException)e) .getType() == TApplicationException.BAD_SEQUENCE_ID) { String errorMsg = "Mismatch thrift sequence id, which usually is caused by an OutOfMemoryError " + "or a SocketTimeoutException, please check the memory status and previous calls."; throw new SQLException(errorMsg, "08S01", e); } throw new SQLException("Failed to close statement", "08S01", e); } }

Target:
private void closeStatementIfNeeded() throws SQLException { try { if (stmtHandle != null) { TCloseOperationReq closeReq = new TCloseOperationReq(stmtHandle); TCloseOperationResp closeResp = client.CloseOperation(closeReq); Utils.verifySuccessWithInfo(closeResp.getStatus()); stmtHandle = null; } } catch (SQLException e) { throw e; } catch (TApplicationException tae) { String errorMsg = "Failed to close statement"; if (tae.getType() == TApplicationException.BAD_SEQUENCE_ID) { errorMsg = "Failed to close statement. Mismatch thrift sequence id. A previous call to the Thrift library" + " failed and now position within the input stream is lost. Please enable verbose error logging and" + " check the status of previous calls."; } throw new SQLException(errorMsg, "08S01", tae); } catch (Exception e) { throw new SQLException("Failed to close statement", "08S01", e); } }
Source:
public ApplicationsClient applicationsClient() { return ApplicationsClientImpl.create( Configurer.get("applications.client.host").get(), new MetricRegistry() ); }

Target:
public ApplicationsClient applicationsClient() { return ApplicationsClientImpl.create( applicationsClientHost, metricsModule.metrics() ); }
Source:
public Blob run(DocumentModel doc) { BlobList blobs = null; if (collectionManager.isCollection(doc)) { blobs = getCollectionBlobs(doc.getAdapter(Collection.class)); } else if (doc.hasFacet("Folderish")) { blobs = getFolderishBlobs(doc); } else { log.warn("The operation only accepts folderish document or collection"); return null; } AutomationService as = Framework.getLocalService(AutomationService.class); try (OperationContext oc = new OperationContext(session)) { oc.push("filename", doc.getName()); oc.setInput(blobs); return (Blob) as.run(oc, CreateZip.ID); } catch (OperationException e) { throw new NuxeoException(e); } }

Target:
public Blob run(DocumentModel doc) throws IOException { if (maxDepth <= 0) { throw new NuxeoException("Maximum depth must greater or equal to 1."); } return processContainer(doc, 0); }
Source:
private void resolveTargetTypeOrThrowException(String theResourceType) { if (!theResourceType.equalsIgnoreCase("Patient") && !theResourceType.equalsIgnoreCase("Practitioner")) { throw new InvalidRequestException(ProviderConstants.OPERATION_EMPI_BATCH_RUN + " does not support resource type: " + theResourceType); } }

Target:
private void resolveTargetTypeOrThrowException(String theResourceType) { if (!EmpiUtil.supportedTargetType(theResourceType)) { throw new InvalidRequestException(ProviderConstants.OPERATION_EMPI_BATCH_RUN + " does not support resource type: " + theResourceType); } }
Source:
public void testCramSortFail(String file, String fileReference, SAMFileHeader.SortOrder order) throws Exception { final CRAMFileReader cramFileReader = getCramFileReader(file, fileReference); final SAMRecordIterator samRecordIterator = cramFileReader.getIterator().assertSorted(order); while (samRecordIterator.hasNext()) { samRecordIterator.next(); } }

Target:
public void testCramSortFail(String file, String fileReference, SAMFileHeader.SortOrder order) throws Exception { final CRAMFileReader cramFileReader = getCramFileReader(file, fileReference); final SAMRecordIterator samRecordIterator = cramFileReader.getIterator().assertSorted(order); Assert.assertTrue(samRecordIterator.hasNext()); while (samRecordIterator.hasNext()) { Assert.assertNotNull(samRecordIterator.next()); } }
Source:
protected void sendResponse(Channel channel, Address replyTo, Message messageIn) { Message message = messageIn; if (this.beforeSendReplyPostProcessors != null) { for (MessagePostProcessor postProcessor : this.beforeSendReplyPostProcessors) { message = postProcessor.postProcessMessage(message); } } postProcessChannel(channel, message); try { this.logger.debug("Publishing response to exchange = [" + replyTo.getExchangeName() + "], routingKey = [" + replyTo.getRoutingKey() + "]"); if (this.retryTemplate == null) { doPublish(channel, replyTo, message); } else { final Message messageToSend = message; final AtomicBoolean first = new AtomicBoolean(true); this.retryTemplate.execute(ctx -> { if (this.recoveryCallback != null && first.getAndSet(false)) { ctx.setAttribute(SendRetryContextAccessor.MESSAGE, messageToSend); ctx.setAttribute(SendRetryContextAccessor.ADDRESS, replyTo); } doPublish(channel, replyTo, messageToSend); return null; }, this.recoveryCallback); } } catch (Exception ex) { throw RabbitExceptionTranslator.convertRabbitAccessException(ex); } }

Target:
protected void sendResponse(Channel channel, Address replyTo, Message messageIn) { Message message = messageIn; if (this.beforeSendReplyPostProcessors != null) { for (MessagePostProcessor postProcessor : this.beforeSendReplyPostProcessors) { message = postProcessor.postProcessMessage(message); } } postProcessChannel(channel, message); try { this.logger.debug("Publishing response to exchange = [" + replyTo.getExchangeName() + "], routingKey = [" + replyTo.getRoutingKey() + "]"); if (this.retryTemplate == null) { doPublish(channel, replyTo, message); } else { final Message messageToSend = message; this.retryTemplate.execute(ctx -> { doPublish(channel, replyTo, messageToSend); return null; }, ctx -> { if (this.recoveryCallback != null) { ctx.setAttribute(SendRetryContextAccessor.MESSAGE, messageToSend); ctx.setAttribute(SendRetryContextAccessor.ADDRESS, replyTo); this.recoveryCallback.recover(ctx); return null; } else { throw RabbitExceptionTranslator.convertRabbitAccessException(ctx.getLastThrowable()); } }); } } catch (Exception ex) { throw RabbitExceptionTranslator.convertRabbitAccessException(ex); } }
Source:
public void closesDeleteExecutorOnClosingTransactionManager() { snapshotTransactionManager.close(); assertThat(executorService.isTerminated()).isTrue(); }

Target:
public void closesDeleteExecutorOnClosingTransactionManager() { snapshotTransactionManager.close(); assertThat(deleteExecutor.isTerminated()).isTrue(); }
Source:
public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; SyncDomainCommand that = (SyncDomainCommand) o; if (_toAdd != that._toAdd) return false; if (_toRemove != that._toRemove) return false; if (_domainName != null ? !_domainName.equals(that._domainName) : that._domainName != null) return false; if (_domainPath != null ? !_domainPath.equals(that._domainPath) : that._domainPath != null) return false; if (_domainUuid != null ? !_domainUuid.equals(that._domainUuid) : that._domainUuid != null) return false; return true; }

Target:
public boolean equals(Object o) { if (this == o) return true; if (!(o instanceof SyncDomainCommand)) return false; if (!super.equals(o)) return false; SyncDomainCommand that = (SyncDomainCommand) o; if (_toAdd != that._toAdd) return false; if (_toRemove != that._toRemove) return false; if (_domainName != null ? !_domainName.equals(that._domainName) : that._domainName != null) return false; if (_domainPath != null ? !_domainPath.equals(that._domainPath) : that._domainPath != null) return false; if (_domainUuid != null ? !_domainUuid.equals(that._domainUuid) : that._domainUuid != null) return false; return true; }
Source:
protected boolean onOK(Metadata trailers) { rowMerger.onCompleted(); if (!completionFuture.isDone()) { completionFuture.set(""); } return true; }

Target:
protected boolean onOK(Metadata trailers) { rowMerger.onCompleted(); completionFuture.set(""); return true; }
Source:
public void setStatus(final String message) { boolean processing = getLegacyService().setProcessingEvents(true); if (processing) return; try { final IJ1Helper ij1helper = helper(); if (ij1helper != null) ij1helper.setStatus(message); } finally { final LegacyService LegacyService = getLegacyService(); if (LegacyService != null) LegacyService.setProcessingEvents(processing); } }

Target:
public void setStatus(final String message) { boolean processing = getLegacyService().setProcessingEvents(true); if (processing) return; try { final IJ1Helper ij1Helper = helper(); if (ij1Helper != null) ij1Helper.setStatus(message); } finally { final LegacyService legacyService = getLegacyService(); if (legacyService != null) legacyService.setProcessingEvents(processing); } }