auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
default @Nullable UUID getUUID() { StringBuilder sb = new StringBuilder(); File file = new File(getPath()); if (file.isDirectory()) { for (File childFile : file.listFiles()) { sb.append(childFile.getName()); sb.append(childFile.length()); sb.append(childFile.lastModified()); } } else if (file.exists()) { sb.append(file.getName()); sb.append(file.length()); sb.append(file.lastModified()); } for (ITmfEventProvider child : getChildren()) { if (child instanceof ITmfTrace) { sb.append(String.valueOf(((ITmfTrace) child).getUUID())); } } String base = sb.toString(); int step = base.length() / 4; byte data = new byte[16]; ByteBuffer bb = ByteBuffer.wrap(data); for (int i = 0; i < 4; i++) { bb.putInt(base.substring(i * step, (i + 1) * step).hashCode()); } return UUID.nameUUIDFromBytes(data); }

Target:
default @Nullable UUID getUUID() { StringBuilder sb = new StringBuilder(); File file = new File(getPath()); if (file.isDirectory()) { for (File childFile : file.listFiles()) { sb.append(childFile.getName()); sb.append(childFile.length()); sb.append(childFile.lastModified()); } } else if (file.exists()) { sb.append(file.getName()); sb.append(file.length()); sb.append(file.lastModified()); } for (ITmfEventProvider child : getChildren()) { if (child instanceof ITmfTrace) { sb.append(String.valueOf(((ITmfTrace) child).getUUID())); } } return UUID.nameUUIDFromBytes(Objects.requireNonNull(sb.toString().getBytes(Charset.defaultCharset()))); }
Source:
public boolean isObjectStorage() { boolean storageHinted = status == NO_ERROR_STATUS_OBJ_STORAGE || status == SUCCESS_WITH_PREVIOUS_OBJ_STORAGE || status == NOT_EXECUTED_WITH_PREVIOUS_OBJ_STORAGE; boolean objectMediaType = keyMediaType != null && keyMediaType.match(MediaType.APPLICATION_OBJECT); return storageHinted || objectMediaType; }

Target:
public boolean isObjectStorage() { return keyMediaType != null && keyMediaType.match(MediaType.APPLICATION_OBJECT); }
Source:
private ResourceInformationReflector() { try { resourceInfoClass = Class.forName(RESOURCE_INFO_CLASS); setResourceInfoMethod = Resource.class.getMethod("setResourceInformation", String.class, resourceInfoClass); getResourceValueMethod = Resource.class.getMethod("getResources"); getInfoNameMethod = resourceInfoClass.getMethod("getName"); getInfoValueMethod = resourceInfoClass.getMethod("getValue"); resourceInfoNewInstance = resourceInfoClass.getMethod("newInstance", String.class, long.class); isYarnResourceTypesAvailable = true; } catch (Exception e) { isYarnResourceTypesAvailable = false; } }

Target:
private ResourceInformationReflector() { this(Resource.class.getName(), RESOURCE_INFO_CLASS); }
Source:
private static RenderedImage optimizeSampleModel(RenderedImage source) { int w = source.getWidth(); int h = source.getHeight(); ImageLayout layout = new ImageLayout(); layout.setColorModel(source.getColorModel()); layout.setSampleModel(source.getColorModel().createCompatibleSampleModel(w, h)); layout.setTileWidth(w); layout.setTileHeight(h); RenderingHints hints = new RenderingHints(JAI.KEY_IMAGE_LAYOUT, layout); LookupTable table = LookupTableFactory.create(IDENTITY_TABLE); ImageWorker worker = new ImageWorker(source); worker.setRenderingHints(hints); worker.looukp(table); return worker.getRenderedImage(); }

Target:
private static RenderedImage optimizeSampleModel(RenderedImage source) { int w = source.getWidth(); int h = source.getHeight(); ImageLayout layout = new ImageLayout(); layout.setColorModel(source.getColorModel()); layout.setSampleModel(source.getColorModel().createCompatibleSampleModel(w, h)); layout.setTileWidth(w); layout.setTileHeight(h); RenderingHints hints = new RenderingHints(JAI.KEY_IMAGE_LAYOUT, layout); LookupTable table = LookupTableFactory.create(IDENTITY_TABLE); ImageWorker worker = new ImageWorker(source); worker.setRenderingHints(hints); worker.lookup(table); return worker.getRenderedImage(); }
Source:
protected UserDevfilePermissionImpl getEntity(String userId, String instanceId) throws NotFoundException, ServerException { try { return doGet(userId, instanceId); } catch (NoResultException e) { throw new NotFoundException( format( "User devfile permission for devfile '%s' with id '%s' was not found.", instanceId, userId)); } catch (RuntimeException e) { throw new ServerException(e.getMessage(), e); } }

Target:
protected UserDevfilePermissionImpl getEntity(String userId, String instanceId) throws NotFoundException, ServerException { try { return doGet(userId, instanceId); } catch (NoResultException e) { throw new NotFoundException( format("User %s does not have permissions assigned to devfile %s.", instanceId, userId)); } catch (RuntimeException e) { throw new ServerException(e.getMessage(), e); } }
Source:
public void actionPerformed(ActionEvent e) { final Project project = appContext.getRootProject(); final Resource resource = appContext.getResource(); checkState(project != null, "Null project occurred"); checkState(project.getLocation().isPrefixOf(resource.getLocation()), "Given selected item is not descendant of given project"); final String selectedItemPath = resource.getLocation() .removeFirstSegments(project.getLocation().segmentCount()) .removeTrailingSeparator() .toString(); service.diff(project.getLocation(), selectedItemPath.isEmpty() ? null : singletonList(selectedItemPath), NAME_STATUS, false, 0, REVISION, false) .then(diff -> { if (diff.isEmpty()) { dialogFactory.createMessageDialog(locale.compareMessageIdenticalContentTitle(), locale.compareMessageIdenticalContentText(), null).show(); } else { ChangedItems changedItems = new ChangedItems(project, diff); if (changedItems.getFilesQuantity() == 1) { comparePresenter.showCompareWithLatest(changedItems, null, REVISION); } else { changesListPresenter.show(changedItems, REVISION, null); } } }) .catchError(arg -> { notificationManager.notify(locale.diffFailed(), FAIL, NOT_EMERGE_MODE); }); }

