auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private void testMenu(final boolean enabled) { final DMNEditorMenuSessionItems menuItems = spy(new DMNEditorMenuSessionItems(builder, sessionCommands, mock(PlaceManager.class))); menuItems.setEnabled(enabled); verify(menuItems).setItemEnabled(ClearSessionCommand.class, enabled); verify(menuItems).setItemEnabled(VisitGraphSessionCommand.class, enabled); verify(menuItems).setItemEnabled(SwitchGridSessionCommand.class, enabled); verify(menuItems).setItemEnabled(ValidateSessionCommand.class, enabled); verify(menuItems).setItemEnabled(ExportToJpgSessionCommand.class, enabled); verify(menuItems).setItemEnabled(ExportToPngSessionCommand.class, enabled); verify(menuItems).setItemEnabled(ExportToSvgSessionCommand.class, enabled); verify(menuItems).setItemEnabled(ExportToPdfSessionCommand.class, enabled); verify(menuItems).setItemEnabled(ExportToRawFormatSessionCommand.class, enabled); verify(menuItems).setItemEnabled(DeleteSelectionSessionCommand.class, false); verify(menuItems).setItemEnabled(UndoSessionCommand.class, false); verify(menuItems).setItemEnabled(RedoSessionCommand.class, false); verify(menuItems).setItemEnabled(CopySelectionSessionCommand.class, false); verify(menuItems).setItemEnabled(CutSelectionSessionCommand.class, false); verify(menuItems).setItemEnabled(PasteSelectionSessionCommand.class, false); verify(menuItems).setItemEnabled(DMNPerformAutomaticLayoutCommand.class, enabled); }

Target:
private void testMenu(final boolean enabled) { final DMNEditorMenuSessionItems menuItems = spy(new DMNEditorMenuSessionItems(builder, sessionCommands, placeManager)); menuItems.setEnabled(enabled); verify(menuItems).setItemEnabled(ClearSessionCommand.class, enabled); verify(menuItems).setItemEnabled(VisitGraphSessionCommand.class, enabled); verify(menuItems).setItemEnabled(SwitchGridSessionCommand.class, enabled); verify(menuItems).setItemEnabled(ValidateSessionCommand.class, enabled); verify(menuItems).setItemEnabled(ExportToJpgSessionCommand.class, enabled); verify(menuItems).setItemEnabled(ExportToPngSessionCommand.class, enabled); verify(menuItems).setItemEnabled(ExportToSvgSessionCommand.class, enabled); verify(menuItems).setItemEnabled(ExportToPdfSessionCommand.class, enabled); verify(menuItems).setItemEnabled(ExportToRawFormatSessionCommand.class, enabled); verify(menuItems).setItemEnabled(DeleteSelectionSessionCommand.class, false); verify(menuItems).setItemEnabled(UndoSessionCommand.class, false); verify(menuItems).setItemEnabled(RedoSessionCommand.class, false); verify(menuItems).setItemEnabled(CopySelectionSessionCommand.class, false); verify(menuItems).setItemEnabled(CutSelectionSessionCommand.class, false); verify(menuItems).setItemEnabled(PasteSelectionSessionCommand.class, false); verify(menuItems).setItemEnabled(DMNPerformAutomaticLayoutCommand.class, enabled); }
Source:
public static void installMetadataSharingPackages() { try { Collection<File> mdsFiles = loadMdsFiles(); if (mdsFiles == null) { log.error("Unable to find any metadata sharing files"); return; } List<PackageImporter> packageImporters = loadPackageImporters(mdsFiles); removeAlreadyLoadedPackageImporters(packageImporters); sortPackageImporters(packageImporters); loadPackages(packageImporters); Context.flushSession(); } catch(Exception e) { log.error("Unable to load metadata sharing packages", e); } }

Target:
public static void installMetadataSharingPackages() { try { Collection<File> mdsFiles = loadMdsFiles(); if (mdsFiles == null) { return; } List<PackageImporter> packageImporters = loadPackageImporters(mdsFiles); removeAlreadyLoadedPackageImporters(packageImporters); sortPackageImporters(packageImporters); loadPackages(packageImporters); Context.flushSession(); } catch(Exception e) { log.error("Unable to load metadata sharing packages", e); } }
Source:
protected GdbLaunch getGDBLaunch() { return (GdbLaunch) getSession().getModelAdapter(ILaunch.class); }

Target:
private GdbLaunch getGDBLaunch() { return (GdbLaunch) getSession().getModelAdapter(ILaunch.class); }
Source:
public void setUp() throws Exception { final String apiKey = System.getProperty(KILLBILL_PAYMENT_RECURLY_API_KEY); final String subDomain = System.getProperty(KILLBILL_PAYMENT_RECURLY_SUBDOMAIN); if (apiKey == null) { Assert.fail("You need to set your Recurly api key to run integration tests:" + " -Dkillbill.payment.recurly.apiKey=..."); } if (subDomain == null) { Assert.fail("You need to set your Recurly subdomain to run integration tests:" + " -Dkillbill.payment.recurly.subDomain=..."); } recurlyClient = new RecurlyClient(apiKey, subDomain); recurlyClient.open(); }

Target:
public void setUp() throws Exception { final String apiKey = System.getProperty(KILLBILL_PAYMENT_RECURLY_API_KEY); String subDomainTemp = System.getProperty(KILLBILL_PAYMENT_RECURLY_SUBDOMAIN); if (apiKey == null) { Assert.fail("You need to set your Recurly api key to run integration tests:" + " -Dkillbill.payment.recurly.apiKey=..."); } if (subDomainTemp == null) { subDomainTemp = "api"; } final String subDomain = subDomainTemp; recurlyClient = new RecurlyClient(apiKey, subDomain); recurlyClient.open(); }
Source:
List<Page> getBufferedPages() { ImmutableList.Builder<Page> builder = new ImmutableList.Builder<>(); for (int i = 0; i < currentPageCount; i++) { if (pageReferences.get(i) != null) { builder.add(pageReferences.get(i).getPage()); } } return builder.build(); }

Target:
List<Page> getBufferedPages() { return IntStream.range(0, currentPageCount) .filter(i -> pageReferences.get(i) != null) .mapToObj(i -> pageReferences.get(i).getPage()) .collect(toImmutableList()); }
Source:
private void writeAttributes(Iterable<Attribute> attrs, ExcelWriter writer) throws IOException { if (!writer.hasSheet(EMX_ATTRIBUTES)) { writer.createSheet(EMX_ATTRIBUTES, newArrayList(ATTRIBUTE_ATTRS.keySet())); } writer.writeRows( StreamSupport.stream(attrs.spliterator(), false).map(attr -> map(attr)), EMX_ATTRIBUTES); }

