auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void exportTest() throws Exception { ConfiguratorRegistry registry = ConfiguratorRegistry.get(); ConfigurationContext context = new ConfigurationContext(registry); { AuthorizationStrategy authorizationStrategy = j.jenkins.getAuthorizationStrategy(); Configurator c = context.lookupOrFail(ProjectMatrixAuthorizationStrategy.class); @SuppressWarnings("unchecked") CNode node = c.describe(authorizationStrategy, context); assertNotNull(node); Mapping mapping = node.asMapping(); List<CNode> permissions = mapping.get("permissions").asSequence(); assertEquals("list size", 18, permissions.size()); assertNull("no grantedPermissions", mapping.get("grantedPermissions")); } { Configurator c = context.lookupOrFail(AuthorizationMatrixNodeProperty.class); CNode node = c.describe(j.jenkins.getNode("agent1").getNodeProperty(AuthorizationMatrixNodeProperty.class), context); assertNotNull(node); Mapping mapping = node.asMapping(); assertEquals("inheritance strategy", mapping.getScalarValue("inheritanceStrategy"), "inheritingGlobal"); List<CNode> permissions = mapping.get("permissions").asSequence(); assertEquals("list size", 6, permissions.size()); } }

Target:
public void exportTest() throws Exception { ConfiguratorRegistry registry = ConfiguratorRegistry.get(); ConfigurationContext context = new ConfigurationContext(registry); { AuthorizationStrategy authorizationStrategy = j.jenkins.getAuthorizationStrategy(); Configurator c = context.lookupOrFail(ProjectMatrixAuthorizationStrategy.class); @SuppressWarnings("unchecked") CNode node = c.describe(authorizationStrategy, context); assertNotNull(node); Mapping mapping = node.asMapping(); List<CNode> permissions = mapping.get("permissions").asSequence(); assertEquals("list size", 18, permissions.size()); assertNull("no grantedPermissions", mapping.get("grantedPermissions")); } { Configurator c = context.lookupOrFail(AuthorizationMatrixNodeProperty.class); CNode node = c.describe(j.jenkins.getNode("agent1").getNodeProperty(AuthorizationMatrixNodeProperty.class), context); assertNotNull(node); Mapping mapping = node.asMapping(); assertEquals("inheritance strategy", mapping.getScalarValue("inheritanceStrategy"), "inheritingGlobal"); List<CNode> permissions = mapping.get("permissions").asSequence(); assertEquals("list size", 6, permissions.size()); { List<String> strings = Arrays.asList( "Agent/Build:anonymous", "Agent/Build:authenticated", "Agent/Configure:authenticated", "Agent/Connect:authenticated", "Agent/Delete:authenticated", "Agent/Disconnect:authenticated"); for (CNode entry : permissions) { String value = entry.asScalar().getValue(); assertTrue("list contains entry", strings.contains(value)); } } } }
Source:
public static ValueMatcher getLongValueMatcher( final LongColumnSelector longSelector, Comparable value ) { try { if (value == null) { return new BooleanValueMatcher(false); } final long longValue = Long.parseLong(value.toString()); return new ValueMatcher() { @Override public boolean matches() { return longSelector.get() == longValue; } }; } catch (NumberFormatException nfe) { return new BooleanValueMatcher(false); } }

Target:
public static ValueMatcher getLongValueMatcher( final LongColumnSelector longSelector, Comparable value ) { if (value == null) { return new BooleanValueMatcher(false); } final Long longValue = Longs.tryParse(value.toString()); if (longValue == null) { return new BooleanValueMatcher(false); } return new ValueMatcher() { final long unboxedLong = longValue.longValue(); @Override public boolean matches() { return longSelector.get() == unboxedLong; } }; }
Source:
protected Statement createFailOnTimeoutStatement( Statement statement, Description description) throws Exception { return FailOnTimeout.builder() .withTimeout(timeout, timeUnit) .withLookingForStuckThread(lookForStuckThread) .withDescription(description) .build(statement); }

Target:
private Statement createFailOnTimeoutStatement( Statement statement, Description description) throws Exception { return FailOnTimeout.builder() .withDescription(description) .build(createFailOnTimeoutStatement(statement)); }
Source:
static private void cleanUpStaleJobs() { long now = System.currentTimeMillis(); Collection<Long> keys; synchronized(jobs) { keys = new ArrayList<Long>(jobs.keySet()); } logger.info("Cleaning Stale Import Jobs ..."); for (Long id : keys) { ImportingJob job = jobs.get(id); if (job != null && !job.updating && now - job.lastTouched > STALE_PERIOD) { job.dispose(); jobs.remove(id); logger.info("Removed Job ID " + id); } } }

Target:
static private void cleanUpStaleJobs() { long now = System.currentTimeMillis(); Collection<Long> keys; synchronized(jobs) { keys = new ArrayList<Long>(jobs.keySet()); } for (Long id : keys) { ImportingJob job = jobs.get(id); if (job != null && !job.updating && now - job.lastTouched > STALE_PERIOD) { job.dispose(); jobs.remove(id); logger.info("Removed Stale Import Job ID " + id); } } }
Source:
public void setMaximumPoolingConnections(int maximumPoolingConnections) { this.maximumPoolingConnections = maximumPoolingConnections; }

Target:
public void setMaximumPoolingConnections(int maximumPoolingConnections) { if (maximumPoolingConnections < 1) throw new IllegalArgumentException("maximumPoolingConnections must be 1 or greater"); this.maximumPoolingConnections = maximumPoolingConnections; }
Source:
public boolean isNoexcept(boolean inCalledContext) { for (ICPPEvaluation arg : fArguments) { if (!arg.isNoexcept(inCalledContext)) return false; } return true; }

Target:
public boolean isNoexcept(boolean inCalledContext) { if (getOverloads() != null) for (ICPPFunction overload : getOverloads()) { if (overload != null && !EvalUtil.evaluateNoexceptSpecifier(overload.getType().getNoexceptSpecifier())) return false; } for (ICPPEvaluation arg : fArguments) { if (!arg.isNoexcept(inCalledContext)) return false; } return true; }
Source:
public Long create(Library library) throws IOException { loadChildEntities(library); setChangeDetails(library); if (library.getSecurityProfile() == null) { library.inheritPermissions(sampleDao.get(library.getSample().getId())); } authorizationManager.throwIfNotWritable(library); library.setName(generateTemporaryName()); if (isDetailedLibrary(library) && ((DetailedLibrary) library).hasNonStandardAlias()) { } else if (isStringEmptyOrNull(library.getAlias()) && namingScheme.hasLibraryAliasGenerator()) { try { library.setAlias(namingScheme.generateLibraryAlias(library)); } catch (MisoNamingException e) { throw new IOException("Error generating alias for library", e); } } else { namingScheme.validateLibraryAlias(library.getAlias()); } return save(library).getId(); }