Target:
public void actionPerformed(ActionEvent e) { final Project project = appContext.getRootProject(); final Resource resource = appContext.getResource(); checkState(project != null, "Null project occurred"); checkState( project.getLocation().isPrefixOf(resource.getLocation()), "Given selected item is not descendant of given project"); final String selectedItemPath = resource .getLocation() .removeFirstSegments(project.getLocation().segmentCount()) .removeTrailingSeparator() .toString(); service .diff( project.getLocation(), selectedItemPath.isEmpty() ? null : singletonList(selectedItemPath), NAME_STATUS, false, 0, REVISION, false) .then( diff -> { if (diff.isEmpty()) { dialogFactory .createMessageDialog( locale.compareMessageIdenticalContentTitle(), locale.compareMessageIdenticalContentText(), null) .show(); } else { AlteredFiles alteredFiles = new AlteredFiles(project, diff); if (alteredFiles.getFilesQuantity() == 1) { comparePresenter.showCompareWithLatest(alteredFiles, null, REVISION); } else { changesListPresenter.show(alteredFiles, REVISION, null); } } }) .catchError( arg -> { notificationManager.notify(locale.diffFailed(), FAIL, NOT_EMERGE_MODE); }); }
Source:
protected boolean set(IMixinMobSpawner container, Short value) { container.getSpawnerBaseLogic().activatingRangeFromPlayer = checkNotNull(value); return true; }

Target:
protected boolean set(IMixinMobSpawner container, Short value) { container.getSpawnerBaseLogic().activatingRangeFromPlayer = value; return true; }
Source:
public Obs getRevisionObs(Obs initialObs) { Obs revisedObs = dao.getRevisionObs(initialObs); if (revisedObs != null && revisedObs.getVoided()) { revisedObs = getRevisionObs(revisedObs); } return revisedObs; }

Target:
public Obs getRevisionObs(Obs initialObs) { return dao.getRevisionObs(initialObs); }
Source:
public void testInitCanBeCalledTwice() throws Exception { MacPoolPerDc pool = new MacPoolPerDc(); pool.initialize(); Mockito.verify(dbFacadeMock).getMacPoolDao(); Mockito.verify(macPoolDaoMock).getAll(); Mockito.verifyNoMoreInteractions(storagePoolDaoMock, vmNicDaoMock, macPoolDaoMock, dbFacadeMock); pool.initialize(); }

Target:
public void testInitCanBeCalledTwice() throws Exception { MacPoolPerDc pool = new MacPoolPerDc(); pool.initialize(); Mockito.verify(dbFacadeMock).getMacPoolDao(); Mockito.verify(macPoolDaoMock).getAll(); pool.initialize(); Mockito.verifyNoMoreInteractions(storagePoolDaoMock, vmNicDaoMock, macPoolDaoMock, dbFacadeMock); }
Source:
private void test(List<byte[]> input) throws IOException { Multipart sender = new Multipart("http://localhost:" + port + "/multipart", "UTF-8"); for (byte[] in : input) sender.addFilePart("file", new NamedStreamable.ByteArrayWrapper(in)); String res = sender.finish(); List<byte[]> result = received.poll(); boolean sameLength = result.size() == input.size(); if (! sameLength) System.out.println(); Assert.assertTrue("Same length on other end", sameLength); List<Integer> differences = IntStream.range(0, input.size()) .filter(i -> !Arrays.equals(input.get(i), result.get(i))) .mapToObj(Integer::valueOf) .collect(Collectors.toList()); Assert.assertTrue("Same result on other end: " + differences, differences.size() == 0); }

Target:
private void test(List<byte[]> input) throws IOException { Multipart sender = new Multipart("http://localhost:" + port + "/multipart", "UTF-8"); for (byte[] in : input) sender.addFilePart("file", new NamedStreamable.ByteArrayWrapper(in)); String res = sender.finish(); List<byte[]> result = received.poll(); boolean sameLength = result.size() == input.size(); Assert.assertTrue("Same length on other end", sameLength); List<Integer> differences = IntStream.range(0, input.size()) .filter(i -> !Arrays.equals(input.get(i), result.get(i))) .mapToObj(Integer::valueOf) .collect(Collectors.toList()); Assert.assertTrue("Same result on other end: " + differences, differences.size() == 0); }
Source:
public void updateCredential(Credential credential) { Assert.checkNotNullParam("credential", credential); stateRef.get().updateCredential(credential); }

Target:
public void updateCredential(Credential credential) throws RealmUnavailableException { Assert.checkNotNullParam("credential", credential); stateRef.get().updateCredential(credential); }
Source:
private TransportFactory<? extends Channel, ? extends EventLoopGroup> getDomainTransportFactory() { try { return (TransportFactory<? extends Channel, ? extends EventLoopGroup>) Class.forName("org.asynchttpclient.netty.channel.EpollDomainTransportFactory").newInstance(); } catch (Exception e) { try { return (TransportFactory<? extends Channel, ? extends EventLoopGroup>) Class.forName("org.asynchttpclient.netty.channel.KQueueDomainTransportFactory").newInstance(); } catch (Exception e1) { throw new IllegalArgumentException("No suitable native transport (epoll or kqueue) available"); } } }

Target:
private TransportFactory<? extends Channel, ? extends EventLoopGroup> getDomainTransportFactory() { String nativeTransportFactoryClassName = null; if (PlatformDependent.isOsx()) { nativeTransportFactoryClassName = "org.asynchttpclient.netty.channel.KQueueDomainTransportFactory"; } else if (!PlatformDependent.isWindows()) { nativeTransportFactoryClassName = "org.asynchttpclient.netty.channel.EpollDomainTransportFactory"; } return loadNativeTransportFactory(nativeTransportFactoryClassName); }
Source:
void checkOne(String workspaceId) { InternalRuntime<?> internalRuntime; try { internalRuntime = workspaceRuntimes.getInternalRuntime(workspaceId); } catch (InfrastructureException | ServerException e) { LOG.error( "Failed to get internal runtime to check consistency. Cause: {}", e.getMessage(), e); return; } RuntimeIdentity runtimeId = internalRuntime.getContext().getIdentity(); if (!(internalRuntime instanceof KubernetesInternalRuntime)) { LOG.error( "Fetched internal runtime '{}:{}' is not Kubernetes, it is not possible to check consistency.", runtimeId.getWorkspaceId(), runtimeId.getOwnerId()); return; } KubernetesInternalRuntime k8sRuntime = (KubernetesInternalRuntime) internalRuntime; try { if (k8sRuntime.isConsistent()) { return; } } catch (InfrastructureException e) { LOG.error("Error occurred during runtime consistency checking. Cause: {}", e.getMessage(), e); return; } LOG.warn( "Found runtime `{}:{}` with inconsistent state. It's going to be stopped automatically", runtimeId.getWorkspaceId(), runtimeId.getOwnerId()); try { eventPublisher.sendAbnormalStoppingEvent(runtimeId, "The runtime has inconsistent state."); k8sRuntime.stop(emptyMap()); eventPublisher.sendAbnormalStoppedEvent(runtimeId, "The runtime has inconsistent state."); } catch (InfrastructureException e) { LOG.error( "Failed to stop the runtime '{}:{}' which has inconsistent state. Error: {}", runtimeId.getWorkspaceId(), runtimeId.getOwnerId(), e.getMessage(), e); } }

