auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public QueryStats() { this.createTime = null; this.executionStartTime = null; this.lastHeartbeat = null; this.endTime = null; this.elapsedTime = null; this.queuedTime = null; this.waitingTime = null; this.analysisTime = null; this.distributedPlanningTime = null; this.totalPlanningTime = null; this.finishingTime = null; this.totalTasks = 0; this.runningTasks = 0; this.blockedDrivers = 0; this.completedTasks = 0; this.totalDrivers = 0; this.queuedDrivers = 0; this.runningDrivers = 0; this.completedDrivers = 0; this.cumulativeUserMemory = 0.0; this.userMemoryReservation = null; this.totalMemoryReservation = null; this.peakUserMemoryReservation = null; this.peakTotalMemoryReservation = null; this.peakTaskTotalMemory = null; this.scheduled = false; this.totalScheduledTime = null; this.totalCpuTime = null; this.totalUserTime = null; this.totalBlockedTime = null; this.fullyBlocked = false; this.blockedReasons = ImmutableSet.of(); this.rawInputDataSize = null; this.rawInputPositions = 0; this.processedInputDataSize = null; this.processedInputPositions = 0; this.outputDataSize = null; this.outputPositions = 0; this.physicalWrittenDataSize = null; this.stageGcStatistics = null; this.operatorSummaries = null; }

Target:
public QueryStats() { this.createTime = null; this.executionStartTime = null; this.lastHeartbeat = null; this.endTime = null; this.elapsedTime = null; this.queuedTime = null; this.resourceWaitingTime = null; this.analysisTime = null; this.distributedPlanningTime = null; this.totalPlanningTime = null; this.finishingTime = null; this.totalTasks = 0; this.runningTasks = 0; this.blockedDrivers = 0; this.completedTasks = 0; this.totalDrivers = 0; this.queuedDrivers = 0; this.runningDrivers = 0; this.completedDrivers = 0; this.cumulativeUserMemory = 0.0; this.userMemoryReservation = null; this.totalMemoryReservation = null; this.peakUserMemoryReservation = null; this.peakTotalMemoryReservation = null; this.peakTaskTotalMemory = null; this.scheduled = false; this.totalScheduledTime = null; this.totalCpuTime = null; this.totalUserTime = null; this.totalBlockedTime = null; this.fullyBlocked = false; this.blockedReasons = ImmutableSet.of(); this.rawInputDataSize = null; this.rawInputPositions = 0; this.processedInputDataSize = null; this.processedInputPositions = 0; this.outputDataSize = null; this.outputPositions = 0; this.physicalWrittenDataSize = null; this.stageGcStatistics = null; this.operatorSummaries = null; }
Source:
public PostUploadNotifier(Post post, String title, String message) { mNotificationManager = (NotificationManager) SystemServiceFactory.get(mContext, Context.NOTIFICATION_SERVICE); new Notification.Builder(getApplicationContext()); mNotificationBuilder = new Notification.Builder(getApplicationContext()); mNotificationBuilder.setSmallIcon(android.R.drawable.stat_sys_upload); if (title != null) { mNotificationBuilder.setContentTitle(title); } if (message != null) { mNotificationBuilder.setContentText(message); } mNotificationId = (new Random()).nextInt() + post.getLocalTableBlogId(); startForeground(mNotificationId, mNotificationBuilder.build()); }

Target:
public PostUploadNotifier(Post post, String title, String message) { mNotificationManager = (NotificationManager) SystemServiceFactory.get(mContext, Context.NOTIFICATION_SERVICE); mNotificationBuilder = new Notification.Builder(getApplicationContext()); mNotificationBuilder.setSmallIcon(android.R.drawable.stat_sys_upload); if (title != null) { mNotificationBuilder.setContentTitle(title); } if (message != null) { mNotificationBuilder.setContentText(message); } mNotificationId = (new Random()).nextInt() + post.getLocalTableBlogId(); startForeground(mNotificationId, mNotificationBuilder.build()); }
Source:
public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { if (bean instanceof IntegrationEvaluationContextAware) { StandardEvaluationContext evaluationContext = IntegrationContextUtils.getEvaluationContext(beanFactory); if (bean instanceof IntegrationObjectSupport) { ConversionService conversionService = ((IntegrationObjectSupport) bean).getConversionService(); if (conversionService != null) { evaluationContext.setTypeConverter(new StandardTypeConverter(conversionService)); } } ((IntegrationEvaluationContextAware) bean).setIntegrationEvaluationContext(evaluationContext); } return bean; }

Target:
public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException { if (bean instanceof IntegrationEvaluationContextAware) { StandardEvaluationContext evaluationContext = IntegrationContextUtils.getEvaluationContext(this.beanFactory); ((IntegrationEvaluationContextAware) bean).setIntegrationEvaluationContext(evaluationContext); } return bean; }
Source:
public User create(User newUser, boolean isTemporary) throws ConflictException, ServerException { requireNonNull(newUser, "Required non-null user"); final UserImpl user = new UserImpl(generate("user", ID_LENGTH), newUser.getEmail(), newUser.getName(), firstNonNull(newUser.getPassword(), generate("", PASSWORD_LENGTH)), newUser.getAliases()); try { userDao.create(user); profileManager.create(new ProfileImpl(user.getId(), newUser.getEmail())); preferencesManager.save(user.getId(), ImmutableMap.of("temporary", Boolean.toString(isTemporary), "codenvy:created", Long.toString(currentTimeMillis()))); } catch (ConflictException | ServerException x) { try { userDao.remove(user.getId()); profileManager.remove(user.getId()); preferencesManager.remove(user.getId()); } catch (ConflictException | ServerException rollbackEx) { LOG.error(format("An attempt to clean up resources due to user creation failure was unsuccessful." + "Now the system may be in inconsistent state. " + "User with id '%s' must not exist", user.getId()), rollbackEx); } throw x; } return user; }