Target:
private void writeAttributes(Iterable<Attribute> attrs, ExcelWriter writer) throws IOException { if (!writer.hasSheet(EMX_ATTRIBUTES)) { writer.createSheet(EMX_ATTRIBUTES, newArrayList(ATTRIBUTE_ATTRS.keySet())); } writer.writeRows(Streams.stream(attrs).map(AttributeMapper::map), EMX_ATTRIBUTES); }
Source:
@Before public void vars() throws IOException, InterruptedException { listener = StreamTaskListener.fromStdout(); ws = j.jenkins.getRootPath().child("ws"); launcher = j.jenkins.createLauncher(listener); Properties properties = System.getProperties(); String pathSeparator = properties.getProperty("path.separator"); String[] paths = System.getenv("PATH").split(pathSeparator); boolean powershellExists = false; String cmd = launcher.isUnix()?"pwsh":"powershell.exe"; for (String p : paths) { File f = new File(p, cmd); if (f.exists()) { powershellExists = true; break; } } Assume.assumeTrue("This test should only run if powershell is available", powershellExists == true); if (powershellExists == true) { List<String> args = new ArrayList<>(Collections.singleton(cmd)); if (!launcher.isUnix()) { args.addAll(Arrays.asList("-ExecutionPolicy", "Bypass")); } args.addAll(Arrays.asList("-Command", "& {Write-Output $PSVersionTable.PSVersion.Major}")); Launcher.ProcStarter ps = launcher.launch().cmds(args).quiet(true); ps.readStdout(); Proc proc = ps.start(); String psVersionStr = IOUtils.toString(proc.getStdout()); try { psVersion = Integer.parseInt(psVersionStr.trim()); } catch (NumberFormatException x) { throw new AssumptionViolatedException(psVersionStr, x); } Assume.assumeTrue("This test should only run if the powershell major version is at least 3", psVersion >= 3); } }

Target:
@Before public void vars() throws IOException, InterruptedException { listener = StreamTaskListener.fromStdout(); ws = j.jenkins.getRootPath().child("ws"); launcher = j.jenkins.createLauncher(listener); Properties properties = System.getProperties(); String pathSeparator = properties.getProperty("path.separator"); String[] paths = System.getenv("PATH").split(pathSeparator); boolean powershellExists = false; String cmd = "powershell"; for (String p : paths) { File withoutExtension = new File(p, cmd); File withExtension = new File(p, cmd + ".exe"); if (withoutExtension.exists() || withExtension.exists()) { powershellExists = true; break; } } Assume.assumeTrue("This test should only run if powershell is available", powershellExists == true); if (powershellExists == true) { List<String> args = new ArrayList<>(Collections.singleton(cmd)); if (!launcher.isUnix()) { args.addAll(Arrays.asList("-ExecutionPolicy", "Bypass")); } args.addAll(Arrays.asList("-Command", "& {Write-Output $PSVersionTable.PSVersion.Major}")); Launcher.ProcStarter ps = launcher.launch().cmds(args).quiet(true); ps.readStdout(); Proc proc = ps.start(); String psVersionStr = IOUtils.toString(proc.getStdout()); try { psVersion = Integer.parseInt(psVersionStr.trim()); } catch (NumberFormatException x) { throw new AssumptionViolatedException(psVersionStr, x); } Assume.assumeTrue("This test should only run if the powershell major version is at least 3", psVersion >= 3); } }
Source:
public ObjectTag getContext(String name) { if (name.equals("mob")) { return mob; } else if (name.equals("entity")) { return entity; } else if (name.equals("location")) { return location; } else if (name.equals("from_spawner")) { return new ElementTag(event.isFromMythicSpawner()); } else if (name.equals("spawner_location")) { AbstractLocation loc = event.getMythicSpawner().getLocation(); return new LocationTag(loc.getX(), loc.getY(), loc.getZ(),loc.getWorld().getName()); } return super.getContext(name); }

Target:
public ObjectTag getContext(String name) { if (name.equals("mob")) { return mythicmob; } else if (name.equals("entity")) { return new EntityTag(event.getEntity()); } else if (name.equals("location")) { return location; } else if (name.equals("from_spawner")) { return new ElementTag(event.isFromMythicSpawner()); } else if (name.equals("spawner_location") && event.isFromMythicSpawner()) { AbstractLocation loc = event.getMythicSpawner().getLocation(); return new LocationTag(loc.getX(), loc.getY(), loc.getZ(), loc.getWorld().getName()); } return super.getContext(name); }
Source:
public void run() { Shell shell = getShell(); if (shell == null) { return; } FileDialog fd = TmfFileDialogFactory.createFileDialog(shell); fd.setFilterExtensions(getExtension()); String fileName = fd.open(); if (fileName == null) { return; } try (FileOutputStream fos = new FileOutputStream(fileName)) { exportToTsv(fos); } catch (IOException e) { Activator.getDefault().logError("IO Error " + fileName, e); } }

Target:
public void run() { Shell shell = getShell(); if (shell == null) { return; } FileDialog fd = TmfFileDialogFactory.create(shell); fd.setFilterExtensions(getExtension()); String fileName = fd.open(); if (fileName == null) { return; } try (FileOutputStream fos = new FileOutputStream(fileName)) { exportToTsv(fos); } catch (IOException e) { Activator.getDefault().logError("IO Error " + fileName, e); } }
Source:
public void waitForKrux() { waitPageLoaded(); wait.until(CommonExpectedConditions.scriptReturnsTrue("return !!window.Krux")); }

Target:
public void waitForKrux() { waitPageLoaded(); driver.manage().timeouts().implicitlyWait(500, TimeUnit.MILLISECONDS); try { wait.until(CommonExpectedConditions.scriptReturnsTrue("return !!window.Krux")); } finally { restoreDeaultImplicitWait(); } }
Source:
private ResourceKey(String p, String f, String r) { project = p != null ? new Project.NameKey(p) : null; file = f; revision = r; }

Target:
private ResourceKey(String p, String f, String r) { project = new Project.NameKey(p); file = f; revision = r; }
Source:
public static void goOnline() { RetryStrategies.linear(new RetryStrategies.Retryable() { @Override public void call() { AirplaneMode.disable(); } }, new RetryStrategies.Condition() { @Override public boolean isMet() { return InternetConnectivity.isOnline(); } }, 3, 2); }