Target:
void checkOne(String workspaceId) throws InfrastructureException { LOG.debug("Checking consistency of runtime for workspace `{}`", workspaceId); KubernetesInternalRuntime k8sRuntime = getKubernetesInternalRuntime(workspaceId); RuntimeIdentity runtimeId = k8sRuntime.getContext().getIdentity(); try { if (k8sRuntime.isConsistent()) { return; } } catch (InfrastructureException e) { throw new InfrastructureException( format( "Error occurred during runtime '%s:%s' consistency checking. Cause: %s", runtimeId.getWorkspaceId(), runtimeId.getOwnerId(), e.getMessage()), e); } if (!isRunning(k8sRuntime)) { return; } LOG.warn( "Found runtime `{}:{}` with inconsistent state. It's going to be stopped automatically", runtimeId.getWorkspaceId(), runtimeId.getOwnerId()); stopAbnormally(k8sRuntime); LOG.debug("Checking consistency of runtime for workspace `{}` is finished", workspaceId); }
Source:
public void edit(ImportCloneModel object) { if (object.getEntity() instanceof VM) { dialogLabelEditor.setText(constants.sameVmNameExists() .replaceFirst("\\$\\{VmName\\}", ((VM) object.getEntity()).getVmName())); cloneEditor.setLabel(constants.cloneImportVm()); suffixEditor.setLabel(constants.cloneImportSuffixVm()); } else { dialogLabelEditor.setText(constants.sameTemplateNameExists() + " (" + ((VmTemplate) object.getEntity()).getname() + ")"); cloneEditor.setLabel(constants.cloneImportTemplate()); suffixEditor.setLabel(constants.cloneImportSuffixTemplate()); } Driver.driver.edit(object); }

Target:
public void edit(ImportCloneModel object) { if (object.getEntity() instanceof VM) { dialogLabelEditor.setText(messages.sameVmNameExists(((VM) object.getEntity()).getVmName())); cloneEditor.setLabel(templates.twoLinesRadioButtonLabel(constants.cloneImportVm(), constants.cloneImportVmDetails()).asString()); suffixEditor.setLabel(constants.cloneImportSuffixVm()); } else { dialogLabelEditor.setText(constants.sameTemplateNameExists() + " (" + ((VmTemplate) object.getEntity()).getname() + ")"); cloneEditor.setLabel(constants.cloneImportTemplate()); suffixEditor.setLabel(constants.cloneImportSuffixTemplate()); } Driver.driver.edit(object); }
Source:
public ImmutableRatesProviderBuilder iborIndexCurve( IborIndex index, Curve forwardCurve, LocalDateDoubleTimeSeries timeSeries) { ArgChecker.notNull(index, "currency"); ArgChecker.notNull(forwardCurve, "forwardCurve"); ArgChecker.notNull(timeSeries, "timeSeries"); this.indexCurves.put(index, forwardCurve); this.timeSeries.put(index, timeSeries); return this; }

Target:
public ImmutableRatesProviderBuilder iborIndexCurve( IborIndex index, Curve forwardCurve, LocalDateDoubleTimeSeries timeSeries) { ArgChecker.notNull(index, "index"); ArgChecker.notNull(forwardCurve, "forwardCurve"); ArgChecker.notNull(timeSeries, "timeSeries"); this.indexCurves.put(index, forwardCurve); this.timeSeries.put(index, timeSeries); return this; }
Source:
protected void executeQueryCommand() { List<OvfEntityData> entityList = getDbFacade() .getUnregisteredOVFDataDao().getAllForStorageDomainByEntityType(getParameters().getId(), getParameters().getName()); List<VmTemplate> vmTemplates = new ArrayList<>(); OvfHelper ovfHelper = new OvfHelper(); for (OvfEntityData ovf : entityList) { VmTemplate vmTemplate = null; if (getParameters().isFullData()) { try { vmTemplate = ovfHelper.readVmTemplateFromOvf(ovf.getOvfData()); getQueryReturnValue().setSucceeded(true); vmTemplates.add(vmTemplate); } catch (OvfReaderException e) { log.debug("failed to parse a given ovf configuration: \n" + ovf.getOvfData(), e); getQueryReturnValue().setExceptionString("failed to parse a given ovf configuration " + e.getMessage()); } } else { vmTemplate = new VmTemplate(); vmTemplate.setId(ovf.getEntityId()); vmTemplate.setName(ovf.getEntityName()); vmTemplate.setClusterArch(ovf.getArchitecture()); } vmTemplates.add(vmTemplate); } getQueryReturnValue().setReturnValue(vmTemplates); }

Target:
protected void executeQueryCommand() { List<OvfEntityData> entityList = getOvfEntityList(); List<VmTemplate> vmTemplates = new ArrayList<>(); OvfHelper ovfHelper = getOvfHelper(); for (OvfEntityData ovf : entityList) { VmTemplate vmTemplate = null; try { vmTemplate = ovfHelper.readVmTemplateFromOvf(ovf.getOvfData()); vmTemplates.add(vmTemplate); } catch (OvfReaderException e) { log.debug("failed to parse a given ovf configuration: \n" + ovf.getOvfData(), e); getQueryReturnValue().setExceptionString("failed to parse a given ovf configuration " + e.getMessage()); } } getQueryReturnValue().setSucceeded(true); getQueryReturnValue().setReturnValue(vmTemplates); }
Source:
public Boolean onReceivedHttpAuthRequest(CordovaWebView view, ICordovaHttpAuthHandler handler, String host, String realm) { for (CordovaPlugin plugin : this.pluginMap.values()) { if (plugin != null && plugin.onReceivedHttpAuthRequest(view, handler, host, realm)) { return true; } } return false; }