Target:
public User create(User newUser, boolean isTemporary) throws ConflictException, ServerException { requireNonNull(newUser, "Required non-null user"); if (reservedNames.contains(newUser.getName().toLowerCase())) { throw new ConflictException(String.format("Username '%s' is reserved", newUser.getName())); } final UserImpl user = new UserImpl(generate("user", ID_LENGTH), newUser.getEmail(), newUser.getName(), firstNonNull(newUser.getPassword(), generate("", PASSWORD_LENGTH)), newUser.getAliases()); try { userDao.create(user); profileDao.create(new ProfileImpl(user.getId())); preferencesDao.setPreferences(user.getId(), ImmutableMap.of("temporary", Boolean.toString(isTemporary), "codenvy:created", Long.toString(currentTimeMillis()))); } catch (ConflictException | ServerException x) { try { userDao.remove(user.getId()); profileDao.remove(user.getId()); preferencesDao.remove(user.getId()); } catch (ConflictException | ServerException rollbackEx) { LOG.error(format("An attempt to clean up resources due to user creation failure was unsuccessful." + "Now the system may be in inconsistent state. " + "User with id '%s' must not exist", user.getId()), rollbackEx); } throw x; } return user; }
Source:
private JEditorPane createDataCloudInformationText() { final DCHtmlBox editorPane = new DCHtmlBox(""); editorPane.setSize(500 - 30, Integer.MAX_VALUE); editorPane.setText( "<html>HI! Thank you for using DataCleaner." + " Are you aware that there are many cool features available online?" + " Just register on our <a href=\"<LINK_0>\">website</a> and you can immediately use" + " them to improve your data quality." + " (You will get free credits to spend.)" + "<p>Enter your credentials to:" + "<ul style=\"list-style-type:none\">" + " <li>\u2022 Validate your contacts addresses/emails." + " <li>\u2022 Parse names, phones, emails." + " <li>\u2022 Ensure you have recent addresses of your contacts." + "</ul>" + "<b>Your <a href=\"<LINK_0>\">datacleaner.org</a> credentials:</b>"); editorPane.setEditable(false); editorPane.setOpaque(false); return editorPane; }

Target:
private JEditorPane createDataCloudInformationText() { final DCHtmlBox editorPane = new DCHtmlBox(""); editorPane.setSize(500 - 30, Integer.MAX_VALUE); editorPane.setText( "<html>HI! Thank you for using DataCleaner." + " Are you aware that there are many cool features available online?" + " Just register on our <a href=\"<LINK_0>\">website</a> and you can immediately use" + " them to improve your data quality." + " (You will get free credits to spend.)" + "<p>Enter your credentials to:" + "<ul style=\"list-style-type:none\">" + " <li>\u2022 Validate your contacts addresses/emails." + " <li>\u2022 Parse names, phones, emails." + " <li>\u2022 Ensure you have recent addresses of your contacts." + "</ul>" + "<b>Your <a href=\"<LINK_0>\">datacleaner.org</a> credentials:</b>"); editorPane.setOpaque(false); return editorPane; }
Source:
public static String quoteString(String s) { if (s == null) { return null; } if (!s.matches("^\".*\"$")) { return "\"" + s + "\""; } else { return s; } }

Target:
static String quoteString(String s) { if (s == null) { return null; } if (!s.matches("^\".*\"$")) { return "\"" + s + "\""; } else { return s; } }
Source:
private static boolean isWindowsOS() { return System.getProperty("os.name").contains("Windows");}

Target:
private static boolean isWindowsOS() { String osName = System.getProperty("os.name"); return normalize(osName).contains("windows"); }
Source:
public void shouldReturnSameWhenCallingMapOnLeft() { final Either<Integer, Object> actual = Either.left(1); assertThat(actual.map(Object::toString)).isSameAs(actual); }

Target:
public void shouldReturnSameWhenCallingMapOnLeft() { final Either<Integer, Object> actual = Left(1); assertThat(actual.map(v -> { throw new IllegalStateException(); })).isSameAs(actual); }
Source:
public Optional<Path> getMountPoint() { return Optional.empty(); }

Target:
public Optional<Path> getMountPoint() { return Optional.ofNullable(mountPoint); }
Source:
@Override public JDK getJDK() { if (jdk == null) { return getOwner().getJDK(); } else { return Jenkins.getInstance().getJDK(jdk); } }

Target:
@Override public JDK getJDK() { if (jdkForPromotion == null || "UseOwner".equals(jdkForPromotion)) { return getOwner().getJDK(); } else { return Jenkins.getInstance().getJDK(jdkForPromotion); } }
Source:
public void run() { HTInterval[] currentIntervals; try { currentIntervals = intervalQueue.take(); while (currentIntervals.length != 1 && currentIntervals[0].getStartTime() != -1) { for (HTInterval currentInterval : currentIntervals) { if (currentInterval != null) { getSHT().insertInterval(currentInterval); } } currentIntervals = intervalQueue.take(); } getSHT().closeTree(currentIntervals[0].getEndTime()); return; } catch (InterruptedException e) { Activator.getDefault().logError("State History Tree interrupted!", e); } catch (TimeRangeException e) { Activator.getDefault().logError("Error starting the state system", e); } }

Target:
public void run() { Iterable<HTInterval> currentIntervals; try { boolean done = false; currentIntervals = intervalQueue.take(); while (!done) { for (HTInterval currentInterval : currentIntervals) { if (currentInterval.getAttribute() == -1) { done = true; break; } getSHT().insertInterval(currentInterval); } if (!done) { currentIntervals = intervalQueue.take(); } } for (HTInterval currentInterval : currentIntervals) { getSHT().closeTree(currentInterval.getEndTime()); return; } } catch (InterruptedException e) { Activator.getDefault().logError("State History Tree interrupted!", e); } catch (TimeRangeException e) { Activator.getDefault().logError("Error starting the state system", e); } }
Source:
private static String getQuotaRegexString(SearchObjectAutoCompleter search) { String query = ".*" + search.getDefaultSort(SearchObjects.QUOTA_OBJ_NAME) + ".*" + search.getRelatedTableNameWithOutTags(SearchObjects.QUOTA_OBJ_NAME) + ".* "; System.out.println("VdsGroupRegExp: " + query); return query; }

Target:
private static String getQuotaRegexString(SearchObjectAutoCompleter search) { String query = ".*" + search.getDefaultSort(SearchObjects.QUOTA_OBJ_NAME) + ".*" + search.getRelatedTableNameWithOutTags(SearchObjects.QUOTA_OBJ_NAME) + ".* "; return query; }
Source:
protected VmNetworkInterface setNetwork(NIC device, VmNetworkInterface ni) { if (device.isSetNetwork()) { if (device.getNetwork().getId() != null || device.getNetwork().getName() != null) { Guid clusterId = getEntity(VmTemplate.class, VdcQueryType.GetVmTemplate, new GetVmTemplateParameters(parentId), "id").getvds_group_id(); Network net = lookupClusterNetwork(clusterId, device.getNetwork().isSetId() ? asGuid(device.getNetwork() .getId()) : null, device.getNetwork().getName()); if (net != null) { ni.setNetworkName(net.getname()); } } else { ni.setNetworkName(null); } } return ni; }