Target:
public synchronized static void goOnline() { RetryStrategies.linear(new RetryStrategies.Retryable() { @Override public void call() { AirplaneMode.disable(); } }, new RetryStrategies.Condition() { @Override public boolean isMet() { return InternetConnectivity.isOnline(); } }, 3, 2); }
Source:
private static String getUserId(String userName) { String getUserIDURL; try { getUserIDURL = String.format("%s/api.php?action=query&list=users&ususers=%s&format=json&cb=%d", new UrlBuilder().getUrlForWiki("community"), URLEncoder.encode(userName, "UTF-8"), DateTime.now().getMillis()); } catch (UnsupportedEncodingException e) { PageObjectLogging.logError("UNSUPPORTED ENCODING EXCEPTION", e); throw new WebDriverException(e); } HttpGet httpGet = new HttpGet(getUserIDURL); PageObjectLogging.logInfo("USER_ID_REQUEST", httpGet.getURI().toString()); try { return executeAndRetry(httpGet, extractUserId()); } catch (ClientProtocolException e) { PageObjectLogging.log(CLIENT_PROTOCOL_EXCEPTION, ExceptionUtils.getStackTrace(e), false); throw new WebDriverException(e); } catch (IOException e) { PageObjectLogging.log(IOEXCEPTION_COMMAND, IOEXCEPTION_ERROR_MESSAGE + ExceptionUtils.getStackTrace(e), false); throw new WebDriverException(e); } }

Target:
private static String getUserId(String userName) { try { String encodedUsername = URLEncoder.encode(userName, "UTF-8"); HttpGet httpGet = new HttpGet(getUserIdUrl(encodedUsername)); PageObjectLogging.logInfo("USER_ID_REQUEST", httpGet.getURI().toString()); return executeAndRetry(httpGet, extractUserId()); } catch (UnsupportedEncodingException e) { PageObjectLogging.logError("UNSUPPORTED ENCODING EXCEPTION", e); throw new WebDriverException(e); } catch (ClientProtocolException e) { PageObjectLogging.log(CLIENT_PROTOCOL_EXCEPTION, ExceptionUtils.getStackTrace(e), false); throw new WebDriverException(e); } catch (IOException e) { PageObjectLogging.log(IOEXCEPTION_COMMAND, IOEXCEPTION_ERROR_MESSAGE + ExceptionUtils.getStackTrace(e), false); throw new WebDriverException(e); } }
Source:
public ListBoxModel doFillProjectNameItems(@QueryParameter String collectionUrl, @QueryParameter String credentialsId) { StandardListBoxModel listBoxModel = new StandardListBoxModel(); listBoxModel.withEmptySelection(); if (StringUtils.isBlank(collectionUrl) || StringUtils.isBlank(credentialsId)) { return listBoxModel; } StandardUsernamePasswordCredentials credential = TeamCollectionConfiguration.findCredentialsById(credentialsId); if (credential == null) { return listBoxModel; } String username = credential.getUsername(); Secret password = credential.getPassword(); try { ReleaseManagementHttpClient releaseManagementHttpClient = new ReleaseManagementHttpClient( collectionUrl.toLowerCase(), username, password); List<Project> projects = releaseManagementHttpClient.GetProjectItems(); for (Project project : projects) { listBoxModel.add(project.getName()); } } catch (ReleaseManagementException ignored) { } return listBoxModel; }

Target:
public ListBoxModel doFillProjectNameItems(@QueryParameter String collectionUrl, @QueryParameter String credentialsId) { StandardListBoxModel listBoxModel = new StandardListBoxModel(); listBoxModel.withEmptySelection(); if (StringUtils.isBlank(collectionUrl) || StringUtils.isBlank(credentialsId)) { return listBoxModel; } StandardUsernamePasswordCredentials credential = TeamCollectionConfiguration.findCredentialsById(credentialsId); if (credential == null) { return listBoxModel; } String username = credential.getUsername(); Secret password = credential.getPassword(); try { ReleaseManagementHttpClient releaseManagementHttpClient = new ReleaseManagementHttpClient( collectionUrl.toLowerCase(), username, password); List<Project> projects = releaseManagementHttpClient.GetProjectItems(); for (Project project : projects) { listBoxModel.add(project.getName()); } } catch (ReleaseManagementException ex) { logger.log(Level.WARNING, String.format("Get team project for collection url: %s failed.", collectionUrl), ex); } return listBoxModel; }
Source:
private long getUpdatedRate() { try { return unitsPerSecond.get(); } catch (Exception e) { log.error("Could not refresh the Qos rate. This can happen if the Qos Service is unreachable." + " Extended periods of being unable to refresh will hinder QoS of all clients., ", e); return returnPreviousOrDefaultRate(); } }

Target:
private long getUpdatedRate() { try { return unitsPerSecond.get(); } catch (Exception e) { log.error(RATE_UPDATE_ERROR_MESSAGE, e); return returnPreviousOrDefaultRate(); } }
Source:
public boolean entityStateEqualTo(UserPortalItemModel other) { if (getEntity() instanceof VmPool && other.getEntity() instanceof VmPool) { return getEntity().equals(other.getEntity()); } else if (getEntity() instanceof VM && other.getEntity() instanceof VM) { VM thisVm = (VM) getEntity(); VM otherVm = (VM) other.getEntity(); boolean consoleUsersEqual = (thisVm.getConsoleCurentUserName() != null && thisVm.getConsoleCurentUserName().equals(otherVm.getConsoleCurentUserName())) || (thisVm.getConsoleCurentUserName() == null && otherVm.getConsoleCurentUserName() == null); return thisVm.getDynamicData().getStatus().equals(otherVm.getDynamicData().getStatus()) && consoleUsersEqual && thisVm.getStaticData().equals(otherVm.getStaticData()); } return false; }