Target:
public boolean onReceivedHttpAuthRequest(CordovaWebView view, ICordovaHttpAuthHandler handler, String host, String realm) { for (CordovaPlugin plugin : this.pluginMap.values()) { if (plugin != null && plugin.onReceivedHttpAuthRequest(view, handler, host, realm)) { return true; } } return false; }
Source:
public void updateNumericData_shouldWriteData() { String projectId = spanner.getOptions().getProjectId(); String out = runExample( () -> UpdateNumericDataSample.updateNumericData( spanner.getDatabaseClient(DatabaseId.of(projectId, instanceId, databaseId)))); assertThat(out).contains("Records successfully updated"); }

Target:
public void updateNumericData_shouldWriteData() { String projectId = spanner.getOptions().getProjectId(); String out = runExample( () -> UpdateNumericDataSample.updateNumericData( spanner.getDatabaseClient(DatabaseId.of(projectId, instanceId, databaseId)))); assertThat(out).contains("Venues successfully updated"); }
Source:
private void waitForOperation(Operation operation) throws IOException { GetOperationRequest request = GetOperationRequest.newBuilder().setName(operation.getName()).build(); Operation currentOperationState = operation; while (true) { if (currentOperationState.getDone()) { switch (currentOperationState.getResultCase()) { case RESPONSE: return; case ERROR: throw new RuntimeException( "Cluster could not be resized: " + currentOperationState.getError()); case RESULT_NOT_SET: throw new IllegalStateException( "System returned invalid response for Operation check: " + currentOperationState); } } try { Thread.sleep(200); } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new IOException("Wating for operation was interrupted.", e); } currentOperationState = connection.getSession().getInstanceAdminClient().getOperation(request); } }

Target:
private void waitForOperation(Operation operation) throws IOException { GetOperationRequest request = GetOperationRequest.newBuilder().setName(operation.getName()).build(); Operation currentOperationState = operation; long startMs = System.currentTimeMillis(); while (true) { if (currentOperationState.getDone()) { switch (currentOperationState.getResultCase()) { case RESPONSE: return; case ERROR: throw new RuntimeException( "Cluster could not be resized: " + currentOperationState.getError()); case RESULT_NOT_SET: throw new IllegalStateException( "System returned invalid response for Operation check: " + currentOperationState); } } long waitMs = 0; long timePassedS = TimeUnit.MILLISECONDS.toSeconds(System.currentTimeMillis() - startMs); if (timePassedS < 5) { waitMs = 250; } else if (timePassedS < 60){ waitMs = 1000; } else if (timePassedS < 300) { waitMs = 10000; } else { waitMs = 60000; } try { Thread.sleep(waitMs); } catch (InterruptedException e) { Thread.currentThread().interrupt(); throw new IOException("Wating for operation was interrupted.", e); } currentOperationState = connection.getSession().getInstanceAdminClient().getOperation(request); } }
Source:
private CqlResult executeQueryOnHost(CqlQuery cqlQuery, InetSocketAddress host) { try { return clientPool.runWithRetryOnHost(host, createCqlFunction(cqlQuery)); } catch (UnavailableException e) { throw new InsufficientConsistencyException("This query requires consistency " + consistency); } catch (TException e) { throw Throwables.unwrapAndThrowAtlasDbDependencyException(e); } }

Target:
private CqlResult executeQueryOnHost(CqlQuery cqlQuery, InetSocketAddress host) { try { return clientPool.runWithRetryOnHost(host, createCqlFunction(cqlQuery)); } catch (UnavailableException e) { throw new InsufficientConsistencyException( "The query [" + cqlQuery.queryFormat + "] requires consistency " + consistency, e); } catch (TException e) { throw Throwables.unwrapAndThrowAtlasDbDependencyException(e); } }
Source:
protected void executeQueryCommand() { List<Disk> allDisksAndSnapshots = diskDao.getAllFromDisksIncludingSnapshots(getUserID(), getParameters().isFiltered()); HashMap<UUID, DiskImage> activeDisks = new HashMap<>(); HashMap<UUID, List<DiskImage>> disksLeftForAggregate = new HashMap<>(); List<Disk> result = new ArrayList<>(); allDisksAndSnapshots.stream() .filter(disk -> { if (disk.isOvfStore()) { result.add(disk); return false; } return true; }) .filter(disk -> { if (disk instanceof LunDisk) { result.add(disk); return false; } return true; }) .map(diskImage -> (DiskImage) diskImage) .forEach(diskImage -> { UUID imageId = diskImage.getId().getUuid(); if (diskImage.getActive()) { diskImage.getSnapshots().add(DiskImage.copyOf(diskImage)); activeDisks.put(imageId, diskImage); if (disksLeftForAggregate.containsKey(imageId)) { activeDisks.get(imageId).getSnapshots().addAll(disksLeftForAggregate.get(imageId)); disksLeftForAggregate.remove(imageId); } } else { if (activeDisks.containsKey(imageId)) { activeDisks.get(imageId).getSnapshots().add(diskImage); } else if (disksLeftForAggregate.containsKey(imageId)) { disksLeftForAggregate.get(imageId).add(diskImage); } else { List<DiskImage> newDiskImageList = new ArrayList<>(); newDiskImageList.add(diskImage); disksLeftForAggregate.put(imageId, newDiskImageList); } } }); result.addAll(new ArrayList<>(activeDisks.values())); getQueryReturnValue().setReturnValue(result); }

Target:
protected void executeQueryCommand() { List<Disk> allDisksAndSnapshots = diskDao.getAllFromDisksIncludingSnapshots(getUserID(), getParameters().isFiltered()); List<Disk> result = collectSnapshotsForDisks(allDisksAndSnapshots); getQueryReturnValue().setReturnValue(result); }
Source:
public void put(K key, T val) { if (val.isDirty()) { OrientDBQuery<K, T> dataStoreQuery = new OrientDBQuery<>(this); dataStoreQuery.setStartKey(key); dataStoreQuery.setEndKey(key); dataStoreQuery.populateOrientDBQuery(orientDBMapping, getFieldsToQuery(null), getFields()); ODatabaseDocumentTx selectTx = connectionPool.acquire(); selectTx.activateOnCurrentThread(); try { List<ODocument> result = selectTx.command(dataStoreQuery.getOrientDBQuery()) .execute(dataStoreQuery.getParams()); if (result.size() == 1) { ODocument document = updateOrientDocFromAvroBean(key, val, result.get(0)); docBatch.add(document); } else { ODocument document = convertAvroBeanToOrientDoc(key, val); docBatch.add(document); } } finally { selectTx.close(); } } else { LOG.info("Ignored putting persistent bean in the store as it is neither " + "new, neither dirty.", new Object[]{val}); } }