Target:
protected VmNetworkInterface setNetwork(NIC device, VmNetworkInterface ni) { if (device.isSetNetwork()) { if (device.isSetId() || device.isSetName()) { Guid clusterId = getEntity(VmTemplate.class, VdcQueryType.GetVmTemplate, new GetVmTemplateParameters(parentId), "id").getvds_group_id(); Network net = lookupClusterNetwork(clusterId, device.getNetwork().isSetId() ? asGuid(device.getNetwork() .getId()) : null, device.getNetwork().getName()); if (net != null) { ni.setNetworkName(net.getname()); } } else { ni.setNetworkName(null); } } return ni; }
Source:
public Survey save(Survey survey) { SurveyDB surveyDB = SurveyDB.findById(survey.getId()); if (surveyDB == null) { OrgUnitDB orgUnitDB = null; if (survey.getOrganisationUnit() != null) { orgUnitDB = OrgUnitDB.findByUID(survey.getOrganisationUnit().getUid()); } UserDB userDB = null; if (survey.getUserAccount() != null) { userDB = UserDB.findByUID(survey.getUserAccount().getUserUid()); } surveyDB = new SurveyDB(orgUnitDB, ProgramDB.getProgram(survey.getProgram().getId()), userDB, survey.getType()); surveyDB.save(); } surveyDB.setStatus(survey.getStatus()); surveyDB.update(); survey.setId(surveyDB.getId_survey()); return survey; }

Target:
public long save(Survey survey) { SurveyDB surveyDB = SurveyDB.findById(survey.getId()); if (surveyDB == null) { OrgUnitDB orgUnitDB = null; if (survey.getOrganisationUnit() != null) { orgUnitDB = OrgUnitDB.findByUID(survey.getOrganisationUnit().getUid()); } UserDB userDB = null; if (survey.getUserAccount() != null) { userDB = UserDB.findByUID(survey.getUserAccount().getUserUid()); } surveyDB = new SurveyDB(orgUnitDB, ProgramDB.getProgram(survey.getProgram().getId()), userDB, survey.getType()); surveyDB.save(); } surveyDB.setStatus(survey.getStatus()); surveyDB.update(); return surveyDB.getId_survey(); }
Source:
public Optional<ConnectorId> getCatalogHandle(Session session, String catalogName) { return Optional.of(catalogHandle); }

Target:
public Optional<ConnectorId> getCatalogHandle(Session session, String catalogName) { if (catalogHandle.getCatalogName().equals(catalogName)) { return Optional.of(catalogHandle); } return Optional.empty(); }
Source:
static PrivateKey loadPrivateKey(String keyPath) throws IOException, GeneralSecurityException { try (Reader reader = new FileReader(keyPath); PEMParser parser = new PEMParser(reader)) { Object readObject = parser.readObject(); if (readObject instanceof PEMKeyPair) { PEMKeyPair keyPair = (PEMKeyPair) readObject; return generatePrivateKey(keyPair.getPrivateKeyInfo()); } else if (readObject instanceof PrivateKeyInfo) { return generatePrivateKey((PrivateKeyInfo) readObject); } } return null; }

Target:
static PrivateKey loadPrivateKey(String keyPath) throws IOException, GeneralSecurityException { try (Reader reader = new FileReader(keyPath); PEMParser parser = new PEMParser(reader)) { Object readObject = parser.readObject(); if (readObject instanceof PEMKeyPair) { PEMKeyPair keyPair = (PEMKeyPair) readObject; return generatePrivateKey(keyPair.getPrivateKeyInfo()); } else if (readObject instanceof PrivateKeyInfo) { return generatePrivateKey((PrivateKeyInfo) readObject); } } throw new GeneralSecurityException("Cannot generate private key from file: " + keyPath); }
Source:
public ValueAndTimestamp<R> get(final K key) { R newValue = null; final V1 value1 = getValueOrNull(valueGetter1.get(key)); final V2 value2 = getValueOrNull(valueGetter2.get(key)); if (value1 != null || value2 != null) { newValue = joiner.apply(value1, value2); } return ValueAndTimestamp.make(newValue, -1L); }

Target:
public ValueAndTimestamp<R> get(final K key) { R newValue = null; final ValueAndTimestamp<V1> valueAndTimestamp1 = valueGetter1.get(key); final V1 value1; final long timestamp1; if (valueAndTimestamp1 == null) { value1 = null; timestamp1 = UNKNOWN; } else { value1 = valueAndTimestamp1.value(); timestamp1 = valueAndTimestamp1.timestamp(); } final ValueAndTimestamp<V2> valueAndTimestamp2 = valueGetter2.get(key); final V2 value2; final long timestamp2; if (valueAndTimestamp2 == null) { value2 = null; timestamp2 = UNKNOWN; } else { value2 = valueAndTimestamp2.value(); timestamp2 = valueAndTimestamp2.timestamp(); } if (value1 != null || value2 != null) { newValue = joiner.apply(value1, value2); } return ValueAndTimestamp.make(newValue, Math.max(timestamp1, timestamp2)); }
Source:
public void receiveSignature(PacketLineIn pckIn) throws IOException { try { StringBuilder sig = new StringBuilder(); String line = pckIn.readStringRaw(); while (!line.equals("-----END PGP SIGNATURE-----\n")) sig.append(line); signature = sig.toString(); commandList = commandlistBuilder.toString(); } catch (EOFException eof) { throw new IOException(MessageFormat.format( JGitText.get().errorInvalidPushCert, "broken push certificate signature")); } writePushCertificate(); verifySignedPushCommands(signature); }