Target:
public boolean entityStateEqualTo(UserPortalItemModel other) { if (getEntity() instanceof VmPool && other.getEntity() instanceof VmPool) { return getEntity().equals(other.getEntity()); } else if (getEntity() instanceof VM && other.getEntity() instanceof VM) { VM thisVm = (VM) getEntity(); VM otherVm = (VM) other.getEntity(); boolean consoleUsersEqual = Objects.equals(thisVm.getConsoleCurentUserName(), otherVm.getConsoleCurentUserName()); return thisVm.getDynamicData().getStatus().equals(otherVm.getDynamicData().getStatus()) && consoleUsersEqual && thisVm.getStaticData().equals(otherVm.getStaticData()); } return false; }
Source:
V call() throws StatusRuntimeException; } protected synchronized <V> V retryRPC(RpcCallable<V> rpc, Logger logger, String rpcName, String description, Object... args) throws AlluxioStatusException { String debugDesc = logger.isDebugEnabled() ? String.format(description, args) : null; long ts1 = System.currentTimeMillis(); logger.debug("Enter: {}({})", rpcName, debugDesc); try (Timer.Context ctx = MetricsSystem.timer(getQualifiedMetricName(rpcName)).time()) { V ret = retryRPCInternal(rpc, () -> { MetricsSystem.counter(getQualifiedRetryMetricName(rpcName)).inc(); return null; }); long ts2 = System.currentTimeMillis(); logger.debug("Exit (OK): {}({}) in ms", rpcName, debugDesc, ts2 - ts1); return ret; } catch (Exception e) { MetricsSystem.counter(getQualifiedFailureMetricName(rpcName)).inc(); long ts2 = System.currentTimeMillis(); logger.debug("Exit (ERROR): {}({}) in ms: {}", rpcName, debugDesc, ts2 - ts1, e.toString()); throw e; } }

Target:
V call() throws StatusRuntimeException; } protected synchronized <V> V retryRPC(RpcCallable<V> rpc, Logger logger, String rpcName, String description, Object... args) throws AlluxioStatusException { String debugDesc = logger.isDebugEnabled() ? String.format(description, args) : null; long startMs = System.currentTimeMillis(); logger.debug("Enter: {}({})", rpcName, debugDesc); try (Timer.Context ctx = MetricsSystem.timer(getQualifiedMetricName(rpcName)).time()) { V ret = retryRPCInternal(rpc, () -> { MetricsSystem.counter(getQualifiedRetryMetricName(rpcName)).inc(); return null; }); logger.debug("Exit (OK): {}({}) in ms", rpcName, debugDesc, System.currentTimeMillis() - startMs); return ret; } catch (Exception e) { MetricsSystem.counter(getQualifiedFailureMetricName(rpcName)).inc(); logger.debug("Exit (ERROR): {}({}) in ms: {}", rpcName, debugDesc, System.currentTimeMillis() - startMs, e.toString()); throw e; } }
Source:
public void process(final LGraph lGraph, final IElkProgressMonitor monitor) { monitor.begin("Partition preprocessing", 1); lGraph.getLayerlessNodes().stream() .filter(lNode -> lNode.hasProperty(LayeredOptions.PARTITIONING_PARTITION)) .flatMap(lNode -> Streams.stream(lNode.getOutgoingEdges())) .filter(lEdge -> mustBeReversed(lEdge)) .collect(Collectors.toList()) .stream() .forEach(lEdge -> reverse(lEdge, lGraph)); monitor.done(); }

Target:
public void process(final LGraph lGraph, final IElkProgressMonitor monitor) { monitor.begin("Partition preprocessing", 1); List<LEdge> edgesToBeReversed = lGraph.getLayerlessNodes().stream() .filter(lNode -> lNode.hasProperty(LayeredOptions.PARTITIONING_PARTITION)) .flatMap(lNode -> Streams.stream(lNode.getOutgoingEdges())) .filter(lEdge -> mustBeReversed(lEdge)) .collect(Collectors.toList()); edgesToBeReversed.stream() .forEach(lEdge -> reverse(lEdge, lGraph)); monitor.done(); }
Source:
private LabelProvider getWorkbenchLabelProvider() { if(workbenchLabelProvider == null) { workbenchLabelProvider = new WorkbenchLabelProvider(); } return workbenchLabelProvider; }

Target:
private LabelProvider getWorkbenchLabelProvider() { if (workbenchLabelProvider == null) workbenchLabelProvider = new WorkbenchLabelProvider(); return workbenchLabelProvider; }
Source:
public void testTrimStringMap() { Map<String, String> nullMap = null; Assert.assertNull( StringUtil.trimStringMap( nullMap ) ); Map<String, String> stringMap = new HashMap<>(); stringMap.put( " spaces ", " spacesval " ); stringMap.put( "\t tabs \t", "\t tabsval \t" ); stringMap.put( "\n newline \n", "\n newlineval \n" ); stringMap.put( "empty", "" ); stringMap.put( "null", null ); stringMap = StringUtil.trimStringMap( stringMap ); Assert.assertEquals( stringMap.get( "spaces" ), "spacesval" ); Assert.assertEquals( stringMap.get( "tabs" ), "tabsval" ); Assert.assertEquals( stringMap.get( "newline" ), "newlineval" ); Assert.assertEquals( stringMap.get( "empty" ), "" ); Assert.assertEquals( stringMap.get( "null" ), "" ); }

Target:
public void testTrimStringMap() { Map<String, String> nullMap = null; Assert.assertNull( StringUtil.trimStringMap( nullMap ) ); Map<String, String> stringMap = new HashMap<>(); stringMap.put( " spaces ", " spacesval " ); stringMap.put( "\t tabs \t", "\t tabsval \t" ); stringMap.put( "\n newline \n", "\n newlineval \n" ); stringMap.put( "empty", "" ); stringMap.put( "null", null ); stringMap.put( null, null ); stringMap = StringUtil.trimStringMap( stringMap ); Assert.assertEquals( stringMap.get( "spaces" ), "spacesval" ); Assert.assertEquals( stringMap.get( "tabs" ), "tabsval" ); Assert.assertEquals( stringMap.get( "newline" ), "newlineval" ); Assert.assertEquals( stringMap.get( "empty" ), "" ); Assert.assertEquals( stringMap.get( "null" ), "" ); Assert.assertEquals( stringMap.get( "" ), "" ); }
Source:
private String adjustDebuggerPath(String path) { MIBreakpoints breakpoints = getServicesTracker().getService(MIBreakpoints.class); return (breakpoints != null) ? breakpoints.adjustDebuggerPath(path) : path; }

Target:
private String adjustDebuggerPath(String path) { IBreakpoints breakpoints = getServicesTracker().getService(IBreakpoints.class); return (breakpoints instanceof MIBreakpoints) ? ((MIBreakpoints)breakpoints).adjustDebuggerPath(path) : path; }
Source:
public String docs() { return "boolean {function} Returns true if the function is known to CommandHelper."; }