Target:
public void put(K key, T val) { if (val.isDirty()) { OrientDBQuery<K, T> dataStoreQuery = new OrientDBQuery<>(this); dataStoreQuery.setStartKey(key); dataStoreQuery.setEndKey(key); dataStoreQuery.populateOrientDBQuery(orientDBMapping, getFieldsToQuery(null), getFields()); ODatabaseDocumentTx selectTx = connectionPool.acquire(); selectTx.activateOnCurrentThread(); try { List<ODocument> result = selectTx.command(dataStoreQuery.getOrientDBQuery()) .execute(dataStoreQuery.getParams()); if (result.size() == 1) { ODocument document = updateOrientDocFromAvroBean(key, val, result.get(0)); docBatch.add(document); } else { ODocument document = convertAvroBeanToOrientDoc(key, val); docBatch.add(document); } } finally { selectTx.close(); } } else { if (LOG.isDebugEnabled()) { LOG.info("Ignored putting persistent bean in the store as it is neither " + "new, neither dirty.", new Object[]{val}); } } }
Source:
public void testInitSequence() { UIDSequencer seq = uidGeneratorService.getSequencer(); assertTrue(seq.getClass().isAssignableFrom(MongoDBUIDSequencer.class)); seq.getNext("autoSequence"); seq.getNext("autoSequence"); assertTrue(seq.getNext("autoSequence") > 2); seq.initSequence("mySequence", 1); assertTrue(seq.getNext("mySequence") > 1); assertTrue(seq.getNext("mySequence") < 10); seq.initSequence("mySequence", 10); assertTrue("Sequence should skip ahead to 10", seq.getNext("mySequence") > 10); assertTrue(seq.getNextLong("mySequence") > 10); List<LoggingEvent> caughtEvents = logCaptureResult.getCaughtEvents(); assertEquals(0, caughtEvents.size()); logFeature.hideWarningFromConsoleLog(); try { seq.initSequence("mySequence", 5); caughtEvents = logCaptureResult.getCaughtEvents(); assertEquals(1, caughtEvents.size()); assertEquals("Failed to update the sequence 'mySequence' with value 5", caughtEvents.get(0).getRenderedMessage()); logCaptureResult.clear(); seq.initSequence("another", 500); caughtEvents = logCaptureResult.getCaughtEvents(); assertEquals(0, caughtEvents.size()); seq.initSequence("another", 500); caughtEvents = logCaptureResult.getCaughtEvents(); assertEquals(1, caughtEvents.size()); assertEquals("Failed to update the sequence 'another' with value 500", caughtEvents.get(0).getRenderedMessage()); assertTrue("Sequence should be at 500",seq.getNext("another") == 501); logCaptureResult.clear(); seq.initSequence("another", 499); caughtEvents = logCaptureResult.getCaughtEvents(); assertEquals(1, caughtEvents.size()); assertEquals("Failed to update the sequence 'another' with value 499", caughtEvents.get(0).getRenderedMessage()); logCaptureResult.clear(); seq.initSequence("another", 9999); caughtEvents = logCaptureResult.getCaughtEvents(); assertEquals(0, caughtEvents.size()); assertTrue("Sequence should be at 10000",seq.getNext("another") == 10000); } finally { logFeature.restoreConsoleLog(); } }

Target:
public void testInitSequence() { UIDSequencer seq = uidGeneratorService.getSequencer(); seq.getNext("autoSequence"); seq.getNext("autoSequence"); assertTrue(seq.getNext("autoSequence") > 2); seq.initSequence("mySequence", 1); assertTrue(seq.getNext("mySequence") > 1); assertTrue(seq.getNext("mySequence") < 10); seq.initSequence("mySequence", 10); assertTrue("Sequence should skip ahead to 10", seq.getNext("mySequence") > 10); assertTrue(seq.getNextLong("mySequence") > 10); try { seq.initSequence("mySequence", 5); fail(); } catch (NuxeoException ne) { assertEquals("Failed to update the sequence 'mySequence' with value 5", ne.getMessage()); } seq.initSequence("another", 500); try { seq.initSequence("another", 500); fail(); } catch (NuxeoException ne) { assertEquals("Failed to update the sequence 'another' with value 500", ne.getMessage()); } assertTrue("Sequence should be greater than 500",seq.getNext("another") > 500); try { seq.initSequence("another", 499); fail(); } catch (NuxeoException ne) { assertEquals("Failed to update the sequence 'another' with value 499", ne.getMessage()); } seq.initSequence("another", 9999); assertTrue("Sequence should be at 10000",seq.getNext("another") >= 10000); }
Source:
private String getObjectText(IProductModel obj) { IProduct product = obj.getProduct(); String name = preventNull(product.getId()); if (VersionUtil.isEmptyVersion(product.getVersion())) { return name; } return name + ' ' + formatVersion(product.getVersion()); }

Target:
private String getObjectText(IProductModel obj) { IProduct product = obj.getProduct(); String name = preventNull(product.getId()); if (name.isEmpty()) { name = preventNull(product.getName()); } if (VersionUtil.isEmptyVersion(product.getVersion())) { return name; } return name + ' ' + formatVersion(product.getVersion()); }
Source:
public Object getTableInfo(String tableName) throws GoraException { try { KuduTable openTable = client.openTable(tableName); List<ColumnSchema> columns = openTable.getSchema().getColumns(); HashMap<String, String> columnas = new HashMap(); String pk = ""; for (ColumnSchema esquema : columns) { columnas.put(esquema.getName(), esquema.getType().getName()); if (esquema.isKey()) { pk = esquema.getName(); } } return new KuduTableMetadata(pk, columnas); } catch (KuduException ex) { throw new GoraException(ex); } }

Target:
public KuduTableMetadata getTableInfo(String tableName) throws GoraException { try { KuduTable openTable = client.openTable(tableName); List<ColumnSchema> columns = openTable.getSchema().getColumns(); HashMap<String, String> columnas = new HashMap(); String pk = ""; String pkType = ""; for (ColumnSchema esquema : columns) { if (esquema.isKey()) { pk = esquema.getName(); pkType = esquema.getType().getName(); } else { columnas.put(esquema.getName(), esquema.getType().getName()); } } return new KuduTableMetadata(pk, pkType, columnas); } catch (KuduException ex) { throw new GoraException(ex); } }
Source:
protected void setResultValue(Intent i, boolean success) { if (success) { i.putExtra(IntentCallout.INTENT_RESULT_VALUE, "Wrote value: " + payloadToWrite); } }