Target:
public void receiveSignature(PacketLineIn pckIn) throws IOException { try { StringBuilder sig = new StringBuilder(); String line = pckIn.readStringRaw(); while (!line.equals("-----END PGP SIGNATURE-----\n")) sig.append(line); signature = sig.toString(); commandList = commandlistBuilder.toString(); } catch (EOFException eof) { throw new IOException(MessageFormat.format( JGitText.get().errorInvalidPushCert, "broken push certificate signature")); } }
Source:
@Test public void conditionalHitUpdatesCache() throws Exception { server.enqueue(new MockResponse() .addHeader("Last-Modified: " + formatDate(0, TimeUnit.SECONDS)) .addHeader("Cache-Control: max-age=0") .setBody("A")); server.enqueue(new MockResponse() .addHeader("Cache-Control: max-age=30") .addHeader("Allow: GET, HEAD") .setResponseCode(HttpURLConnection.HTTP_NOT_MODIFIED)); server.enqueue(new MockResponse() .setBody("B")); long t0 = System.currentTimeMillis(); Response response1 = get(server.url("/a")); assertThat(response1.body().string()).isEqualTo("A"); assertThat(response1.header("Allow")).isNull(); assertThat((double) (response1.receivedResponseAtMillis() - t0)).isCloseTo( (double) 0, offset(250.0)); Thread.sleep(500); long t1 = System.currentTimeMillis(); Response response2 = get(server.url("/a")); assertThat(response2.code()).isEqualTo(HttpURLConnection.HTTP_OK); assertThat(response2.body().string()).isEqualTo("A"); assertThat(response2.header("Allow")).isEqualTo("GET, HEAD"); Long originalTimestamp = response2.receivedResponseAtMillis(); assertThat((double) (originalTimestamp - t1)).isCloseTo( (double) 0, offset(250.0)); Thread.sleep(500); Response response3 = get(server.url("/a")); assertThat(response3.body().string()).isEqualTo("A"); assertThat(response3.header("Allow")).isEqualTo("GET, HEAD"); assertThat(response3.receivedResponseAtMillis()).isEqualTo(originalTimestamp); assertThat(server.getRequestCount()).isEqualTo(2); }

Target:
@Test public void conditionalHitUpdatesCache() throws Exception { server.enqueue(new MockResponse() .addHeader("Last-Modified: " + formatDate(0, TimeUnit.SECONDS)) .addHeader("Cache-Control: max-age=0") .setBody("A")); server.enqueue(new MockResponse() .addHeader("Cache-Control: max-age=30") .addHeader("Allow: GET, HEAD") .setResponseCode(HttpURLConnection.HTTP_NOT_MODIFIED)); server.enqueue(new MockResponse() .setBody("B")); long t0 = System.currentTimeMillis(); Response response1 = get(server.url("/a")); assertThat(response1.body().string()).isEqualTo("A"); assertThat(response1.header("Allow")).isNull(); assertThat((double) (response1.receivedResponseAtMillis() - t0)).isCloseTo( (double) 0, offset(250.0)); Thread.sleep(500); long t1 = System.currentTimeMillis(); Response response2 = get(server.url("/a")); assertThat(response2.code()).isEqualTo(HttpURLConnection.HTTP_OK); assertThat(response2.body().string()).isEqualTo("A"); assertThat(response2.header("Allow")).isEqualTo("GET, HEAD"); Long updatedTimestamp = response2.receivedResponseAtMillis(); assertThat((double) (updatedTimestamp - t1)).isCloseTo( (double) 0, offset(250.0)); Thread.sleep(10); Response response3 = get(server.url("/a")); assertThat(response3.body().string()).isEqualTo("A"); assertThat(response3.header("Allow")).isEqualTo("GET, HEAD"); assertThat(response3.receivedResponseAtMillis()).isEqualTo(updatedTimestamp); assertThat(server.getRequestCount()).isEqualTo(2); }
Source:
void execute(final RequestHandler.Callback callback, final Statement statement) { if (cluster.isClosed()) { throw new IllegalStateException("Parent cluster is closed. This session is no longer valid."); } if (isInit) new RequestHandler(this, callback, statement).sendRequest(); else this.initAsync() .addListener( new Runnable() { @Override public void run() { new RequestHandler(SessionManager.this, callback, statement).sendRequest(); } }, executor()); }

Target:
void execute(final RequestHandler.Callback callback, final Statement statement) { if (this.isClosed()) { callback.onException( null, new IllegalStateException("Could not send request, session is closed"), 0, 0); return; } if (isInit) new RequestHandler(this, callback, statement).sendRequest(); else this.initAsync() .addListener( new Runnable() { @Override public void run() { new RequestHandler(SessionManager.this, callback, statement).sendRequest(); } }, executor()); }
Source:
public Response addAll( InputStream in, @Context final HttpServletRequest req ) { final String reqContentType = req.getContentType(); final boolean isSmile = SmileMediaTypes.APPLICATION_JACKSON_SMILE.equals(reqContentType); final String contentType = isSmile ? SmileMediaTypes.APPLICATION_JACKSON_SMILE : MediaType.APPLICATION_JSON; ObjectMapper objectMapper = isSmile ? smileMapper : jsonMapper; Collection<Map<String, Object>> events = null; try { events = objectMapper.readValue( in, new TypeReference<Collection<Map<String, Object>>>() { } ); } catch (IOException e) { Throwables.propagate(e); } log.debug("Adding %,d events to firehose: %s", events.size(), serviceName); final List<InputRow> rows = Lists.newArrayList(); for (final Map<String, Object> event : events) { rows.add(parser.parse(event)); } try { for (final InputRow row : rows) { boolean added = false; while (!closed && !added) { added = buffer.offer(row, 500, TimeUnit.MILLISECONDS); } if (!added) { throw new IllegalStateException("Cannot add events to closed firehose!"); } } return Response.ok( objectMapper.writeValueAsString(ImmutableMap.of("eventCount", events.size())), contentType ).build(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw Throwables.propagate(e); } catch (JsonProcessingException e) { throw Throwables.propagate(e); } }

Target:
public Response addAll( InputStream in, @Context final HttpServletRequest req ) { final String reqContentType = req.getContentType(); final boolean isSmile = SmileMediaTypes.APPLICATION_JACKSON_SMILE.equals(reqContentType); final String contentType = isSmile ? SmileMediaTypes.APPLICATION_JACKSON_SMILE : MediaType.APPLICATION_JSON; ObjectMapper objectMapper = isSmile ? smileMapper : jsonMapper; Collection<Map<String, Object>> events = null; try { events = objectMapper.readValue( in, new TypeReference<Collection<Map<String, Object>>>() { } ); } catch (IOException e) { return Response.serverError().entity(ImmutableMap.<String, Object>of("error", e.getMessage())).build(); } log.debug("Adding %,d events to firehose: %s", events.size(), serviceName); final List<InputRow> rows = Lists.newArrayList(); for (final Map<String, Object> event : events) { rows.add(parser.parse(event)); } try { for (final InputRow row : rows) { boolean added = false; while (!closed && !added) { added = buffer.offer(row, 500, TimeUnit.MILLISECONDS); } if (!added) { throw new IllegalStateException("Cannot add events to closed firehose!"); } } return Response.ok( objectMapper.writeValueAsString(ImmutableMap.of("eventCount", events.size())), contentType ).build(); } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw Throwables.propagate(e); } catch (JsonProcessingException e) { throw Throwables.propagate(e); } }
Source:
public ParseOperator(final T2 to, OperatorBase.IFunction operator) { super("parse_" + L10NHelpers.localize(to.getTranslationKey()) , "parse_" + to.getTranslationKey() , constructInputVariables(1, ValueTypes.STRING) , to , new IFunction() { @Override public IValue evaluate(SafeVariablesGetter variables) throws EvaluationException { return operator.evaluate(variables); } }, IConfigRenderPattern.PREFIX_1); this.to = to; }