Target:
public String docs() { return "boolean {name} Returns true if the function is known to " + Implementation.GetServerType().getBranding() + "."; }
Source:
public void detectSingleTextLanguage() { DetectedLanguage primaryLanguage = new DetectedLanguage().setName("English").setIso6391Name("en").setScore(1.0); List<DetectedLanguage> expectedLanguageList = new ArrayList<>(Arrays.asList(primaryLanguage)); StepVerifier.create(client.detectLanguage("This is a test English Text")) .assertNext(response -> validateDetectedLanguages(expectedLanguageList, response.getDetectedLanguages())) .verifyComplete(); }

Target:
public void detectSingleTextLanguage() { DetectedLanguage primaryLanguage = new DetectedLanguage("English", "en", 1.0); List<DetectedLanguage> expectedLanguageList = Arrays.asList(primaryLanguage); StepVerifier.create(client.detectLanguage("This is a test English Text")) .assertNext(response -> validateDetectedLanguages(expectedLanguageList, response.getDetectedLanguages())) .verifyComplete(); }
Source:
public CertificationWriter(final String fileName) throws IOException { OUT = new OutputStreamWriter(new FileOutputStream(fileName + EXT), "UTF-8"); LOG.info("NEW FILE: {}", fileName); writeHeader(); }

Target:
public CertificationWriter(final String fileName) throws IOException { OUT = new OutputStreamWriter(new FileOutputStream(fileName + EXT), "UTF-8"); LOG.info("NEW FILE: {}", fileName); }
Source:
public void testGenerateUserCourseRegisterEmail() throws IOException { ______TS("student course register email"); CourseAttributes course = new CourseAttributes("idOfTypicalCourse1", "Course Name", "UTC"); AccountAttributes user = new AccountAttributes(); user.email = "user@email.tmt"; user.name = "User Name"; user.googleId = "user.googleid"; EmailWrapper email = new EmailGenerator().generateUserCourseRegisterEmail(user, course); String subject = String.format(EmailType.USER_COURSE_REGISTER.getSubject(), course.getName(), course.getId()); verifyEmail(email, user.email, subject, "/userCourseRegiserEmail.html"); }

Target:
public void testGenerateUserCourseRegisterEmail() throws IOException { ______TS("student course register email"); CourseAttributes course = new CourseAttributes("idOfTypicalCourse1", "Course Name", "UTC"); AccountAttributes user = new AccountAttributes(); user.email = "user@email.tmt"; user.name = "User Name"; user.googleId = "user.googleid"; user.isInstructor = false; EmailWrapper email = new EmailGenerator().generateUserCourseRegisterEmail(user, course); String subject = String.format(EmailType.USER_COURSE_REGISTER.getSubject(), course.getName(), course.getId()); verifyEmail(email, user.email, subject, "/studentCourseRegisterEmail.html"); ______TS("instructor course register email"); user.isInstructor = true; email = new EmailGenerator().generateUserCourseRegisterEmail(user, course); subject = String.format(EmailType.USER_COURSE_REGISTER.getSubject(), course.getName(), course.getId()); verifyEmail(email, user.email, subject, "/instructorCourseRegisterEmail.html"); }
Source:
public void processResponse(JsonRpcResponse response) { JsonNode id = response.getId(); if (NullNode.class.isInstance(id) || id == null) { this.tracker.processIssue(response); return; } JsonRpcCall call = this.tracker.removeCall(response.getId()); if (call == null) { this.log.error("Not able to update response for {}", response.getId()); return; } call.addResponse(response); if (call.getCallback() != null && call.getExecutor() != null) { if (response.getError() != null) { Map<String, Object> map = mapValues(response.getError()); String message = (String) map.get("message"); call.getExecutor().submit(() -> call.getCallback().onFailure(new Exception(message))); } else { call.getExecutor().submit(() -> call.getCallback().onResponse(new JsonResponseUtil().populate(response))); } } }

Target:
public void processResponse(JsonRpcResponse response) { JsonNode id = response.getId(); if (NullNode.class.isInstance(id) || id == null) { this.tracker.processIssue(response); return; } JsonRpcCall call = this.tracker.removeCall(response.getId()); if (call == null) { this.log.error("Not able to update response for {}", response.getId()); return; } call.addResponse(response); if (call.getCallback() != null && executorService != null) { if (response.getError() != null) { executorService.submit(() -> call.getCallback().onFailure(mapValues(response.getError()))); } else { executorService.submit(() -> call.getCallback().onResponse(new JsonResponseUtil().populate(response))); } } }
Source:
public final void prepareRun(BatchSinkContext context) { OutputFormatProvider outputFormatProvider = createOutputFormatProvider(context); Map<String, String> outputConfig = new HashMap<>(outputFormatProvider.getOutputFormatConfiguration()); if (config.fileSystemProperties != null) { Map<String, String> properties = GSON.fromJson(config.fileSystemProperties, MAP_STRING_STRING_TYPE); outputConfig.putAll(properties); } context.addOutput(Output.of(config.referenceName, new SinkOutputFormatProvider( outputFormatProvider.getOutputFormatClassName(), outputConfig))); }

Target:
public final void prepareRun(BatchSinkContext context) { OutputFormatProvider outputFormatProvider = createOutputFormatProvider(context, config.fileSystemProperties); context.addOutput(Output.of(config.referenceName, outputFormatProvider)); }
Source:
String getFormattedNote() { StringBuilder formattedNote = new StringBuilder(constants.empty()); for (int i = 0; i < notes.size(); i++) { String note = notes.get(i); formattedNote.append(constants.lineBreak()); formattedNote.append(constants.htmlTab()); formattedNote.append(note); } return formattedNote.toString(); }

Target:
String getFormattedNote() { StringBuilder formattedNote = new StringBuilder(constants.empty()); for (int i = 0; i < notes.size(); i++) { String note = notes.get(i); formattedNote.append(constants.lineBreak()).append(constants.htmlTab()).append(note); } return formattedNote.toString(); }
Source:
DistributedLockService getCmsDlockService() { if (cmsDlockService == null) { cmsDlockService = DLockService.getOrCreateService(CMS_DLOCK_SERVICE_NAME, cache.getInternalDistributedSystem()); } return cmsDlockService; }