Target:
protected void setResultValue(Intent i, boolean success) { if (success) { i.putExtra(IntentCallout.INTENT_RESULT_VALUE, payloadToWrite); } }
Source:
public Collection<Sample> listBySearch(String querystr) throws IOException { Criteria criteria = currentSession().createCriteria(Sample.class); criteria.add(Restrictions.or(Restrictions.ilike("identificationBarcode", querystr + "%"), Restrictions.ilike("name", querystr + "%"), Restrictions.ilike("alias", querystr + "%"))); @SuppressWarnings("unchecked") List<Sample> records = criteria.list(); return fetchSqlStore(records); }

Target:
public Collection<Sample> listBySearch(String querystr) throws IOException { Criteria criteria = currentSession().createCriteria(Sample.class); criteria.add(Restrictions.or(Restrictions.ilike("identificationBarcode", "%" + querystr + "%"), Restrictions.ilike("name", "%" + querystr + "%"), Restrictions.ilike("alias", "%" + querystr + "%"))); @SuppressWarnings("unchecked") List<Sample> records = criteria.list(); return fetchSqlStore(records); }
Source:
public String pause(Request req, Response res) throws IOException { HttpLocalizedOperationResult result = new HttpLocalizedOperationResult(); String pauseCause = null; String pipelineName = req.params("pipeline_name"); if (!StringUtils.isBlank(req.body())) { JsonReader requestBody = GsonTransformer.getInstance().jsonReaderFrom(req.body()); pauseCause = requestBody.optString("pause_cause").orElse(null); } pipelinePauseService.pause(pipelineName, pauseCause, currentUsername(), result); return renderHTTPOperationResult(result, req, res, localizer); }

Target:
public String pause(Request req, Response res) throws IOException { HttpLocalizedOperationResult result = new HttpLocalizedOperationResult(); JsonReader requestBody = GsonTransformer.getInstance().jsonReaderFrom(req.body()); String pipelineName = req.params("pipeline_name"); String pauseCause = requestBody.optString("pause_cause").orElse(null); pipelinePauseService.pause(pipelineName, pauseCause, currentUsername(), result); return renderHTTPOperationResult(result, req, res, localizer); }
Source:
protected void preStart() { final Callable<SshPollValue> getAttributesFromKnife = new Callable<SshPollValue>() { public SshPollValue call() throws Exception { ProcessTaskWrapper<String> taskWrapper = knifeTaskFactory.newTask(); final ExecutionContext executionContext = ((EntityInternal) entity).getManagementSupport().getExecutionContext(); log.debug("START: Running knife to query attributes of Chef node {}", nodeName); executionContext.submit(taskWrapper); taskWrapper.block(); log.debug("DONE: Running knife to query attributes of Chef node {}", nodeName); return new SshPollValue(null, taskWrapper.getExitCode(), taskWrapper.getStdout(), taskWrapper.getStderr()); } }; ((Poller<SshPollValue>) poller).scheduleAtFixedRate( new CallInEntityExecutionContext<SshPollValue>(entity, getAttributesFromKnife), new SendChefAttributesToSensors(entity, chefAttributeSensors), Duration.THIRTY_SECONDS.toMilliseconds()); }

Target:
protected void preStart() { final Callable<SshPollValue> getAttributesFromKnife = new Callable<SshPollValue>() { public SshPollValue call() throws Exception { ProcessTaskWrapper<String> taskWrapper = knifeTaskFactory.newTask(); final ExecutionContext executionContext = ((EntityInternal) entity).getManagementSupport().getExecutionContext(); log.debug("START: Running knife to query attributes of Chef node {}", nodeName); executionContext.submit(taskWrapper); taskWrapper.block(); log.debug("DONE: Running knife to query attributes of Chef node {}", nodeName); return new SshPollValue(null, taskWrapper.getExitCode(), taskWrapper.getStdout(), taskWrapper.getStderr()); } }; ((Poller<SshPollValue>) poller).scheduleAtFixedRate( new CallInEntityExecutionContext<SshPollValue>(entity, getAttributesFromKnife), new SendChefAttributesToSensors(entity, chefAttributeSensors), periodUnits.toMillis(period)); }
Source:
synchronized void closeSockets() { if (serverSockets != null) for (ServerSocket serverSocket : serverSockets) { if (!serverSocket.isClosed()) try { serverSocket.close(); } catch (IOException e) { LOG.warn("Ignoring unexpected exception during close" + serverSocket, e); } } }

Target:
synchronized void closeSockets() { if (serverSockets != null) for (ServerSocket serverSocket : serverSockets) { if (!serverSocket.isClosed()) { try { serverSocket.close(); } catch (IOException e) { LOG.warn("Ignoring unexpected exception during close {}", serverSocket, e); } } } }
Source:
public Optional<Integer> declareManagedMemoryUseCaseAtOperatorScope( ManagedMemoryUseCase managedMemoryUseCase, int weight) { throw new UnsupportedOperationException( "Do not support declare operator scope's managed memory for SinkTransformation."); }

Target:
public Optional<Integer> declareManagedMemoryUseCaseAtOperatorScope( ManagedMemoryUseCase managedMemoryUseCase, int weight) { throw new UnsupportedOperationException( "Declaring managed memory use cases is not supported for SinkTransformation."); }
Source:
public Optional<EntityType> getVal(ItemStack itemStack) { final String name = ItemMonsterPlacer.getEntityIdFromItem(itemStack); if (name != null) { final Class<?> entity = EntityList.NAME_TO_CLASS.get(name); for (EntityType type : SpongeImpl.getRegistry().getAllOf(EntityType.class)) { if (type.getEntityClass().equals(entity)) { return Optional.of(type); } } } return Optional.empty(); }