Target:
public ParseOperator(final T2 to, OperatorBase.IFunction operator) { super("parse_" + L10NHelpers.localize(to.getTranslationKey()), "parse_" + to.getTranslationKey(), constructInputVariables(1, ValueTypes.STRING), to, operator, IConfigRenderPattern.PREFIX_1_LONG); this.to = to; }
Source:
private void checkAndHandleIfChannelNotFound(final MbusChannelElementsResponseDto mbusChannelElementsResponseDto) throws FunctionalException { if (!mbusChannelElementsResponseDto.isChannelFound()) { throw new FunctionalException(FunctionalExceptionType.NO_MBUS_DEVICE_CHANNEL_FOUND, ComponentType.DOMAIN_SMART_METERING, new MBusChannelNotFoundException(this.buildErrorMessage(mbusChannelElementsResponseDto))); } }

Target:
private void checkAndHandleIfChannelNotFound(final MbusChannelElementsResponseDto mbusChannelElementsResponseDto) throws FunctionalException { if (!mbusChannelElementsResponseDto.isChannelFound()) { throw new FunctionalException(FunctionalExceptionType.NO_MBUS_DEVICE_CHANNEL_FOUND, ComponentType.DOMAIN_SMART_METERING, new MBusChannelNotFoundException( String.valueOf(mbusChannelElementsResponseDto.getRetrievedChannelElements()))); } }
Source:
public Iterable<Contents> listObjects(final String bucket, final String keyPrefix, final String nextMarker, final int maxKeys) throws IOException { return new LazyObjectIterable(client, bucket, keyPrefix, nextMarker, maxKeys, 5); }

Target:
public Iterable<Contents> listObjects(final String bucket, final String keyPrefix, final String nextMarker, final int maxKeys) throws IOException { return new LazyObjectIterable(client, bucket, keyPrefix, nextMarker, maxKeys, DEFAULT_LIST_OBJECTS_RETRIES); }
Source:
public File getOutputFileToWrite(Obs obs) throws IOException { String t = obs.getComplexData().getTitle(); String extension = getExtension(t); String title = obs.getComplexData().getTitle(); File dir = OpenmrsUtil.getDirectoryInApplicationDataDirectory(Context.getAdministrationService().getGlobalProperty( OpenmrsConstants.GLOBAL_PROPERTY_COMPLEX_OBS_DIR)); File outputFile; if (null == title) { String now = longfmt.format(new Date()); outputFile = new File(dir, now); } else { title = title.replace("." + extension, ""); outputFile = new File(dir, title + "." + extension); } String tmp; if (outputFile.exists() || StringUtils.isNotBlank(obs.getComplexData().getMimeType())) { tmp = String.valueOf(outputFile.getAbsolutePath().replace("." + extension, "")); String mimetype = ""; if (StringUtils.isNotBlank(obs.getComplexData().getMimeType())) { mimetype = "_" + obs.getComplexData().getMimeType().replace("/", "-slash-"); } String twoDigitNumber = ""; if (new File(tmp + mimetype + "." + extension).exists()) { for (int i = 1; obs.getObsId() == null && i < 100; i++) { twoDigitNumber = "_" + nf.format(Integer.valueOf(i)); if (!new File(tmp + mimetype + twoDigitNumber + "." + extension).exists()) { break; } } } String filename = tmp + mimetype + twoDigitNumber; outputFile = new File(filename + "." + extension); } return outputFile; }

Target:
public File getOutputFileToWrite(Obs obs) throws IOException { String t = obs.getComplexData().getTitle(); String extension = getExtension(t); String title = obs.getComplexData().getTitle(); File dir = OpenmrsUtil.getDirectoryInApplicationDataDirectory(Context.getAdministrationService().getGlobalProperty( OpenmrsConstants.GLOBAL_PROPERTY_COMPLEX_OBS_DIR)); File outputfile = null; if (null == title) { String now = longfmt.format(new Date()); outputfile = new File(dir, now); } else { title = title.replace("." + extension, ""); outputfile = new File(dir, title + "." + extension); } String mimetype = ""; if (StringUtils.isNotBlank(obs.getComplexData().getMimeType())) { mimetype = "_" + obs.getComplexData().getMimeType().replace("/", "-slash-"); outputfile = new File(dir, title + mimetype + "." + extension); } int i = 0; String tmp = null; while (obs.getObsId() == null && outputfile.exists() && i < 100) { tmp = null; tmp = String.valueOf(outputfile.getAbsolutePath().replace("." + extension, "")); outputfile = null; String filename = (i < 1) ? tmp + "_" + nf.format(Integer.valueOf(++i)) : tmp.replace(nf.format(Integer .valueOf(i)), nf.format(Integer.valueOf(++i))); outputfile = new File(filename + "." + extension); } return outputfile; }
Source:
public ResponseEntity<String> getDocumentContent(@PathVariable("name") String documentName) throws SdkClientException, AmazonServiceException, IOException { GetObjectRequest getObjectRequest = new GetObjectRequest(this.bucketName, documentName); S3Object documentObject = this.s3Client.getObject(getObjectRequest); InputStream inputStream = documentObject.getObjectContent(); String documentContent = StreamUtils.copyToString(inputStream, StandardCharsets.UTF_8); return ResponseEntity.ok().body(documentContent); }