Target:
synchronized DistributedLockService getCmsDlockService() { if (cmsDlockService == null) { cmsDlockService = DLockService.getOrCreateService(CMS_DLOCK_SERVICE_NAME, cache.getInternalDistributedSystem()); } return cmsDlockService; }
Source:
public Long create(Sample sample) throws IOException { loadChildEntities(sample); authorizationManager.throwIfNotWritable(sample); setChangeDetails(sample); if (isDetailedSample(sample)) { if (!isIdentitySample(sample)) { DetailedSample detailed = (DetailedSample) sample; if (detailed.getParent() == null) { throw new IllegalArgumentException("Detailed sample is missing parent identifier"); } if (detailed.getParent().getId() != SampleImpl.UNSAVED_ID) { detailed.setParent((DetailedSample) get(detailed.getParent().getId())); } else { try { setIdentity(detailed); if (!isIdentitySample(detailed.getParent())) { detailed.setParent(findOrCreateParent(detailed)); } detailed.inheritPermissions(detailed.getParent()); } catch (MisoNamingException e) { throw new IOException(e.getMessage(), e); } } validateHierarchy(detailed); } else { sample.inheritPermissions(sample.getProject()); if (isUniqueExternalNameWithinProjectRequired() && isExternalNameDuplicatedInProject(sample)) { throw new IllegalArgumentException("Sample with external name '" + ((SampleIdentity) sample).getExternalName() + "' already exists in project " + sample.getProject().getShortName()); } } } else { sample.inheritPermissions(sample.getProject()); } sample.setName(generateTemporaryName()); if (isStringEmptyOrNull(sample.getAlias()) && namingScheme.hasSampleAliasGenerator()) { sample.setAlias(generateTemporaryName()); } return save(sample, true).getId(); }

Target:
public Long create(Sample sample) throws IOException { loadChildEntities(sample); authorizationManager.throwIfNotWritable(sample); setChangeDetails(sample); if (isDetailedSample(sample)) { DetailedSample detailed = (DetailedSample) sample; if (!isIdentitySample(sample)) { if (detailed.getParent() == null) { throw new IllegalArgumentException("Detailed sample is missing parent identifier"); } if (detailed.getParent().getId() != SampleImpl.UNSAVED_ID) { detailed.setParent((DetailedSample) get(detailed.getParent().getId())); } else { try { setIdentity(detailed); if (!isIdentitySample(detailed.getParent())) { detailed.setParent(findOrCreateParent(detailed)); } } catch (MisoNamingException e) { throw new IOException(e.getMessage(), e); } } validateHierarchy(detailed); } else { if (isUniqueExternalNameWithinProjectRequired() && isExternalNameDuplicatedInProject(sample)) { throw new IllegalArgumentException("Sample with external name '" + ((SampleIdentity) sample).getExternalName() + "' already exists in project " + sample.getProject().getShortName()); } } detailed.inheritPermissions(detailed.getParent() == null ? detailed.getProject() : detailed.getParent()); } else { sample.inheritPermissions(sample.getProject()); } sample.setName(generateTemporaryName()); if (isStringEmptyOrNull(sample.getAlias()) && namingScheme.hasSampleAliasGenerator()) { sample.setAlias(generateTemporaryName()); } return save(sample, true).getId(); }
Source:
public List<ISuite> runSuitesLocally() { if (m_suites.isEmpty()) { error("No test suite found. Nothing to run"); usage(); return Collections.emptyList(); } SuiteRunnerMap suiteRunnerMap = new SuiteRunnerMap(); if (m_suites.get(0).getVerbose() >= 2) { Version.displayBanner(); } for (XmlSuite xmlSuite : m_suites) { createSuiteRunners(suiteRunnerMap, xmlSuite); } if (m_suiteThreadPoolSize == 1 && !m_randomizeSuites) { for (XmlSuite xmlSuite : m_suites) { runSuitesSequentially( xmlSuite, suiteRunnerMap, getVerbose(xmlSuite), getDefaultSuiteName()); } return Lists.newArrayList(suiteRunnerMap.values()); } IDynamicGraph<ISuite> suiteGraph = new org.testng.internal.DynamicGraph<>(); for (XmlSuite xmlSuite : m_suites) { populateSuiteGraph(suiteGraph, suiteRunnerMap, xmlSuite); } IThreadWorkerFactory<ISuite> factory = new SuiteWorkerFactory( suiteRunnerMap, 0 , getDefaultSuiteName()); ITestNGThreadPoolExecutor pooledExecutor = this.getExecutorFactory().newSuiteExecutor( "suites", suiteGraph, factory, m_suiteThreadPoolSize, m_suiteThreadPoolSize, Integer.MAX_VALUE, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<>(), null); Utils.log("TestNG", 2, "Starting executor for all suites"); pooledExecutor.run(); try { pooledExecutor.awaitTermination(Long.MAX_VALUE, TimeUnit.MILLISECONDS); pooledExecutor.shutdownNow(); } catch (InterruptedException handled) { Thread.currentThread().interrupt(); error("Error waiting for concurrent executors to finish " + handled.getMessage()); } return Lists.newArrayList(suiteRunnerMap.values()); }

Target:
public List<ISuite> runSuitesLocally() { if (m_suites.isEmpty()) { error("No test suite found. Nothing to run"); usage(); return Collections.emptyList(); } SuiteRunnerMap suiteRunnerMap = new SuiteRunnerMap(); if (m_suites.get(0).getVerbose() >= 2) { Version.displayBanner(); } for (XmlSuite xmlSuite : m_suites) { createSuiteRunners(suiteRunnerMap, xmlSuite); } if (m_suiteThreadPoolSize == 1 && !m_randomizeSuites) { for (XmlSuite xmlSuite : m_suites) { runSuitesSequentially( xmlSuite, suiteRunnerMap, getVerbose(xmlSuite), getDefaultSuiteName()); } return Lists.newArrayList(suiteRunnerMap.values()); } IDynamicGraph<ISuite> suiteGraph = new DynamicGraph<>(); for (XmlSuite xmlSuite : m_suites) { populateSuiteGraph(suiteGraph, suiteRunnerMap, xmlSuite); } IThreadWorkerFactory<ISuite> factory = new SuiteWorkerFactory( suiteRunnerMap, 0 , getDefaultSuiteName()); ITestNGThreadPoolExecutor pooledExecutor = this.getExecutorFactory().newSuiteExecutor( "suites", suiteGraph, factory, m_suiteThreadPoolSize, m_suiteThreadPoolSize, Integer.MAX_VALUE, TimeUnit.MILLISECONDS, new LinkedBlockingQueue<>(), null); Utils.log("TestNG", 2, "Starting executor for all suites"); pooledExecutor.run(); try { pooledExecutor.awaitTermination(Long.MAX_VALUE, TimeUnit.MILLISECONDS); pooledExecutor.shutdownNow(); } catch (InterruptedException handled) { Thread.currentThread().interrupt(); error("Error waiting for concurrent executors to finish " + handled.getMessage()); } return Lists.newArrayList(suiteRunnerMap.values()); }
Source:
private void shouldGetStoreLevelTagMap(final String builtInMetricsVersion) { final String taskName = "test-task"; final String storeType = "remote-window"; final String storeName = "window-keeper"; final StreamsMetricsImpl streamsMetrics = new StreamsMetricsImpl(metrics, THREAD_NAME, builtInMetricsVersion); final Map<String, String> tagMap = streamsMetrics.storeLevelTagMap(taskName, storeType, storeName); assertThat(tagMap.size(), equalTo(3)); assertThat( tagMap.get(builtInMetricsVersion.equals(StreamsConfig.METRICS_LATEST) ? StreamsMetricsImpl.THREAD_ID_TAG : StreamsMetricsImpl.THREAD_ID_TAG_0100_TO_23), equalTo(THREAD_NAME)); assertThat(tagMap.get(StreamsMetricsImpl.TASK_ID_TAG), equalTo(taskName)); assertThat(tagMap.get(storeType + "-" + StreamsMetricsImpl.STORE_ID_TAG), equalTo(storeName)); }