Target:
public Long create(Library library) throws IOException { loadChildEntities(library); setChangeDetails(library); if (library.getSecurityProfile() == null) { library.inheritPermissions(sampleDao.get(library.getSample().getId())); } authorizationManager.throwIfNotWritable(library); library.setName(generateTemporaryName()); if (isDetailedLibrary(library) && ((DetailedLibrary) library).hasNonStandardAlias()) { } else if (isStringEmptyOrNull(library.getAlias()) && namingScheme.hasLibraryAliasGenerator()) { try { library.setAlias(namingScheme.generateLibraryAlias(library)); } catch (MisoNamingException e) { throw new IOException("Error generating alias for library", e); } } else { validateAliasOrThrow(library); } return save(library).getId(); }
Source:
public Vector<T> filter(Predicate<? super T> predicate) { Objects.requireNonNull(predicate, "predicate is null"); final Vector<T> results = ofAll(iterator().filter(predicate)); if (results.isEmpty()) { return empty(); } else if (results.length() == length()) { return this; } else { return results; } }

Target:
public Vector<T> filter(Predicate<? super T> predicate) { Objects.requireNonNull(predicate, "predicate is null"); final Vector<T> results = ofAll(iterator().filter(predicate)); return (results.length() == length()) ? this : results; }
Source:
public synchronized void updateQuotaCache() { if (!isCacheUpdateNeeded()) { return; } log.debug("Updating Quota Cache..."); long timeStart = System.currentTimeMillis(); List<Quota> allQuotaIncludingConsumption = getQuotaDAO().getAllQuotaIncludingConsumption(); if (allQuotaIncludingConsumption.isEmpty()) { return; } HashMap<Guid, Map<Guid, Quota>> newStoragePoolQuotaMap = new HashMap<Guid, Map<Guid, Quota>>(); for (Quota quota : allQuotaIncludingConsumption) { if (!newStoragePoolQuotaMap.containsKey(quota.getStoragePoolId())) { newStoragePoolQuotaMap.put(quota.getStoragePoolId(), new HashMap<Guid,Quota>()); } newStoragePoolQuotaMap.get(quota.getStoragePoolId()).put(quota.getId(), quota); } lock.writeLock().lock(); try { storagePoolQuotaMap = newStoragePoolQuotaMap; } finally { lock.writeLock().unlock(); } long timeEnd = System.currentTimeMillis(); log.debugFormat("Quota Cache updated. ({0} msec)", timeEnd-timeStart); }

Target:
public synchronized void updateQuotaCache() { if (!isCacheUpdateNeeded()) { return; } log.debug("Updating Quota Cache..."); long timeStart = System.currentTimeMillis(); List<Quota> allQuotaIncludingConsumption = getQuotaDAO().getAllQuotaIncludingConsumption(); if (allQuotaIncludingConsumption.isEmpty()) { return; } HashMap<Guid, Map<Guid, Quota>> newStoragePoolQuotaMap = new HashMap<Guid, Map<Guid, Quota>>(); for (Quota quota : allQuotaIncludingConsumption) { if (!newStoragePoolQuotaMap.containsKey(quota.getStoragePoolId())) { newStoragePoolQuotaMap.put(quota.getStoragePoolId(), new HashMap<Guid,Quota>()); } newStoragePoolQuotaMap.get(quota.getStoragePoolId()).put(quota.getId(), quota); } lock.writeLock().lock(); try { storagePoolQuotaMap = newStoragePoolQuotaMap; } finally { lock.writeLock().unlock(); } long timeEnd = System.currentTimeMillis(); log.infoFormat("Quota Cache updated. ({0} msec)", timeEnd-timeStart); }
Source:
public String getDisplayName() { String n = getName(); boolean gitHubOrg = StringUtils.isBlank(apiUrl) || GITHUB_URL.equals(apiUrl); if (StringUtils.isBlank(n)) { n = gitHubOrg ? GITHUB_NAME : SCMName.fromUrl(apiUrl, COMMON_PREFIX_HOSTNAMES); } String a = gitHubOrg ? "<LINK_0>" : StringUtils.removeEnd(apiUrl, "/api/v3"); return StringUtils.isBlank(n) ? a : Messages.GitHubServerConfig_displayName(n, a); }

Target:
public String getDisplayName() { String gitHubName = getName(); boolean isGitHubCom = StringUtils.isBlank(apiUrl) || GITHUB_URL.equals(apiUrl); if (StringUtils.isBlank(gitHubName)) { gitHubName = isGitHubCom ? PUBLIC_GITHUB_NAME : SCMName.fromUrl(apiUrl, COMMON_PREFIX_HOSTNAMES); } String gitHubUrl = isGitHubCom ? "<LINK_0>" : StringUtils.removeEnd(apiUrl, "/api/v3"); return StringUtils.isBlank(gitHubName) ? gitHubUrl : Messages.GitHubServerConfig_displayName(gitHubName, gitHubUrl); }
Source:
public static String getScoreString(final Context context, final String fullKey, final double score) { final String key = fullKey.split("\\.")[0]; int resource = R.string.na; if (strings.containsKey(key)) { resource = strings.get(key); } else if (key.startsWith(KEY_PREFIX_KILLS)) { resource = R.string.lb_sctype_kills; } else if (key.startsWith(KEY_PREFIX_SCORE)) { resource = R.string.lb_sctype_score; } if (resource == R.string.na) { Log.d("LeaderbordUtils", "Missing string: " + key); return context.getString(resource); } if (score % 1 == 0) { return String.format(context.getString(resource), NumberFormatter.format((int) score)); } else { return String.format(context.getString(resource), NumberFormatter.format(score)); } }

Target:
public static String getScoreString(final Context context, final String fullKey, final double score) { final String key = fullKey.split("\\.")[0]; int resource = R.string.na; if (strings.containsKey(key)) { resource = strings.get(key); } else if (key.startsWith(KEY_PREFIX_KILLS)) { resource = R.string.lb_sctype_kills; } else if (key.startsWith(KEY_PREFIX_SCORE)) { resource = R.string.lb_sctype_score; } if (resource == R.string.na) { return context.getString(resource); } if (score % 1 == 0) { return String.format(context.getString(resource), NumberFormatter.format((int) score)); } else { return String.format(context.getString(resource), NumberFormatter.format(score)); } }
Source:
private void addContact(JID jid, String nickname) throws SarosCancellationException { BiPredicate<String, String> questionDialog = (title, message) -> { try { return SWTUtils.runSWTSync( () -> DialogUtils.openQuestionMessageDialog(null, title, message)); } catch (Exception e) { log.debug("Error opening questionMessageDialog", e); return false; } }; contactsService.addContact(jid, nickname, questionDialog); }