Target:
public ResponseEntity<StreamingResponseBody> getDocumentContent( @PathVariable("name") String documentName) throws SdkClientException { GetObjectRequest getObjectRequest = new GetObjectRequest(this.bucketName, documentName); S3Object documentObject = this.s3Client.getObject(getObjectRequest); ObjectMetadata objectMetadata = documentObject.getObjectMetadata(); HttpHeaders headers = new HttpHeaders(); headers.set(HttpHeaders.ACCEPT_RANGES, "bytes"); headers.set(HttpHeaders.CONTENT_DISPOSITION, "inline; preview-type=application/html"); headers.set(HttpHeaders.CONTENT_TYPE, objectMetadata.getContentType()); headers.set(HttpHeaders.ETAG, objectMetadata.getETag()); headers.setCacheControl("max-age=86401"); headers.setContentLength(objectMetadata.getContentLength()); StreamingResponseBody responseBody = outputStream -> { try (InputStream inputStream = documentObject.getObjectContent()) { int numberOfBytes; byte[] data = new byte[1024]; while ((numberOfBytes = inputStream.read(data, 0, data.length)) != -1) { outputStream.write(data, 0, numberOfBytes); } } }; CacheControl cacheControl = CacheControl.maxAge(24, TimeUnit.HOURS) .noTransform() .cachePublic(); return ResponseEntity.ok().headers(headers) .cacheControl(cacheControl) .body(responseBody); }
Source:
private void dropMessage(AddressedTuple tuple, JCQueue queue) { ++dropCount; queue.recordMsgDrop(); LOG.warn("Dropping message as overflow threshold has reached for Q = {}. OverflowCount = {}. Total Drop Count= {}, Dropped Message : {}", queue.getName(), queue.getOverflowCount(), dropCount, tuple.toString()); }

Target:
private void dropMessage(AddressedTuple tuple, JCQueue queue) { ++dropCount; queue.recordMsgDrop(); LOG.warn("Dropping message as overflow threshold has reached for Q = {}. OverflowCount = {}. Total Drop Count= {}, Dropped Message : {}", queue.getName(), queue.getOverflowCount(), dropCount, tuple); }
Source:
private static void waitForCrateFramework() { Awaitility.await().atMost(WAIT_TIMEOUT_SECONDS, TimeUnit.SECONDS) .pollInterval(1, TimeUnit.SECONDS).until(new Callable<Boolean>() { @Override public Boolean call() throws Exception { Framework fw = cluster.getMaster().getState().getFramework("crate-mesos"); if (fw != null) { crateMesosFrameworkHostIp = cluster.getAgentStateInfo(fw.getHostname()).getString("hostname"); int status = Unirest.head( String.format("http://%s:%d/cluster", crateMesosFrameworkHostIp, API_PORT)).asJson().getStatus(); return status == 200; } else { return false; } } }); }

Target:
private static void waitForCrateFramework() { Awaitility.await().atMost(WAIT_TIMEOUT_SECONDS, TimeUnit.SECONDS) .pollInterval(1, TimeUnit.SECONDS).until(new Callable<Boolean>() { @Override public Boolean call() throws Exception { Framework fw = cluster.getMaster().getState().getFramework("crate-mesos"); int status = 0; if (fw != null) { crateMesosFrameworkHostIp = cluster.getAgentStateInfo(fw.getHostname()).getString("hostname"); try { status = Unirest.head( String.format("http://%s:%d/cluster", crateMesosFrameworkHostIp, API_PORT)).asJson().getStatus(); } catch (UnirestException e) { } return status == 200; } return false; } }); }
Source:
final protected void interrupted() { onInterrupted(); if (!previous.isRunning()) { previous.start(); } }

Target:
final protected void interrupted() { onInterrupted(); if (previous != null && (!previous.isRunning() || previous.isCanceled())) { previous.start(); } }
Source:
public String getLabel() { return "Drop Association as DestroyLinkAction"; }

Target:
public String getLabel() { return Messages.AssociationToDestroyLinkActionDropStrategy_Label; }
Source:
private void showInputSurface() { if (mInputSurface == null) { mInputSurface = mService.makeSurfaceBuilder( mService.mRoot.getDisplayContent(mDisplayContent.getDisplayId()).getSession()) .setContainerLayer() .setName("Drag and Drop Input Consumer").build(); } final InputWindowHandle h = getInputWindowHandle(); if (h == null) { Slog.w(TAG_WM, "Drag is in progress but there is no " + "drag window handle."); return; } mTransaction.show(mInputSurface); mTransaction.setInputWindowInfo(mInputSurface, h); mTransaction.setLayer(mInputSurface, Integer.MAX_VALUE); mTmpClipRect.set(0, 0, mDisplaySize.x, mDisplaySize.y); mTransaction.setWindowCrop(mInputSurface, mTmpClipRect); mTransaction.transferTouchFocus(mTransferTouchFromToken, h.token); mTransferTouchFromToken = null; mDisplayContent.reparentToOverlay(mTransaction, mInputSurface); mTransaction.syncInputWindows(); mTransaction.apply(); }