Target:
private void shouldGetStoreLevelTagMap(final String builtInMetricsVersion) { final String taskName = "test-task"; final String storeType = "remote-window"; final String storeName = "window-keeper"; final StreamsMetricsImpl streamsMetrics = new StreamsMetricsImpl(metrics, THREAD_ID, builtInMetricsVersion); final Map<String, String> tagMap = streamsMetrics.storeLevelTagMap(THREAD_ID, taskName, storeType, storeName); assertThat(tagMap.size(), equalTo(3)); final boolean isMetricsLatest = builtInMetricsVersion.equals(StreamsConfig.METRICS_LATEST); assertThat( tagMap.get(isMetricsLatest ? StreamsMetricsImpl.THREAD_ID_TAG : StreamsMetricsImpl.THREAD_ID_TAG_0100_TO_23), equalTo(THREAD_ID)); assertThat(tagMap.get(StreamsMetricsImpl.TASK_ID_TAG), equalTo(taskName)); assertThat(tagMap.get(storeType + "-" + StreamsMetricsImpl.STORE_ID_TAG), equalTo(storeName)); }
Source:
public static void setUp() { ITmfTrace trace = new TmfXmlKernelTraceStub(); IPath filePath = Activator.getAbsoluteFilePath(KERNEL_MEMORY_USAGE_FILE); IStatus status = trace.validate(null, filePath.toOSString()); if (!status.isOK()) { fail(status.getException().getMessage()); } try { trace.initTrace(null, filePath.toOSString(), TmfEvent.class); } catch (TmfTraceException e) { fail(e.getMessage()); } deleteSuppFiles(trace); ((TmfTrace) trace).traceOpened(new TmfTraceOpenedSignal(null, trace, null)); fModule = TmfTraceUtils.getAnalysisModuleOfClass(trace, KernelMemoryAnalysisModule.class, KernelMemoryAnalysisModule.ID); assertNotNull(fModule); fTrace = trace; }

Target:
public void setUp() { ITmfTrace trace = new TmfXmlKernelTraceStub(); IPath filePath = Activator.getAbsoluteFilePath(KERNEL_MEMORY_USAGE_FILE); IStatus status = trace.validate(null, filePath.toOSString()); if (!status.isOK()) { fail(status.getException().getMessage()); } try { trace.initTrace(null, filePath.toOSString(), TmfEvent.class); } catch (TmfTraceException e) { fail(e.getMessage()); } deleteSuppFiles(trace); ((TmfTrace) trace).traceOpened(new TmfTraceOpenedSignal(this, trace, null)); fModule = TmfTraceUtils.getAnalysisModuleOfClass(trace, KernelMemoryAnalysisModule.class, KernelMemoryAnalysisModule.ID); assertNotNull(fModule); fTrace = trace; }
Source:
public int indexOf(Slice pattern, int offset) { if (pattern.length() == 0) { return min(offset, size); } if (size == 0 || offset >= size) { return -1; } if (pattern.length() < SIZE_OF_INT || size < SIZE_OF_LONG) { return indexOfBruteForce(pattern, offset); } int head = pattern.getIntUnchecked(0); int firstByteMask = head & 0xff; firstByteMask |= firstByteMask << 8; firstByteMask |= firstByteMask << 16; int lastValidIndex = size - pattern.length(); int index = offset; while (index <= lastValidIndex) { int value = getIntUnchecked(index); int valueXor = value ^ firstByteMask; int hasZeroBytes = (valueXor - 0x01010101) & ~valueXor & 0x80808080; if (hasZeroBytes == 0) { index += SIZE_OF_INT; continue; } if (value == head && equalsUnchecked(index, pattern, 0, pattern.length())) { return index; } index++; } return -1; }

Target:
public int indexOf(Slice pattern, int offset) { if (size == 0 || offset >= size) { return -1; } if (pattern.length() == 0) { return offset; } if (pattern.length() < SIZE_OF_INT || size < SIZE_OF_LONG) { return indexOfBruteForce(pattern, offset); } int head = pattern.getIntUnchecked(0); int firstByteMask = head & 0xff; firstByteMask |= firstByteMask << 8; firstByteMask |= firstByteMask << 16; int lastValidIndex = size - pattern.length(); int index = offset; while (index <= lastValidIndex) { int value = getIntUnchecked(index); int valueXor = value ^ firstByteMask; int hasZeroBytes = (valueXor - 0x01010101) & ~valueXor & 0x80808080; if (hasZeroBytes == 0) { index += SIZE_OF_INT; continue; } if (value == head && equalsUnchecked(index, pattern, 0, pattern.length())) { return index; } index++; } return -1; }
Source:
public ITmfEvent parseEvent(ITmfContext context) { @Nullable ITmfLocation location = context.getLocation(); if (location instanceof TmfLongLocation) { TmfLongLocation tmfLongLocation = (TmfLongLocation) location; Long locationInfo = tmfLongLocation.getLocationInfo(); if (location.equals(NULL_LOCATION)) { locationInfo = 0L; } if (locationInfo != null) { try { if (!locationInfo.equals(fFileInput.getFilePointer())) { fFileInput.seek(locationInfo); } String nextJson = readNextEventString(() -> (char) fFileInput.read()); while (nextJson != null) { TraceEventField field = TraceEventField.parseJson(nextJson); if (field == null) { return null; } if (field.getPhase() != 'M') { return new TraceEventEvent(this, context.getRank(), field); } Map<@NonNull String, @NonNull Object> args = field.getArgs(); if (args != null) { args.entrySet().forEach(entry -> fProperties.put(entry.getKey(), String.valueOf(entry.getValue()))); } nextJson = readNextEventString(() -> (char) fFileInput.read()); } } catch (IOException e) { Activator.getInstance().logError("Error parsing event", e); } } } return null; }