Target:
private void addContact(JID jid, String nickname) throws OperationCanceledException { BiPredicate<String, String> questionDialogHandler = (title, message) -> { try { return SWTUtils.runSWTSync( () -> DialogUtils.openQuestionMessageDialog(null, title, message)); } catch (Exception e) { log.debug("Error opening questionMessageDialog", e); return false; } }; contactsService.addContact(jid, nickname, questionDialogHandler); }
Source:
private static Image getFBTypeImage(IFile element) { Image image; FBType type = getFBTypeFromFile(element); if (type instanceof BasicFBType) { image = FordiacImage.ICON_BASIC_FB.getImage(); } else if (type instanceof CompositeFBType) { image = FordiacImage.ICON_COMPOSITE_FB.getImage(); } else if (type instanceof ServiceInterfaceFBType) { image = FordiacImage.ICON_SIFB.getImage(); } else { image = checkUnloadedFBType(element); } return image; }

Target:
private static Image getFBTypeImage(IFile element) { FBType type = getFBTypeFromFile(element); if (type instanceof BasicFBType) { return FordiacImage.ICON_BASIC_FB.getImage(); } else if (type instanceof CompositeFBType) { return FordiacImage.ICON_COMPOSITE_FB.getImage(); } else if (type instanceof ServiceInterfaceFBType) { return FordiacImage.ICON_SIFB.getImage(); } return checkUnloadedFBType(element); }
Source:
public void configure(String name, Object value) throws ConfigurationException { logger.debug("Configure item: to {}", name, value); try { if ("connectionUri".equals(name)) { try { disconnect(); fatekPLC = new FatekPLC((String) value); logger.info("New Fatek PLC connectionUri={}", value); } catch (Exception e) { fatekPLC = null; throw new ConfigurationException(name, e.getMessage()); } } else { throw new ConfigurationException(name, "Unknow property"); } } catch (ConfigurationException e) { logger.error("", e); throw e; } logger.debug("Configure item: end", name); }

Target:
public void configure(String name, Object value) throws ConfigurationException { logger.debug("Configure item: to {}", name, value); if ("connectionUri".equals(name)) { try { disconnect(); fatekPLC = new FatekPLC((String) value); logger.info("New Fatek PLC connectionUri={}", value); } catch (Exception e) { fatekPLC = null; throw new ConfigurationException(name, e.getMessage()); } } else { throw new ConfigurationException(name, "Unknown property"); } logger.debug("Configure item: end", name); }
Source:
public void testTryGetNonExistsDiskImage() { DiskImage result = dao.getDiskImageByDiskAndImageIds(Guid.newGuid(), Guid.newGuid()); assertEquals(null, result); }

Target:
public void testTryGetNonExistsDiskImage() { DiskImage result = dao.getDiskImageByDiskAndImageIds(Guid.newGuid(), Guid.newGuid()); assertNull(null, result); }
Source:
private void initNode () { if ( _nodeInstance == null || _nodeInstance.isClosed()) { long start = System.currentTimeMillis(); synchronized (syncMe) { if ( _nodeInstance == null || _nodeInstance.isClosed()) { loadConfig(); shutDownNode(); String node_id = ConfigUtils.getServerId(); try{ _nodeInstance = new Node( Settings.builder(). put( "cluster.name", Config.getStringProperty("es.cluster.name")). put( "node.name", node_id ). put("path.home", "WEB-INF/elastic_search"). put("path.data", Config.getStringProperty(DATA_PATH)). put("path.repo", Config.getStringProperty(REPO_PATH)).build() ).start(); } catch (NodeValidationException e){ Logger.error(this, "Error validating ES node at start.", e); } try { Optional<UpdateSettingsRequest> settingsRequest = getReplicasSettings(); if(settingsRequest.isPresent()) { _nodeInstance.client().admin().indices().updateSettings( settingsRequest.get() ).actionGet(); } } catch ( IndexNotFoundException e ) { Logger.warn( ESClient.class, "Unable to set ES property auto_expand_replicas: [No indices found]" ); } catch ( Exception e ) { Logger.error( ESClient.class, "Unable to set ES property auto_expand_replicas.", e ); } try { Thread.sleep( 5000L ); } catch ( InterruptedException e ) { Logger.error( ESClient.class, "Error waiting for node to be available", e ); } } } System.setProperty(WebKeys.DOTCMS_STARTUP_TIME_ES, String.valueOf(System.currentTimeMillis() - start)); } }

Target:
private void initNode () { if ( _nodeInstance == null || _nodeInstance.isClosed()) { long start = System.currentTimeMillis(); synchronized (syncMe) { if ( _nodeInstance == null || _nodeInstance.isClosed()) { loadConfig(); shutDownNode(); String node_id = ConfigUtils.getServerId(); try{ _nodeInstance = new Node( Settings.builder(). put( "cluster.name", Config.getStringProperty("es.cluster.name")). put( "node.name", node_id ). put("path.home", Config.getStringProperty("es.path.home", "WEB-INF/elastic_search")). put("path.data", Config.getStringProperty(DATA_PATH)). put("path.repo", Config.getStringProperty(REPO_PATH)).build() ).start(); } catch (NodeValidationException e){ Logger.error(this, "Error validating ES node at start.", e); } try { Optional<UpdateSettingsRequest> settingsRequest = getReplicasSettings(); if(settingsRequest.isPresent()) { _nodeInstance.client().admin().indices().updateSettings( settingsRequest.get() ).actionGet(); } } catch ( IndexNotFoundException e ) { Logger.warn( ESClient.class, "Unable to set ES property auto_expand_replicas: [No indices found]" ); } catch ( Exception e ) { Logger.error( ESClient.class, "Unable to set ES property auto_expand_replicas.", e ); } try { Thread.sleep( 5000L ); } catch ( InterruptedException e ) { Logger.error( ESClient.class, "Error waiting for node to be available", e ); } } } System.setProperty(WebKeys.DOTCMS_STARTUP_TIME_ES, String.valueOf(System.currentTimeMillis() - start)); } }
Source:
public void getAllEntityTypeEndpointWithPaging() throws Exception { getClient().perform(get("/api/core/entitytypes").param("size", "5")) .andExpect(status().isOk()) .andExpect(jsonPath("$.page.size", is(5))) .andExpect(jsonPath("$.page.totalElements", is(7))) .andExpect(jsonPath("$.page.totalPages", is(2))) .andExpect(jsonPath("$._links.self.href", containsString("api/core/entitytypes"))) .andExpect(jsonPath("$._embedded.entitytypes", containsInAnyOrder( EntityTypeMatcher .matchEntityTypeEntry(entityTypeService.findByEntityType(context, "Publication")), EntityTypeMatcher.matchEntityTypeEntry(entityTypeService.findByEntityType(context, "Person")), EntityTypeMatcher.matchEntityTypeEntry(entityTypeService.findByEntityType(context, "Project")), EntityTypeMatcher.matchEntityTypeEntry(entityTypeService.findByEntityType(context, "OrgUnit")), EntityTypeMatcher.matchEntityTypeEntry(entityTypeService.findByEntityType(context, "Journal")) ))); }