Target:
public Optional<EntityType> getVal(ItemStack itemStack) { final String name = ItemMonsterPlacer.getEntityIdFromItem(itemStack); if (name != null) { final Class<? extends Entity> entity = EntityList.NAME_TO_CLASS.get(name); return Optional.ofNullable(EntityTypeRegistryModule.getInstance().getForClass(entity)); } return Optional.empty(); }
Source:
public void selectDateReturnsFalseForDatesOutOfRange() { view.init(today.getTime(), minDate, maxDate); Calendar jumpToCal=Calendar.getInstance(); jumpToCal.add(MONTH,1); if (!view.setSelectedDate(jumpToCal.getTime())) { fail("should be able to select this date"); } }

Target:
public void selectDateReturnsFalseForDatesOutOfRange() { view.init(today.getTime(), minDate, maxDate); Calendar jumpToCal = Calendar.getInstance(); jumpToCal.add(MONTH, 1); boolean wasAbleToSetDate = view.setSelectedDate(jumpToCal.getTime()); assertThat(wasAbleToSetDate).isTrue(); }
Source:
public static Boolean varcharIsJsonScalar(@SqlType("varchar(x)") Slice json) { return isJsonScalar(jsonParse(json)); }

Target:
public static Boolean varcharIsJsonScalar(@SqlType("varchar(x)") Slice json) { return isJsonScalar(json); }
Source:
protected void handlePrintFromScout(final FormEvent e) { WidgetPrinter wp = null; try { if (m_viewComposite != null) { if (e.getFormField() != null) { for (JComponent c : SwingUtility.findChildComponents(m_viewComposite.getSwingContentPane(), JComponent.class)) { IPropertyObserver scoutModel = SwingScoutComposite.getScoutModelOnWidget(c); if (scoutModel == e.getFormField()) { wp = new WidgetPrinter(c); break; } } } if (wp == null) { Component printComponent; if (this.getScoutForm().getDisplayHint() == IForm.DISPLAY_HINT_VIEW) { printComponent = m_viewComposite.getSwingContentPane(); } else { printComponent = SwingUtilities.getWindowAncestor(m_viewComposite.getSwingContentPane()); } wp = new WidgetPrinter(printComponent); } } if (wp != null) { try { wp.print(e.getPrintDevice(), e.getPrintParameters()); } catch (Throwable ex) { LOG.error(null, ex); } } } finally { File outputFile = null; if (wp != null) { outputFile = wp.getOutputFile(); } final File outputFileFinal = outputFile; Runnable r = new Runnable() { @Override public void run() { getScoutObject().getUIFacade().fireFormPrintedFromUI(outputFileFinal); } }; getSwingEnvironment().invokeScoutLater(r, 0); } }

Target:
protected void handlePrintFromScout(final FormEvent e) { WidgetPrinter wp = null; try { if (m_viewComposite != null) { if (e.getFormField() != null) { for (JComponent c : SwingUtility.findChildComponents(m_viewComposite.getSwingContentPane(), JComponent.class)) { IPropertyObserver scoutModel = SwingScoutComposite.getScoutModelOnWidget(c); if (scoutModel == e.getFormField()) { wp = new WidgetPrinter(c); break; } } } if (wp == null) { Component printComponent; if (getScoutForm().getDisplayHint() == IForm.DISPLAY_HINT_VIEW) { printComponent = m_viewComposite.getSwingContentPane(); } else { printComponent = SwingUtilities.getWindowAncestor(m_viewComposite.getSwingContentPane()); } wp = new WidgetPrinter(printComponent); } } if (wp != null) { try { wp.print(e.getPrintDevice(), e.getPrintParameters()); } catch (Throwable ex) { LOG.error(null, ex); } } } finally { File outputFile = null; if (wp != null) { outputFile = wp.getOutputFile(); } final File outputFileFinal = outputFile; Runnable r = new Runnable() { @Override public void run() { getScoutObject().getUIFacade().fireFormPrintedFromUI(outputFileFinal); } }; getSwingEnvironment().invokeScoutLater(r, 0); } }
Source:
public void run() { runEvent(); todo.doIt(); endEvent(); if (isExecutionLogged()) logExecution(); }

Target:
public void run() { runEvent(); todo.doIt(); endEvent(); logExecution(); }
Source:
private void initCreateTxt() { createTxt = new NpTextBox(); createTxt.setVisibleLength(50); createTxt.addKeyPressHandler(new KeyPressHandler() { @Override public void onKeyPress(KeyPressEvent event) { if (!createTxt.getText().trim().isEmpty() && event.getCharCode() == KeyCodes.KEY_ENTER) { doCreateProject(); } } }); createTxt.addKeyUpHandler(new KeyUpHandler() { @Override public void onKeyUp(KeyUpEvent event) { createButton.setEnabled(!createTxt.getText().trim().isEmpty()); } }); }

Target:
private void initCreateTxt() { projectNameTextBox = new NpTextBox(); projectNameTextBox.setVisibleLength(50); projectNameTextBox.addKeyPressHandler(new KeyPressHandler() { @Override public void onKeyPress(KeyPressEvent event) { if (!projectNameTextBox.getText().trim().isEmpty() && event.getCharCode() == KeyCodes.KEY_ENTER) { doCreateProject(); } } }); }
Source:
private void processVmDevices(XmlRpcStruct vm) { if (vm == null || vm.getItem("vmId") == null) { log.errorFormat("Recieved NULL VM or VM id when processing VM devices, abort."); return; } Guid vmId = new Guid((String) vm.getItem("vmId")); HashSet<Guid> processedDevices = new HashSet<Guid>(); Object[] objects = (Object[]) vm.getItem("devices"); for (Object o : objects) { XmlRpcStruct device = new XmlRpcStruct((Map<String, Object>) o); Guid deviceId = getDeviceId(device); if ((device.getItem("address")) == null) { log.infoFormat("Recieved a Device without an address when processing VM {0} devices, skipping device: {1}.", vmId, device.getInnerMap().toString()); continue; } VmDevice vmDevice = DbFacade.getInstance().getVmDeviceDAO().get(new VmDeviceId(deviceId, vmId)); if (deviceId == null || vmDevice == null) { deviceId = addNewVmDevice(vmId, device); } else { vmDevice.setAddress(((Map<String, String>) device.getItem("address")).toString()); addVmDeviceToList(vmDevice); } processedDevices.add(deviceId); } handleRemovedDevices(vmId, processedDevices); }