Target:
private void showInputSurface() { if (mInputSurface == null) { mInputSurface = mService.mRoot.getDisplayContent(mDisplayContent.getDisplayId()) .makeOverlay() .setContainerLayer() .setName("Drag and Drop Input Consumer").build(); } final InputWindowHandle h = getInputWindowHandle(); if (h == null) { Slog.w(TAG_WM, "Drag is in progress but there is no " + "drag window handle."); return; } mTransaction.show(mInputSurface); mTransaction.setInputWindowInfo(mInputSurface, h); mTransaction.setLayer(mInputSurface, Integer.MAX_VALUE); mTmpClipRect.set(0, 0, mDisplaySize.x, mDisplaySize.y); mTransaction.setWindowCrop(mInputSurface, mTmpClipRect); mTransaction.transferTouchFocus(mTransferTouchFromToken, h.token); mTransferTouchFromToken = null; mTransaction.syncInputWindows(); mTransaction.apply(); }
Source:
protected void performRemove(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException { if (context.isResourceServiceRestartAllowed()) { String securityDomainName = context.getCurrentAddressValue(); context.addStep(new OperationStepHandler() { @Override public void execute(OperationContext operationContext, ModelNode modelNode) throws OperationFailedException { context.removeService(new SingleSignOnManagerServiceNameProvider(securityDomainName).getServiceName()); context.removeService(new SingleSignOnSessionFactoryServiceNameProvider(securityDomainName).getServiceName()); } }, OperationContext.Stage.RUNTIME); } super.performRemove(context, operation, model); knownApplicationSecurityDomains.remove(context.getCurrentAddressValue()); }

Target:
protected void performRemove(OperationContext context, ModelNode operation, ModelNode model) throws OperationFailedException { super.performRemove(context, operation, model); knownApplicationSecurityDomains.remove(context.getCurrentAddressValue()); }
Source:
public String serializeEntry(List<String> entry) { try { return mapper.writer().writeValueAsString(entry); } catch (JsonProcessingException e) { throw new IllegalArgumentException(e); } }

Target:
public String serializeEntry(List<String> entry) { try { return mapper.writer().writeValueAsString(entry); } catch (JsonProcessingException e) { throw new IllegalStateException( format("Failed to serialize list of strings %s to YAML", entry), e); } }
Source:
public Optional<FieldProjectionExpectations<Float>> getFieldProjectionExpectations() { return Optional.of( new FieldProjectionExpectations<>( 1.001f, 3.0f, 5.1f ) ); }

Target:
public Optional<FieldProjectionExpectations<Float>> getFieldProjectionExpectations() { return Optional.of( new FieldProjectionExpectations<>( -1.001f, 3.0f, 5.1f ) ); }
Source:
public void testExecute_invalidRecommendedLength_shouldThrowException() { InstructorAttributes instructor1ofCourse1 = typicalBundle.instructors.get("instructor1OfCourse1"); FeedbackSessionAttributes session = typicalBundle.feedbackSessions.get("session1InCourse1"); FeedbackQuestionAttributes typicalQuestion = logic.getFeedbackQuestion(session.getFeedbackSessionName(), session.getCourseId(), 1); loginAsInstructor(instructor1ofCourse1.getGoogleId()); String[] param = new String[] { Const.ParamsNames.FEEDBACK_QUESTION_ID, typicalQuestion.getFeedbackQuestionId(), }; FeedbackQuestionUpdateRequest updateRequest = getTypicalTextQuestionUpdateRequest(); FeedbackTextQuestionDetails textQuestionDetails = new FeedbackTextQuestionDetails(); textQuestionDetails.setRecommendedLength(-1); updateRequest.setQuestionDetails(textQuestionDetails); UpdateFeedbackQuestionAction a = getAction(updateRequest, param); assertThrows(InvalidHttpRequestBodyException.class, () -> getJsonResult(a)); assertEquals(typicalQuestion.getQuestionDescription(), logic.getFeedbackQuestion(typicalQuestion.getId()).getQuestionDescription()); assertEquals(null, ((FeedbackTextQuestionDetails) typicalQuestion.getQuestionDetails()) .getRecommendedLength()); }

Target:
public void testExecute_invalidRecommendedLength_shouldThrowException() { InstructorAttributes instructor1ofCourse1 = typicalBundle.instructors.get("instructor1OfCourse1"); FeedbackSessionAttributes session = typicalBundle.feedbackSessions.get("session1InCourse1"); FeedbackQuestionAttributes typicalQuestion = logic.getFeedbackQuestion(session.getFeedbackSessionName(), session.getCourseId(), 1); loginAsInstructor(instructor1ofCourse1.getGoogleId()); String[] param = new String[] { Const.ParamsNames.FEEDBACK_QUESTION_ID, typicalQuestion.getFeedbackQuestionId(), }; FeedbackQuestionUpdateRequest updateRequest = getTypicalTextQuestionUpdateRequest(); FeedbackTextQuestionDetails textQuestionDetails = new FeedbackTextQuestionDetails(); textQuestionDetails.setRecommendedLength(-1); updateRequest.setQuestionDetails(textQuestionDetails); UpdateFeedbackQuestionAction a = getAction(updateRequest, param); assertThrows(InvalidHttpRequestBodyException.class, () -> getJsonResult(a)); assertEquals(typicalQuestion.getQuestionDescription(), logic.getFeedbackQuestion(typicalQuestion.getId()).getQuestionDescription()); assertNull(((FeedbackTextQuestionDetails) typicalQuestion.getQuestionDetails()).getRecommendedLength()); }
Source:
public static String space(int n) { if (n < 1) { return ""; } StringBuilder buf = new StringBuilder(n); for (int i = 0; i < n; i++) { buf.append(" "); } return buf.toString(); }

Target:
public static String space(int n) { return repeat(" ", n); }
Source:
protected Control createDialogArea(Composite parent) { Composite composite = (Composite) super.createDialogArea(parent); Label messageLabel = createMessageArea(composite); Text filterText = createFilterText(composite); CheckboxTreeViewer treeViewer = createTreeViewer(composite); Control buttonComposite = createSelectionButtons(composite); GridData filterData = new GridData(GridData.FILL_HORIZONTAL); filterData.widthHint = convertWidthInCharsToPixels(fWidth); filterText.setLayoutData(filterData); GridData data = new GridData(GridData.FILL_BOTH); data.widthHint = convertWidthInCharsToPixels(fWidth); data.heightHint = convertHeightInCharsToPixels(fHeight); Tree treeWidget = treeViewer.getTree(); treeWidget.setLayoutData(data); treeWidget.setFont(parent.getFont()); if (fIsEmpty) { messageLabel.setEnabled(false); filterText.setEnabled(false); treeWidget.setEnabled(false); buttonComposite.setEnabled(false); } return composite; }

Target:
protected Control createDialogArea(Composite parent) { Composite composite = (Composite) super.createDialogArea(parent); Label messageLabel = createMessageArea(composite); CheckboxTreeViewer treeViewer = createTreeViewer(composite); Control buttonComposite = createSelectionButtons(composite); GridData data = new GridData(GridData.FILL_BOTH); data.widthHint = convertWidthInCharsToPixels(fWidth); data.heightHint = convertHeightInCharsToPixels(fHeight); Tree treeWidget = treeViewer.getTree(); treeWidget.setLayoutData(data); treeWidget.setFont(parent.getFont()); if (fIsEmpty) { messageLabel.setEnabled(false); treeWidget.setEnabled(false); buttonComposite.setEnabled(false); } return composite; }
Source:
public VoltTable[] run(SystemProcedureExecutionContext ctx) { VoltDBInterface voltdb = VoltDB.instance(); OperationMode opMode = voltdb.getMode(); if (ctx.isLowestSiteId() && opMode != OperationMode.PAUSED) { ZooKeeper zk = voltdb.getHostMessenger().getZK(); try { Stat stat; OperationMode zkMode = null; Code code; do { stat = new Stat(); code = Code.OK; try { byte data = zk.getData(VoltZK.operationMode, false, stat); zkMode = data == null ? opMode : OperationMode.valueOf(data); if (zkMode == OperationMode.PAUSED) { break; } stat = zk.setData(VoltZK.operationMode, OperationMode.PAUSED.getBytes(), stat.getVersion()); } catch (BadVersionException ex) { code = ex.code(); } } while (zkMode != OperationMode.PAUSED && code != Code.BADVERSION); m_stat = stat; voltdb.setMode(OperationMode.PAUSED); voltdb.getHostMessenger().pause(); } catch (Exception e) { throw new RuntimeException(e); } } VoltTable t = new VoltTable(VoltSystemProcedure.STATUS_SCHEMA); t.addRow(VoltSystemProcedure.STATUS_OK); return (new VoltTable[] {t}); }

Target:
public VoltTable[] run(SystemProcedureExecutionContext ctx) { if (ctx.isLowestSiteId()) { VoltDBInterface voltdb = VoltDB.instance(); OperationMode opMode = voltdb.getMode(); if (LOG.isDebugEnabled()) { LOG.debug("voltdb opmode is " + opMode); } ZooKeeper zk = voltdb.getHostMessenger().getZK(); try { Stat stat; OperationMode zkMode = null; Code code; do { stat = new Stat(); code = Code.BADVERSION; try { byte data = zk.getData(VoltZK.operationMode, false, stat); if (LOG.isDebugEnabled()) { LOG.debug("zkMode is " + (zkMode == null ? "(null)" : OperationMode.valueOf(data))); } zkMode = data == null ? opMode : OperationMode.valueOf(data); if (zkMode == PAUSED) { if (LOG.isDebugEnabled()) { LOG.debug("read node at version " + stat.getVersion() + ", txn " + ll(stat.getMzxid())); } break; } stat = zk.setData(VoltZK.operationMode, PAUSED.getBytes(), stat.getVersion()); code = Code.OK; zkMode = PAUSED; if (LOG.isDebugEnabled()) { LOG.debug("!WROTE! node at version " + stat.getVersion() + ", txn " + ll(stat.getMzxid())); } break; } catch (BadVersionException ex) { code = ex.code(); } } while (zkMode != PAUSED && code == Code.BADVERSION); m_stat = stat; voltdb.getHostMessenger().pause(); voltdb.setMode(PAUSED); } catch (Exception e) { throw new RuntimeException(e); } } VoltTable t = new VoltTable(VoltSystemProcedure.STATUS_SCHEMA); t.addRow(VoltSystemProcedure.STATUS_OK); return (new VoltTable[] {t}); }
Source:
public void dispatchEvent(final Object event, final Dictionary<?,?> serviceProperties) { assert event != null; if (DsfDebugOptions.DEBUG && DsfDebugOptions.DEBUG_SESSION && DsfDebugOptions.DEBUG_SESSION_DISPATCHES) { String msg = new Formatter().format( "%s Dispatching event %s to session %s from thread \"%s\" (%d)", DsfPlugin.getDebugTime(), LoggingUtils.toString(event), LoggingUtils.toString(this), Thread.currentThread().getName(), Thread.currentThread().getId() ).toString(); DsfDebugOptions.trace(msg); } getExecutor().submit(new DsfRunnable() { @Override public void run() { doDispatchEvent(event, serviceProperties);} @Override public String toString() { return "Event: " + event + ", from service " + serviceProperties; } }); }

Target:
public void dispatchEvent(final Object event, final Dictionary<?,?> serviceProperties) { assert event != null; if (DsfDebugOptions.DEBUG_SESSION_DISPATCHES) { String msg = new Formatter().format( "%s Dispatching event %s to session %s from thread \"%s\" (%d)", DsfPlugin.getDebugTime(), LoggingUtils.toString(event), LoggingUtils.toString(this), Thread.currentThread().getName(), Thread.currentThread().getId() ).toString(); DsfDebugOptions.trace(msg); } getExecutor().submit(new DsfRunnable() { @Override public void run() { doDispatchEvent(event, serviceProperties);} @Override public String toString() { return "Event: " + event + ", from service " + serviceProperties; } }); }
Source:
private static boolean isTrustedProxy(String ip) { boolean isTrusted = false; for (String proxyIp : trustedProxies) { String sanitizedProxyIp = proxyIp.trim(); try { if (!sanitizedProxyIp.isEmpty() && new IpAddressMatcher(sanitizedProxyIp).matches(ip)) { isTrusted = true; break; } } catch (IllegalArgumentException argEx) { LOG.error(argEx); } } return isTrusted; }

Target:
private boolean isTrustedProxy(String ip) { boolean isTrusted = false; for (IpAddressMatcher ipAddressMatcher : ipAddressMatcherCache.values()) { if (ipAddressMatcher.matches(ip)) { isTrusted = true; break; } } return isTrusted; }
Source:
public WorkflowResponse execute(WorkflowDTO workflowDTO) throws WorkflowException { if (log.isDebugEnabled()) { log.debug("Executing User SignUp Webservice Workflow for " + workflowDTO.getWorkflowReference()); } String callBackURL = workflowDTO.getCallbackUrl(); String tenantAwareUserName = MultitenantUtils.getTenantAwareUsername(workflowDTO.getWorkflowReference()); String message="Approve APIStore signup request done by "+tenantAwareUserName +" from the tenant domain "+workflowDTO.getTenantDomain(); workflowDTO.setWorkflowDescription(message); workflowDTO.setMetadata("TenantUserName", tenantAwareUserName); workflowDTO.setMetadata("TenantDomain", workflowDTO.getTenantDomain()); workflowDTO.setMetadata("workflowExternalRef", workflowDTO.getExternalWorkflowReference()); workflowDTO.setMetadata("callBackURL", callBackURL != null ? callBackURL : "?"); workflowDTO.setProperties("Workflow Process","User Self Sign Up"); super.execute(workflowDTO); return new GeneralWorkflowResponse(); }

Target:
public WorkflowResponse execute(WorkflowDTO workflowDTO) throws WorkflowException { if (log.isDebugEnabled()) { log.debug("Executing User SignUp Webservice Workflow for " + workflowDTO.getWorkflowReference()); } String callBackURL = workflowDTO.getCallbackUrl(); String tenantAwareUserName = MultitenantUtils.getTenantAwareUsername(workflowDTO.getWorkflowReference()); String message = "Approve APIStore signup request done by " + tenantAwareUserName + " from the tenant domain " + workflowDTO.getTenantDomain(); workflowDTO.setWorkflowDescription(message); super.execute(workflowDTO); return new GeneralWorkflowResponse(); }