Target:
public void getAllEntityTypeEndpointWithPaging() throws Exception { getClient().perform(get("/api/core/entitytypes").param("size", "5")) .andExpect(status().isOk()) .andExpect(jsonPath("$.page.size", is(5))) .andExpect(jsonPath("$.page.totalElements", is(7))) .andExpect(jsonPath("$.page.totalPages", is(2))) .andExpect(jsonPath("$._links.self.href", containsString("api/core/entitytypes"))) .andExpect(jsonPath("$._embedded.entitytypes", containsInAnyOrder( EntityTypeMatcher .matchEntityTypeEntry(entityTypeService.findByEntityType(context, "Publication")), EntityTypeMatcher.matchEntityTypeEntry(entityTypeService.findByEntityType(context, "Person")), EntityTypeMatcher.matchEntityTypeEntry(entityTypeService.findByEntityType(context, "Project")), EntityTypeMatcher.matchEntityTypeEntry(entityTypeService.findByEntityType(context, "OrgUnit")), EntityTypeMatcher.matchEntityTypeEntry(entityTypeService.findByEntityType(context, "Journal")) ))); getClient().perform(get("/api/core/entitytypes").param("size", "5").param("page", "1")) .andExpect(status().isOk()) .andExpect(jsonPath("$.page.size", is(5))) .andExpect(jsonPath("$.page.totalElements", is(7))) .andExpect(jsonPath("$.page.totalPages", is(2))) .andExpect(jsonPath("$.page.number", is(1))) .andExpect(jsonPath("$._links.self.href", containsString("api/core/entitytypes"))) .andExpect(jsonPath("$._embedded.entitytypes", containsInAnyOrder( EntityTypeMatcher .matchEntityTypeEntry(entityTypeService.findByEntityType(context, "JournalVolume")), EntityTypeMatcher .matchEntityTypeEntry(entityTypeService.findByEntityType(context, "JournalIssue")) ))); }
Source:
private Credentials initializeStsSession(String asgAccount) { AWSSecurityTokenService sts = new AWSSecurityTokenServiceClient(new InstanceProfileCredentialsProvider()); String region = DiscoveryManager.getInstance().getEurekaClientConfig() .getRegion(); if (!region.equals("us-east-1")) { sts.setEndpoint("sts." + region + ".amazonaws.com"); } String roleArn = "arn:aws:iam::" + asgAccount + ":role/ListAutoScalingGroups"; AssumeRoleResult assumeRoleResult = sts.assumeRole(new AssumeRoleRequest() .withRoleArn(roleArn) .withRoleSessionName("sts-session-" + asgAccount) ); return assumeRoleResult.getCredentials(); }

Target:
private Credentials initializeStsSession(String asgAccount) { AWSSecurityTokenService sts = new AWSSecurityTokenServiceClient(new InstanceProfileCredentialsProvider()); String region = DiscoveryManager.getInstance().getEurekaClientConfig() .getRegion(); if (!region.equals("us-east-1")) { sts.setEndpoint("sts." + region + ".amazonaws.com"); } String roleName = EurekaServerConfigurationManager.getInstance().getConfiguration(). getListAutoScalingGroupsRoleName(); String roleArn = "arn:aws:iam::" + asgAccount + ":role/" + roleName; AssumeRoleResult assumeRoleResult = sts.assumeRole(new AssumeRoleRequest() .withRoleArn(roleArn) .withRoleSessionName("sts-session-" + asgAccount) ); return assumeRoleResult.getCredentials(); }
Source:
public int run(CommandLine cl) throws AlluxioException, IOException { mCpCommand.run(cl); String[] args = cl.getArgs(); AlluxioURI srcPath = new AlluxioURI(args[0]); System.out.println("Deleting " + srcPath); mFileSystem.delete(srcPath, DeletePOptions.newBuilder().setUnchecked(true).setRecursive(true).build()); return 0; }

Target:
public int run(CommandLine cl) throws AlluxioException, IOException { try { mCpCommand.run(cl); } catch (AlluxioException | IOException e) { System.out.println("Copy operation portion of Move failed. If the error below is " + "intermittent, you can rerun this by deleting the destination first."); throw e; } String[] args = cl.getArgs(); AlluxioURI srcPath = new AlluxioURI(args[0]); System.out.println("Deleting " + srcPath); mFileSystem.delete(srcPath, DeletePOptions.newBuilder().setUnchecked(true).setRecursive(true).build()); return 0; }
Source:
void createHandle (int index) { state |= HANDLE | THEME_BACKGROUND; fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0); if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES); OS.gtk_widget_set_has_window (fixedHandle, true); handle = OS.gtk_toolbar_new (); if (handle == 0) error (SWT.ERROR_NO_HANDLES); OS.gtk_container_add (fixedHandle, handle); if ((style & SWT.FLAT) != 0) { byte swt_toolbar_flat = Converter.wcsToMbcs (null, "swt-toolbar-flat", true); OS.gtk_widget_set_name (handle, swt_toolbar_flat); } if (OS.GTK_VERSION >= OS.VERSION (3, 10, 0)) { long context = OS.gtk_widget_get_style_context (handle); String css ="GtkToolbar {\n"+ "padding-top: 0;\n"+ "padding-bottom: 0;\n"+ "}\n"; if (provider == 0) { provider = OS.gtk_css_provider_new (); OS.gtk_style_context_add_provider (context, provider, OS.GTK_STYLE_PROVIDER_PRIORITY_APPLICATION); OS.g_object_unref (provider); OS.gtk_css_provider_load_from_data (provider, Converter.wcsToMbcs (null, css, true), -1, null); OS.gtk_style_context_invalidate (context); } } OS.gtk_toolbar_set_icon_size (handle, OS.GTK3 ? OS.GTK_ICON_SIZE_SMALL_TOOLBAR : OS.GTK_ICON_SIZE_LARGE_TOOLBAR); if (OS.GTK3) { setFontDescription(defaultFont().handle); } }