Target:
private void processVmDevices(XmlRpcStruct vm) { if (vm == null || vm.getItem("vmId") == null) { log.errorFormat("Recieved NULL VM or VM id when processing VM devices, abort."); return; } Guid vmId = new Guid((String) vm.getItem("vmId")); HashSet<Guid> processedDevices = new HashSet<Guid>(); Object[] objects = (Object[]) vm.getItem("devices"); List<VmDevice> devices = DbFacade.getInstance().getVmDeviceDAO().getVmDeviceByVmId(vmId); Map<VmDeviceId, VmDevice> deviceMap = new HashMap<VmDeviceId, VmDevice>(); for (VmDevice device : devices) { deviceMap.put(device.getId(), device); } for (Object o : objects) { XmlRpcStruct device = new XmlRpcStruct((Map<String, Object>) o); Guid deviceId = getDeviceId(device); if ((device.getItem("address")) == null) { log.infoFormat("Recieved a Device without an address when processing VM {0} devices, skipping device: {1}.", vmId, device.getInnerMap().toString()); continue; } VmDevice vmDevice = deviceMap.get(new VmDeviceId(deviceId, vmId)); if (deviceId == null || vmDevice == null) { deviceId = addNewVmDevice(vmId, device); } else { vmDevice.setAddress(((Map<String, String>) device.getItem("address")).toString()); addVmDeviceToList(vmDevice); } processedDevices.add(deviceId); } handleRemovedDevices(vmId, processedDevices, devices); }
Source:
void free(File fileToReturn, long sizeInBytes, String storeId, boolean isSwapSegment) throws IOException { long startTime = System.currentTimeMillis(); try { if (enablePooling && poolState != PoolState.INITIALIZED) { logger.info("Freeing segment of size from before pool is fully initialized", sizeInBytes, fileToReturn.getAbsolutePath()); metrics.diskSpaceAllocatorFreeBeforeInitCount.inc(); } else { logger.info("Freeing segment of size from {}", isSwapSegment ? "swap" : "store[" + storeId + "]", sizeInBytes, fileToReturn.getAbsolutePath()); } Files.delete(fileToReturn.toPath()); if (poolState == PoolState.INITIALIZED) { if (isSwapSegment) { fileToReturn = createReserveFile(sizeInBytes, swapReserveDir); swapReserveFiles.add(sizeInBytes, fileToReturn); } else { File storeReserveDir = new File(reserveDir, STORE_DIR_PREFIX + storeId); fileToReturn = createReserveFile(sizeInBytes, storeReserveDir); ReserveFileMap sizeToFilesMap = storeReserveFiles.getOrDefault(storeId, new ReserveFileMap()); sizeToFilesMap.add(sizeInBytes, fileToReturn); storeReserveFiles.put(storeId, sizeToFilesMap); } } } finally { long elapsedTime = System.currentTimeMillis() - startTime; logger.debug("free took ms for {}", elapsedTime, "store[" + storeId + "]"); metrics.diskSpaceAllocatorFreeTimeMs.update(elapsedTime); } }

Target:
void free(File fileToReturn, long sizeInBytes, String storeId, boolean isSwapSegment) throws IOException { long startTime = System.currentTimeMillis(); try { if (enablePooling && poolState != PoolState.INITIALIZED) { logger.info("Freeing segment of size from before pool is fully initialized", sizeInBytes, fileToReturn.getAbsolutePath()); metrics.diskSpaceAllocatorFreeBeforeInitCount.inc(); } else { logger.info("Freeing segment of size from {}", isSwapSegment ? "swap" : "store[" + storeId + "]", sizeInBytes, fileToReturn.getAbsolutePath()); } Files.delete(fileToReturn.toPath()); if (poolState == PoolState.INITIALIZED) { if (isSwapSegment) { fileToReturn = createReserveFile(sizeInBytes, swapReserveDir); swapReserveFiles.add(sizeInBytes, fileToReturn); } else { File storeReserveDir = new File(reserveDir, STORE_DIR_PREFIX + storeId); fileToReturn = createReserveFile(sizeInBytes, storeReserveDir); ReserveFileMap sizeToFilesMap = storeReserveFiles.getOrDefault(storeId, new ReserveFileMap()); sizeToFilesMap.add(sizeInBytes, fileToReturn); storeReserveFiles.put(storeId, sizeToFilesMap); } } } finally { long elapsedTime = System.currentTimeMillis() - startTime; logger.debug("free took ms for store[{}]", elapsedTime, storeId); metrics.diskSpaceAllocatorFreeTimeMs.update(elapsedTime); } }
Source:
public boolean areResponseDeletionsRequiredForChanges(FeedbackQuestionAttributes newAttributes) { if (!newAttributes.giverType.equals(this.giverType) || !newAttributes.recipientType.equals(this.recipientType)) { return true; } if (newAttributes.giverType.isCustom()) { for (FeedbackPathAttributes feedbackPath : feedbackPaths) { if (!newAttributes.containsFeedbackPath(feedbackPath.getGiver(), feedbackPath.getRecipient())) { return true; } } } if (!this.showResponsesTo.containsAll(newAttributes.showResponsesTo) || !this.showGiverNameTo.containsAll(newAttributes.showGiverNameTo) || !this.showRecipientNameTo.containsAll(newAttributes.showRecipientNameTo)) { return true; } return this.getQuestionDetails().isChangesRequiresResponseDeletion(newAttributes.getQuestionDetails()); }

Target:
public boolean areResponseDeletionsRequiredForChanges(FeedbackQuestionAttributes newAttributes) { if (!newAttributes.giverType.equals(this.giverType) || !newAttributes.recipientType.equals(this.recipientType)) { return true; } if (newAttributes.giverType.isCustom()) { Set<FeedbackPathAttributes> newCustomFeedbackPaths = new HashSet<FeedbackPathAttributes>(newAttributes.feedbackPaths); for (FeedbackPathAttributes feedbackPath : feedbackPaths) { if (!newCustomFeedbackPaths.contains(feedbackPath)) { return true; } } } if (!this.showResponsesTo.containsAll(newAttributes.showResponsesTo) || !this.showGiverNameTo.containsAll(newAttributes.showGiverNameTo) || !this.showRecipientNameTo.containsAll(newAttributes.showRecipientNameTo)) { return true; } return this.getQuestionDetails().isChangesRequiresResponseDeletion(newAttributes.getQuestionDetails()); }
Source:
public static void main(String[] args) throws IOException { DataMigrationForSanitizedDataInAdminEmailAttributes migrator = new DataMigrationForSanitizedDataInAdminEmailAttributes(); migrator.doOperationRemotely(); }

Target:
public static void main(String[] args) throws IOException { new DataMigrationForSanitizedDataInAdminEmailAttributes().doOperationRemotely(); }