Target:
public ITmfEvent parseEvent(ITmfContext context) { @Nullable ITmfLocation location = context.getLocation(); if (location instanceof TmfLongLocation) { TmfLongLocation tmfLongLocation = (TmfLongLocation) location; Long locationInfo = tmfLongLocation.getLocationInfo(); if (location.equals(NULL_LOCATION)) { locationInfo = 0L; } if (locationInfo != null) { try { if (!locationInfo.equals(fFileInput.getFilePointer())) { fFileInput.seek(locationInfo); } String nextJson = readNextEventString(() -> (char) fFileInput.read()); while (nextJson != null) { TraceEventField field = TraceEventField.parseJson(nextJson); if (field == null) { return null; } if (field.getPhase() != 'M') { return new TraceEventEvent(this, context.getRank(), field); } parseMetadata(field); nextJson = readNextEventString(() -> (char) fFileInput.read()); } } catch (IOException e) { Activator.getInstance().logError("Error parsing event", e); } } } return null; }
Source:
public static String getAlternativePath(String path, boolean removeExtension) { return FOOTPRINTS_DATA_DIR != null ? getAlternativeFile(path, removeExtension).getAbsolutePath() : null; }

Target:
private static String getAlternativePath(String path, boolean removeExtension) { return FOOTPRINTS_DATA_DIR != null ? getAlternativeFile(path, removeExtension).getAbsolutePath() : null; }
Source:
public int getPreviousStep(int step) { if(this.getCurrentStepObject().canFinish()) return -1; if (myCurrentStep == projectCreatedStep.getStepId()) { return -1; } return super.getPreviousStep(step); }

Target:
public int getPreviousStep(int step) { if (this.getCurrentStepObject().canFinish()) { return -1; } if (myCurrentStep == projectCreatedStep.getStepId()) { return -1; } return super.getPreviousStep(step); }
Source:
public void testJobSubmissionUnderSameJobId() throws Exception { final TestingJobManagerRunnerFactory jobManagerRunnerFactory = startDispatcherAndSubmitJob(1); runningJobsRegistry.setJobRunning(jobId); final TestingJobManagerRunner testingJobManagerRunner = jobManagerRunnerFactory.takeCreatedJobManagerRunner(); testingJobManagerRunner.completeResultFutureExceptionally(new JobNotFinishedException(jobId)); testingJobManagerRunner.getCloseAsyncCalledFuture().get(); final CompletableFuture<Acknowledge> submissionFuture = dispatcherGateway.submitJob(jobGraph, timeout); try { submissionFuture.get(10L, TimeUnit.MILLISECONDS); fail("The job submission future should not complete until the previous JobManager " + "termination future has been completed."); } catch (TimeoutException ignored) { } finally { testingJobManagerRunner.completeTerminationFuture(); } assertThat(submissionFuture.get(), equalTo(Acknowledge.get())); }

Target:
public void testJobSubmissionUnderSameJobId() throws Exception { final TestingJobManagerRunnerFactory jobManagerRunnerFactory = startDispatcherAndSubmitJob(1); runningJobsRegistry.setJobRunning(jobId); final TestingJobManagerRunner testingJobManagerRunner = jobManagerRunnerFactory.takeCreatedJobManagerRunner(); testingJobManagerRunner.completeResultFutureExceptionally(new JobNotFinishedException(jobId)); testingJobManagerRunner.getCloseAsyncCalledLatch().await(); final CompletableFuture<Acknowledge> submissionFuture = dispatcherGateway.submitJob(jobGraph, timeout); try { submissionFuture.get(10L, TimeUnit.MILLISECONDS); fail("The job submission future should not complete until the previous JobManager " + "termination future has been completed."); } catch (TimeoutException ignored) { } finally { testingJobManagerRunner.completeTerminationFuture(); } assertThat(submissionFuture.get(), equalTo(Acknowledge.get())); }
Source:
public final static <A, B> AbstractBiJoiner<A, B> merge(BiJoiner<A, B>... joiners) { List<SingleBiJoiner<A, B>> joinerList = new ArrayList<>(joiners.length); for (BiJoiner<A, B> joiner : joiners) { if (joiner instanceof NoneBiJoiner) { } else if (joiner instanceof SingleBiJoiner) { joinerList.add((SingleBiJoiner<A, B>) joiner); } else if (joiner instanceof CompositeBiJoiner) { joinerList.addAll(((CompositeBiJoiner<A, B>) joiner).getJoinerList()); } else { throw new IllegalArgumentException("The joiner class (" + joiner.getClass() + ") is not supported."); } } if (joinerList.size() == 0) { return new NoneBiJoiner<>(); } else if (joinerList.size() == 1) { return joinerList.get(0); } return new CompositeBiJoiner<>(joinerList); }

Target:
public final static <A, B> AbstractBiJoiner<A, B> merge(BiJoiner<A, B>... joiners) { List<SingleBiJoiner<A, B>> joinerList = new ArrayList<>(joiners.length); for (BiJoiner<A, B> joiner : joiners) { if (joiner instanceof NoneBiJoiner) { } else if (joiner instanceof SingleBiJoiner) { joinerList.add((SingleBiJoiner<A, B>) joiner); } else if (joiner instanceof CompositeBiJoiner) { joinerList.addAll(((CompositeBiJoiner<A, B>) joiner).getJoinerList()); } else { throw new IllegalArgumentException("The joiner class (" + joiner.getClass() + ") is not supported."); } } if (joinerList.isEmpty()) { return new NoneBiJoiner<>(); } else if (joinerList.size() == 1) { return joinerList.get(0); } return new CompositeBiJoiner<>(joinerList); }
Source:
public ImportVmParameters() { setSourceDomainId(Guid.Empty); setDestDomainId(Guid.Empty); }

Target:
public ImportVmParameters() { sourceDomainId = Guid.Empty; destDomainId = Guid.Empty; }