Target:
void createHandle (int index) { state |= HANDLE | THEME_BACKGROUND; fixedHandle = OS.g_object_new (display.gtk_fixed_get_type (), 0); if (fixedHandle == 0) error (SWT.ERROR_NO_HANDLES); OS.gtk_widget_set_has_window (fixedHandle, true); handle = OS.gtk_toolbar_new (); if (handle == 0) error (SWT.ERROR_NO_HANDLES); OS.gtk_container_add (fixedHandle, handle); if ((style & SWT.FLAT) != 0) { byte swt_toolbar_flat = Converter.wcsToMbcs (null, "swt-toolbar-flat", true); OS.gtk_widget_set_name (handle, swt_toolbar_flat); } if (OS.GTK3) { long context = OS.gtk_widget_get_style_context (handle); if (OS.GTK_VERSION >= OS.VERSION (3, 10, 0)) { String css ="GtkToolbar {\n"+ "padding-top: 0;\n"+ "padding-bottom: 0;\n"+ "}\n"; gtk_css_provider_load_from_css(context, css); } OS.gtk_style_context_invalidate (context); } OS.gtk_toolbar_set_icon_size (handle, OS.GTK3 ? OS.GTK_ICON_SIZE_SMALL_TOOLBAR : OS.GTK_ICON_SIZE_LARGE_TOOLBAR); if (OS.GTK3) { setFontDescription(defaultFont().handle); } }
Source:
public static <T> GenericIndexed<T> read(ByteBuffer buffer, ObjectStrategy<T> strategy, SmooshedFileMapper fileMapper) { byte versionFromBuffer = buffer.get(); if (VERSION_ONE == versionFromBuffer) { return createVersionOneGenericIndexed(buffer, strategy); } else { if (VERSION_TWO == versionFromBuffer) { if (fileMapper == null) { throw new IAE("SmooshedFileMapper can not be null for version 2."); } boolean allowReverseLookup = buffer.get() == 0x1; int logBaseTwoOfElementsPerValueFile = buffer.getInt(); int numWritten = buffer.getInt(); String columnName; List<ByteBuffer> valueBuffersToUse; ByteBuffer headerBuffer; try { columnName = new SerializerUtils().readString(buffer); valueBuffersToUse = Lists.newArrayList(); for (int i = 0; i <= numWritten / (1 << logBaseTwoOfElementsPerValueFile); i++) { valueBuffersToUse.add(fileMapper.mapFile(GenericIndexedWriter.generateValueFileName(columnName, i)) .asReadOnlyBuffer()); } headerBuffer = fileMapper.mapFile(GenericIndexedWriter.generateHeaderFileName(columnName)); } catch (IOException e) { throw new RuntimeException("File mapping failed.", e); } return new GenericIndexed<T>( valueBuffersToUse, headerBuffer, strategy, allowReverseLookup, 1 << logBaseTwoOfElementsPerValueFile, numWritten ); } } throw new IAE("Unknown version [%s]", versionFromBuffer); }

Target:
public static <T> GenericIndexed<T> read(ByteBuffer buffer, ObjectStrategy<T> strategy, SmooshedFileMapper fileMapper) { byte versionFromBuffer = buffer.get(); if (VERSION_ONE == versionFromBuffer) { return createVersionOneGenericIndexed(buffer, strategy); } else if (VERSION_TWO == versionFromBuffer) { return createVersionTwoGenericIndexed(buffer, strategy, fileMapper); } throw new IAE("Unknown version [%s]", versionFromBuffer); }
Source:
private void loadIdTitleMap() { if (pageIdTitleMapping == null) { try { File mappingFile = getFile(FileType.Mapping); logger.info("Reading mapping file: " + mappingFile.getAbsolutePath()); pageIdTitleMapping = new HashMap<>(); BufferedReader bf = new BufferedReader(new FileReader(mappingFile)); String line; while ((line = bf.readLine()) != null) { if (line.length() == 0) continue; String[] tokens = line.split("\t"); if (tokens.length != 2) continue; Integer id = Integer.parseInt(tokens[0].trim()); if (pageIdTitleMapping.containsKey(id) == false) { pageIdTitleMapping.put(id, tokens[1]); } } bf.close(); logger.info("Done."); } catch (Exception e) { e.printStackTrace(); logger.error("IO Error while reading the name-mapping file ... exiting"); } } }

Target:
private void loadIdTitleMap() { if (pageIdTitleMapping == null) { File mappingFile = null; try { mappingFile = getFile(FileType.Mapping); } catch (DatastoreException e) { e.printStackTrace(); logger.error("Error obtaining Name-mapping file from Datastore"); throw new RuntimeException("Error obtaining Name-mapping file from Datastore"); } try(BufferedReader bf = new BufferedReader(new FileReader(mappingFile))) { logger.info("Reading mapping file: " + mappingFile.getAbsolutePath()); pageIdTitleMapping = new HashMap<>(); String line; while ((line = bf.readLine()) != null) { if (line.length() == 0) continue; String[] tokens = line.split("\t"); if (tokens.length != 2) continue; Integer id = Integer.parseInt(tokens[0].trim()); if (!pageIdTitleMapping.containsKey(id)) { pageIdTitleMapping.put(id, tokens[1]); } } logger.info("Done."); } catch (FileNotFoundException e) { e.printStackTrace(); logger.error("Name-mapping file not found"); throw new RuntimeException("Name-mapping file not found"); } catch (IOException e) { e.printStackTrace(); logger.error("IO Error while reading the name-mapping file"); throw new RuntimeException("IO Error while reading the name-mapping file"); } } }
Source:
public Collection<ListWorkflowExecutorResponse> listWorkflowExecutors() { return workflowExecutors.getWorkflowExecutors().stream() .map(executor -> this.converter.convert(executor)) .collect(Collectors.toList()); }

Target:
public Collection<ListWorkflowExecutorResponse> listWorkflowExecutors() { return workflowExecutors.getWorkflowExecutors().stream().map(executor -> converter.convert(executor)).collect(toList()); }
Source:
private void setInitialGestureValues() { if (getAudioReactor() != null) { final float currentVolumeNormalized = (float) getAudioReactor().getVolume() / getAudioReactor().getMaxVolume(); volumeProgressBar.setProgress((int) (volumeProgressBar.getMax() * currentVolumeNormalized)); } final float screenBrightness = getWindow().getAttributes().screenBrightness; brightnessProgressBar.setProgress((int) (brightnessProgressBar.getMax() * screenBrightness)); if (DEBUG) Log.d(TAG, "setInitialGestureValues: volumeProgressBar.getProgress() [" + volumeProgressBar.getProgress() + "] " + "brightnessProgressBar.getProgress() [" + brightnessProgressBar.getProgress() + "]"); }

Target:
private void setInitialGestureValues() { if (getAudioReactor() != null) { final float currentVolumeNormalized = (float) getAudioReactor().getVolume() / getAudioReactor().getMaxVolume(); volumeProgressBar.setProgress((int) (volumeProgressBar.getMax() * currentVolumeNormalized)); } float screenBrightness = getWindow().getAttributes().screenBrightness; if (screenBrightness < 0) screenBrightness = Settings.System.getInt(getContentResolver(), Settings.System.SCREEN_BRIGHTNESS, 0) / 255.0f; brightnessProgressBar.setProgress((int) (brightnessProgressBar.getMax() * screenBrightness)); if (DEBUG) Log.d(TAG, "setInitialGestureValues: volumeProgressBar.getProgress() [" + volumeProgressBar.getProgress() + "] " + "brightnessProgressBar.getProgress() [" + brightnessProgressBar.getProgress() + "]"); }
Source:
public static User map(DbUser entity, User template) { User model = template != null ? template : new User(); model.setName(entity.getname()); model.setUserName(entity.getusername()); model.setId(entity.getuser_id().toString()); model.setLastName(entity.getsurname()); model.setEmail(entity.getemail()); model.setDepartment(entity.getdepartment()); if (entity.getgroups() != null) { if (entity.getgroups().trim().length() > 0) { model.setGroups(new Groups()); for (String name : entity.getgroups().split(",")) { Group group = new Group(); group.setName(name); model.getGroups().getGroups().add(group); } } } if(!StringHelper.isNullOrEmpty(entity.getdomain())){ Domain dom = new Domain(); dom.setName(entity.getdomain()); dom.setId(new NGuid(entity.getdomain().getBytes(), true).toString()); model.setDomain(dom); } return model; }

Target:
public static User map(DbUser entity, User template) { User model = template != null ? template : new User(); model.setName(entity.getname()); model.setUserName(entity.getusername()); model.setId(entity.getuser_id().toString()); model.setLastName(entity.getsurname()); model.setEmail(entity.getemail()); model.setDepartment(entity.getdepartment()); if (entity.getgroups() != null && entity.getgroups().trim().length() > 0) { model.setGroups(new Groups()); for (String name : entity.getgroups().split(",")) { Group group = new Group(); group.setName(name); model.getGroups().getGroups().add(group); } } if(!StringHelper.isNullOrEmpty(entity.getdomain())){ Domain dom = new Domain(); dom.setName(entity.getdomain()); dom.setId(new NGuid(entity.getdomain().getBytes(), true).toString()); model.setDomain(dom); } return model; }
Source:
public Object invoke(MethodInvocation invocation) throws Throwable { String spanName = getSpanName(invocation); try (Scope scope = tracer.buildSpan(spanName).asChildOf(tracer.activeSpan()).startActive(true)) { Traced.TagsStack.push(); try { return invocation.proceed(); } finally { for (Map.Entry<String, Supplier<?>> e : Traced.TagsStack.pop().entrySet()) { Object val; try { val = e.getValue().get(); } catch (Exception ex) { if (LOG.isDebugEnabled()) { LOG.debug( "Could not get the value for a tag called " + e.getKey() + " when tracing " + spanName + ".", ex); } continue; } if (val instanceof String) { scope.span().setTag(e.getKey(), (String) val); } else if (val instanceof Boolean) { scope.span().setTag(e.getKey(), (Boolean) val); } else if (val instanceof Number) { scope.span().setTag(e.getKey(), (Number) val); } } } } }

Target:
public Object invoke(MethodInvocation invocation) throws Throwable { String spanName = getSpanName(invocation); try (Scope scope = tracer.buildSpan(spanName).asChildOf(tracer.activeSpan()).startActive(true)) { Traced.TagsStack.push(); try { return invocation.proceed(); } finally { for (Map.Entry<String, Supplier<?>> e : Traced.TagsStack.pop().entrySet()) { Object val; try { val = e.getValue().get(); } catch (Exception ex) { if (LOG.isDebugEnabled()) { LOG.debug( "Could not get the value for a tag called when tracing {}.", e.getKey(), spanName, ex); } continue; } if (val instanceof String) { scope.span().setTag(e.getKey(), (String) val); } else if (val instanceof Boolean) { scope.span().setTag(e.getKey(), (Boolean) val); } else if (val instanceof Number) { scope.span().setTag(e.getKey(), (Number) val); } } } } }
Source:
private void setupSSLVerify(Repository repo) throws java.io.IOException { StoredConfig config = repo.getConfig(); if (sslVerify) { config.setBoolean("http", null, "sslVerify", true); config.save(); } else { config.setBoolean("http", null, "sslVerify", false); config.save(); } }

Target:
private void setupSSLVerify(Repository repo) throws java.io.IOException { StoredConfig config = repo.getConfig(); config.setBoolean("http", null, "sslVerify", sslVerify); config.save(); }
Source:
public void updateMessage() throws Exception { assertThat(modifier.createEdit(change, getCurrentPatchSet(changeId))) .isEqualTo(RefUpdate.Result.NEW); Optional<ChangeEdit> edit = editUtil.byChange(change); try { modifier.modifyMessage( edit.get(), edit.get().getEditCommit().getFullMessage()); fail("UnchangedCommitMessage expected"); } catch (UnchangedCommitMessageException ex) { assertThat(ex.getMessage()).isEqualTo( "New commit message cannot be same as existing commit message"); } String msg = String.format("New commit message\n\nChange-Id: %s", change.getKey()); assertThat(modifier.modifyMessage(edit.get(), msg)).isEqualTo( RefUpdate.Result.FORCED); edit = editUtil.byChange(change); assertThat(edit.get().getEditCommit().getFullMessage()).isEqualTo(msg); editUtil.publish(edit.get()); assertThat(editUtil.byChange(change).isPresent()).isFalse(); ChangeInfo info = get(changeId, ListChangesOption.CURRENT_COMMIT, ListChangesOption.CURRENT_REVISION); assertThat(info.revisions.get(info.currentRevision).commit.message) .isEqualTo(msg); }

Target:
public void updateMessage() throws Exception { assertThat(modifier.createEdit(change, getCurrentPatchSet(changeId))) .isEqualTo(RefUpdate.Result.NEW); Optional<ChangeEdit> edit = editUtil.byChange(change); try { modifier.modifyMessage( edit.get(), edit.get().getEditCommit().getFullMessage()); fail("UnchangedCommitMessageException expected"); } catch (UnchangedCommitMessageException ex) { assertThat(ex.getMessage()).isEqualTo( "New commit message cannot be same as existing commit message"); } String msg = String.format("New commit message\n\nChange-Id: %s", change.getKey()); assertThat(modifier.modifyMessage(edit.get(), msg)).isEqualTo( RefUpdate.Result.FORCED); edit = editUtil.byChange(change); assertThat(edit.get().getEditCommit().getFullMessage()).isEqualTo(msg); editUtil.publish(edit.get()); assertThat(editUtil.byChange(change).isPresent()).isFalse(); ChangeInfo info = get(changeId, ListChangesOption.CURRENT_COMMIT, ListChangesOption.CURRENT_REVISION); assertThat(info.revisions.get(info.currentRevision).commit.message) .isEqualTo(msg); }
Source:
void pingScheduling(int pingInterval){ executor = Executors.newScheduledThreadPool(1); executor.scheduleAtFixedRate(new SendPing(),pingInterval, pingInterval, TimeUnit.MILLISECONDS); }

Target:
void pingScheduling(int pingInterval) { pingTimer = new Timer("pingTimer"); pingTimer.scheduleAtFixedRate(new SendPing(), pingInterval, pingInterval); }
Source:
private DelayDays(String value) { this.value = value; }

Target:
DelayDays(String value) { this.value = value; }
Source:
public void initialize() throws Exception { if (dataSource == null) { logger.warn("No datasource was provided...using a Map based JobRepository"); if (this.transactionManager == null) { this.transactionManager = new ResourcelessTransactionManager(); } MapJobRepositoryFactoryBean jobRepositoryFactory = new MapJobRepositoryFactoryBean(this.transactionManager); jobRepositoryFactory.afterPropertiesSet(); this.jobRepository = jobRepositoryFactory.getObject(); MapJobExplorerFactoryBean jobExplorerFactory = new MapJobExplorerFactoryBean(jobRepositoryFactory); jobExplorerFactory.afterPropertiesSet(); this.jobExplorer = jobExplorerFactory.getObject(); } else { this.jobRepository = createJobRepository(); JobExplorerFactoryBean jobExplorerFactoryBean = new JobExplorerFactoryBean(); jobExplorerFactoryBean.setDataSource(this.dataSource); jobExplorerFactoryBean.afterPropertiesSet(); this.jobExplorer = jobExplorerFactoryBean.getObject(); } this.jobLauncher = createJobLauncher(); }

Target:
public void initialize() { Assert.notNull(dataSource, "No dataSource was provided for Batch runtime configuration"); try { this.jobRepository = createJobRepository(); this.jobExplorer = createJobExplorer(); this.jobLauncher = createJobLauncher(); } catch (Exception ex) { throw new IllegalStateException("Unable to initialize Spring Batch", ex); } }
Source:
public void abort(final ServerSideMultipartUpload upload) throws IOException { Validate.notNull(upload, "Upload state object must not be null"); final String postPath = upload.getPartsDirectory() + SEPARATOR + "abort"; final HttpPost post = httpHelper.getRequestFactory().post(postPath); final int expectedStatusCode = HttpStatus.SC_NO_CONTENT; try (CloseableHttpResponse response = httpHelper.getConnectionContext().getHttpClient().execute(post)) { StatusLine statusLine = response.getStatusLine(); validateStatusCode(expectedStatusCode, statusLine.getStatusCode(), "Unable to abort multipart upload", post, response, null, null); LOGGER.info("Aborted multipart upload [id={}]", upload.getId()); } }

Target:
public void abort(final ServerSideMultipartUpload upload) throws IOException { Validate.notNull(upload, "Upload state object must not be null"); final String postPath = upload.getPartsDirectory() + SEPARATOR + "abort"; final HttpPost post = httpHelper.getRequestFactory().post(postPath); final int expectedStatusCode = HttpStatus.SC_NO_CONTENT; final CloseableHttpClient httpClient = httpHelper.getConnectionContext().getHttpClient(); try (CloseableHttpResponse response = httpClient.execute(post)) { StatusLine statusLine = response.getStatusLine(); validateStatusCode(expectedStatusCode, statusLine.getStatusCode(), "Unable to abort multipart upload", post, response, null, null); LOGGER.info("Aborted multipart upload [id={}]", upload.getId()); } }
Source:
public void stopTask(boolean forceFinish) { if (getState() != AsyncTaskState.AttemptingEndAction && getState() != AsyncTaskState.Cleared && getState() != AsyncTaskState.ClearFailed && !getLastTaskStatus().getTaskIsInUnusualState()) { try { log.infoFormat( "SPMAsyncTask::StopTask: Attempting to stop task '{0}' (Parent Command {1}, Parameters Type {2}).", getTaskID(), (getParameters().getDbAsyncTask().getaction_type()), getParameters().getClass().getName()); taskHelper.RunVdsCommand(VDSCommandType.SPMStopTask, new SPMTaskGuidBaseVDSCommandParameters(getStoragePoolID(), getTaskID())); } catch (RuntimeException e) { log.error( String.format("SPMAsyncTask::StopTask: Stopping task '%1$s' threw an exception.", getTaskID()), e); } finally { if (forceFinish) { setState(AsyncTaskState.Ended); setLastTaskStatus(new AsyncTaskStatus(AsyncTaskStatusEnum.finished)); } else { setState(AsyncTaskState.Polling); } } } }

Target:
public void stopTask(boolean forceFinish) { if (getState() != AsyncTaskState.AttemptingEndAction && getState() != AsyncTaskState.Cleared && getState() != AsyncTaskState.ClearFailed && !getLastTaskStatus().getTaskIsInUnusualState()) { try { log.infoFormat( "SPMAsyncTask::StopTask: Attempting to stop task '{0}' (Parent Command {1}, Parameters Type {2}).", getTaskID(), (getParameters().getDbAsyncTask().getaction_type()), getParameters().getClass().getName()); taskHelper.stopTask(getStoragePoolID(), getTaskID()); } catch (RuntimeException e) { log.error( String.format("SPMAsyncTask::StopTask: Stopping task '%1$s' threw an exception.", getTaskID()), e); } finally { if (forceFinish) { setState(AsyncTaskState.Ended); setLastTaskStatus(new AsyncTaskStatus(AsyncTaskStatusEnum.finished)); } else { setState(AsyncTaskState.Polling); } } } }
Source:
public InputVDir getInputVDir(@Nonnull VPath path) throws NotFileOrDirectoryException, NoSuchFileException { Iterator<String> iterator = path.split().iterator(); String firstElement = iterator.next(); InputVElement ive = subs.get(firstElement); String pathAsString = path.getPathAsString(IN_ZIP_SEPARATOR); if (ive == null) { throw new NotFileOrDirectoryException(new DirectoryLocation(pathAsString)); } if (iterator.hasNext()) { if (ive instanceof InputVDir) { ive = ((InputVDir) ive).getInputVDir(new VPath( pathAsString.substring(pathAsString.indexOf(IN_ZIP_SEPARATOR) + 1), IN_ZIP_SEPARATOR)); } } if (!(ive instanceof InputVDir)) { throw new NotFileOrDirectoryException(new DirectoryLocation(pathAsString)); } return (InputVDir) ive; }

Target:
public InputVDir getInputVDir(@Nonnull VPath path) throws NotFileOrDirectoryException, NoSuchFileException { Iterator<String> iterator = path.split().iterator(); String firstElement = iterator.next(); InputVElement ive = subs.get(firstElement); String pathAsString = path.getPathAsString(IN_ZIP_SEPARATOR); if (ive == null) { throw new NoSuchFileException(new DirectoryLocation(pathAsString)); } if (iterator.hasNext()) { if (ive instanceof InputVDir) { ive = ((InputVDir) ive).getInputVDir(new VPath( pathAsString.substring(pathAsString.indexOf(IN_ZIP_SEPARATOR) + 1), IN_ZIP_SEPARATOR)); } } if (!ive.isVDir()) { throw new NotFileOrDirectoryException(new DirectoryLocation(pathAsString)); } return (InputVDir) ive; }
Source:
public HAProxyMessage retain(int increment) { return (HAProxyMessage) super.retain(increment); }

Target:
public HAProxyMessage retain(int increment) { tryRecord(); return (HAProxyMessage) super.retain(increment); }
Source:
private static void setJobName(JobConf jobConf, List<DataSegment> segments) { if (segments.size() == 1) { final DataSegment segment = segments.get(0); jobConf.setJobName( String.format( "druid-convert-%s-%s-%s", segment.getDataSource(), segment.getInterval(), segment.getVersion() ) ); } else { final Set<String> segmentNames = Sets.newHashSet( Iterables.transform( segments, new Function<DataSegment, String>() { @Override public String apply(DataSegment input) { return input.getDataSource(); } } ) ); final Set<String> versions = Sets.newHashSet( Iterables.transform( segments, new Function<DataSegment, String>() { @Override public String apply(DataSegment input) { return input.getVersion(); } } ) ); jobConf.setJobName( String.format( "druid-convert-%s-%s", Arrays.toString(segmentNames.toArray()), Arrays.toString(versions.toArray()) ) ); } }

Target:
private static void setJobName(JobConf jobConf, List<DataSegment> segments) { if (segments.size() == 1) { final DataSegment segment = segments.get(0); jobConf.setJobName( String.format( "druid-convert-%s-%s-%s", segment.getDataSource(), segment.getInterval(), segment.getVersion() ) ); } else { final Set<String> dataSources = Sets.newHashSet( Iterables.transform( segments, new Function<DataSegment, String>() { @Override public String apply(DataSegment input) { return input.getDataSource(); } } ) ); final Set<String> versions = Sets.newHashSet( Iterables.transform( segments, new Function<DataSegment, String>() { @Override public String apply(DataSegment input) { return input.getVersion(); } } ) ); jobConf.setJobName( String.format( "druid-convert-%s-%s", Arrays.toString(dataSources.toArray()), Arrays.toString(versions.toArray()) ) ); } }
Source:
private static Set<Integer> getParametersBoundByParentPlan(Map<PVariable, Integer> variableMappings, SubPlan subPlan) { if (!subPlan.getParentPlans().isEmpty()) { SubPlan parentPlan = subPlan.getParentPlans().get(0); Set<PConstraint> enforcedConstraints = parentPlan.getAllEnforcedConstraints(); Set<PVariable> affectedVariables = getAffectedVariables(enforcedConstraints); return getVariableIndices(variableMappings, affectedVariables); } return Sets.newHashSet(); }

Target:
private static Set<Integer> getParametersBoundByParentPlan(Map<PVariable, Integer> variableMappings, SubPlan subPlan) { if (!subPlan.getParentPlans().isEmpty()) { SubPlan parentPlan = subPlan.getParentPlans().get(0); Set<PConstraint> enforcedConstraints = parentPlan.getAllEnforcedConstraints(); Set<PVariable> affectedVariables = getAffectedVariables(enforcedConstraints); return getVariableIndices(variableMappings, affectedVariables); } return Collections.emptySet(); }
Source:
public Job recoverReadJob(final UUID jobId) throws SignatureException, IOException, XmlProcessingException, JobRecoveryException { ModifyJobResponse jobResponse = this.client.modifyJob(new ModifyJobRequest(jobId)); if (RequestType.GET != jobResponse.getMasterObjectList().getRequestType()){ throw new JobRecoveryException("GET", jobResponse.getMasterObjectList().getRequestType().toString() ); } return new ReadJobImpl(this.client, jobResponse.getMasterObjectList()); }

Target:
public Ds3ClientHelpers.Job recoverReadJob(final UUID jobId) throws SignatureException, IOException, XmlProcessingException, JobRecoveryException { final ModifyJobResponse jobResponse = this.client.modifyJob(new ModifyJobRequest(jobId)); if (RequestType.GET != jobResponse.getMasterObjectList().getRequestType()){ throw new JobRecoveryException(RequestType.GET.toString(), jobResponse.getMasterObjectList().getRequestType().toString() ); } return new ReadJobImpl(this.client, jobResponse.getMasterObjectList()); }
Source:
public List<Integer> readIntegers() { return read(Integer.class, this::readInteger); }

Target:
public List<BigInteger> readIntegers() { return readStrings().stream() .map(this::parseInteger) .collect(toList()); }