auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public MultivarGaussian(List params) { if (params.size() == 0) { expectMeanAsArg = true; expectCovarianceAsArg = true; return; } Object ob = params.get(0); int dims = 0; if (ob instanceof MatrixSpec) { dims = ((MatrixLib) ((MatrixSpec) ob).getValueIfNonRandom()).numRows(); } else { dims = ((MatrixLib) ob).numRows(); } setDimension(dims); if (params.size() == 1) { expectMeanAsArg = false; expectCovarianceAsArg = true; initParams(params); expectMeanAsArg = true; expectCovarianceAsArg = false; } else if (params.size() == 2) { expectMeanAsArg = true; expectCovarianceAsArg = true; initParams(params); expectMeanAsArg = false; expectCovarianceAsArg = false; } else { throw new IllegalArgumentException( "MultivarGaussian CPD expects at most 2 parameters, not " + params.size()); } }

Target:
public MultivarGaussian(List params) { if (params.size() == 0) { expectMeanAsArg = true; expectCovarianceAsArg = true; return; } if (params.size() == 1) { expectMeanAsArg = false; expectCovarianceAsArg = true; initParams(params); expectMeanAsArg = true; expectCovarianceAsArg = false; } else if (params.size() == 2) { expectMeanAsArg = true; expectCovarianceAsArg = true; initParams(params); expectMeanAsArg = false; expectCovarianceAsArg = false; } else { throw new IllegalArgumentException( "MultivarGaussian CPD expects at most 2 parameters, not " + params.size()); } }
Source:
private Priority getPriority(final String issueLevel) { Priority priority; if (issueLevel.contains("CriticalError")) { priority = Priority.HIGH; } else if (issueLevel.contains("Error")) { priority = Priority.HIGH; } else if (issueLevel.contains("CriticalWarning")) { priority = Priority.HIGH; } else if (issueLevel.contains("Warning")) { priority = Priority.NORMAL; } else { priority = Priority.LOW; } return priority; }

Target:
private Priority getPriority(final String issueLevel) { if (issueLevel == null || StringUtils.isEmpty(issueLevel)) { return Priority.HIGH; } if (issueLevel.contains("CriticalError")) { return Priority.HIGH; } else if (issueLevel.contains("Error")) { return Priority.HIGH; } else if (issueLevel.contains("CriticalWarning")) { return Priority.HIGH; } else if (issueLevel.contains("Warning")) { return Priority.NORMAL; } else { return Priority.LOW; } }
Source:
public Integer getEstimatedMaxPartitionCount() { return _estimatedMaxPartitionCount; }

Target:
public int getEstimatedMaxPartitionCount() { return _estimatedMaxPartitionCount; }
Source:
public void configurePipeline(PipelineConfigurer pipelineConfigurer) { }

Target:
public void configurePipeline(PipelineConfigurer pipelineConfigurer) { if (config.fileRegex != null) { try { Pattern.compile(config.fileRegex); } catch (Exception e) { throw new IllegalArgumentException(String.format("File regex %s is invalid: %s", config.fileRegex, e.getMessage()), e); } } }
Source:
private Optional<? extends Image> findImage(Integer id) { final String imageId = String.valueOf(id); Optional<? extends Image> image = Optional.fromNullable(images.get().get(imageId)); if (!image.isPresent()) { image = tryFind(images.get().values(), new Predicate<Image>() { @Override public boolean apply(Image input) { return input.getProviderId().equals(imageId); } }); } return image; }

Target:
protected Optional<? extends Image> findImage(Integer id) { final String imageId = String.valueOf(id); Optional<? extends Image> image = Optional.fromNullable(images.get().get(imageId)); if (!image.isPresent()) { image = tryFind(images.get().values(), new Predicate<Image>() { @Override public boolean apply(Image input) { return input.getProviderId().equals(imageId); } }); } return image; }
Source:
public String getAnalysisUuid() { return analysisUuid; }

Target:
public Optional<String> getAnalysisUuid() { return ofNullable(analysisUuid); }
Source:
public void patchMetadataByAdmin() throws Exception { context.turnOffAuthorisationSystem(); EPerson ePerson = EPersonBuilder.createEPerson(context) .withNameInMetadata("John", "Doe") .withEmail("Johndoe@fake-email.com") .build(); String newName = "JohnReplace"; List<Operation> ops = new ArrayList<Operation>(); ReplaceOperation replaceOperation = new ReplaceOperation("/metadata/eperson.firstname", newName); ops.add(replaceOperation); String patchBody = getPatchContent(ops); String token = getAuthToken(admin.getEmail(), password); getClient(token).perform(patch("/api/eperson/epersons/" + ePerson.getID()) .content(patchBody) .contentType(MediaType.APPLICATION_JSON_PATCH_JSON)) .andExpect(status().isOk()) .andExpect(jsonPath("$.metadata", Matchers.allOf( MetadataMatcher.matchMetadata("eperson.firstname", newName)))); }

Target:
public void patchMetadataByAdmin() throws Exception { context.turnOffAuthorisationSystem(); EPerson ePerson = EPersonBuilder.createEPerson(context) .withNameInMetadata("John", "Doe") .withEmail("Johndoe@example.com") .build(); String newName = "JohnReplace"; context.restoreAuthSystemState(); List<Operation> ops = new ArrayList<Operation>(); ReplaceOperation replaceOperation = new ReplaceOperation("/metadata/eperson.firstname", newName); ops.add(replaceOperation); String patchBody = getPatchContent(ops); String token = getAuthToken(admin.getEmail(), password); getClient(token).perform(patch("/api/eperson/epersons/" + ePerson.getID()) .content(patchBody) .contentType(MediaType.APPLICATION_JSON_PATCH_JSON)) .andExpect(status().isOk()) .andExpect(jsonPath("$.metadata", Matchers.allOf( MetadataMatcher.matchMetadata("eperson.firstname", newName)))); getClient(token).perform(get("/api/eperson/epersons/" + ePerson.getID())) .andExpect(status().isOk()) .andExpect(jsonPath("$", hasJsonPath("$.metadata", allOf( matchMetadata("eperson.firstname", newName))))); }
Source:
public void sourceLikeCram( final String resourceName, final boolean isFile, final boolean expected) throws IOException { SeekableStream strm = isFile ? new SeekableFileStream(new File(TEST_DATA_DIR, resourceName)) : SeekableStreamFactory.getInstance().getStreamFor(new URL(resourceName)); Assert.assertEquals(expected, SamStreams.sourceLikeCram(strm)); }

Target:
public void sourceLikeCram( final String resourceName, final boolean isFile, final boolean expected) throws IOException { SeekableStream strm = isFile ? new SeekableFileStream(new File(TEST_DATA_DIR, resourceName)) : SeekableStreamFactory.getInstance().getStreamFor(new URL(resourceName)); Assert.assertEquals(SamStreams.sourceLikeCram(strm), expected); }
Source:
public void onBlockDispense(BlockDispenseEvent event) { ConfigurationManager cfg = plugin.getGlobalStateManager(); WorldConfiguration wcfg = cfg.get(event.getBlock().getWorld()); if (wcfg.blockPotions.size() > 0) { ItemStack item = event.getItem(); if (item.getType() == Material.POTION && !BukkitUtil.isWaterPotion(item)) { Potion potion = Potion.fromDamage(BukkitUtil.getPotionEffectBits(item)); for (PotionEffect effect : potion.getEffects()) { if (potion.isSplash() && wcfg.blockPotions.contains(effect.getType())) { event.setCancelled(true); return; } } } } if (wcfg.disableArrowShooting && event.getItem().getTypeId() == ItemID.ARROW) event.setCancelled(true); }

Target:
public void onBlockDispense(BlockDispenseEvent event) { ConfigurationManager cfg = plugin.getGlobalStateManager(); WorldConfiguration wcfg = cfg.get(event.getBlock().getWorld()); if (wcfg.blockPotions.size() > 0) { ItemStack item = event.getItem(); if (item.getType() == Material.POTION && !BukkitUtil.isWaterPotion(item)) { Potion potion = Potion.fromDamage(BukkitUtil.getPotionEffectBits(item)); for (PotionEffect effect : potion.getEffects()) { if (potion.isSplash() && wcfg.blockPotions.contains(effect.getType())) { event.setCancelled(true); return; } } } } if (wcfg.disableArrowShooting && event.getItem().getTypeId() == ItemID.ARROW) { event.setCancelled(true); return; } }
Source:
public void setUp() throws Exception { new File("src/test/resources/api/mappings").mkdirs(); new File("src/test/resources/api/__files").mkdirs(); new File("src/test/resources/raw/mappings").mkdirs(); new File("src/test/resources/raw/__files").mkdirs(); githubApi.enableRecordMappings(new SingleRootFileSource("src/test/resources/api/mappings"), new SingleRootFileSource("src/test/resources/api/__files")); githubRaw.enableRecordMappings(new SingleRootFileSource("src/test/resources/raw/mappings"), new SingleRootFileSource("src/test/resources/raw/__files")); githubApi.stubFor( get(urlMatching(".*")).atPriority(10).willReturn(aResponse().proxiedFrom("<LINK_0>"))); githubRaw.stubFor(get(urlMatching(".*")).atPriority(10) .willReturn(aResponse().proxiedFrom("<LINK_1>"))); github = Connector.connect("http://localhost:" + githubApi.port(), null); resetAllScenarios(); handler = new RingBufferLogHandler(100); final Logger logger = Logger.getLogger(getClass().getName()); logger.addHandler(handler); listener = new LogTaskListener(logger, Level.INFO); }

Target:
public void setUp() throws Exception { new File("src/test/resources/api/mappings").mkdirs(); new File("src/test/resources/api/__files").mkdirs(); new File("src/test/resources/raw/mappings").mkdirs(); new File("src/test/resources/raw/__files").mkdirs(); githubApi.enableRecordMappings(new SingleRootFileSource("src/test/resources/api/mappings"), new SingleRootFileSource("src/test/resources/api/__files")); githubRaw.enableRecordMappings(new SingleRootFileSource("src/test/resources/raw/mappings"), new SingleRootFileSource("src/test/resources/raw/__files")); githubApi.stubFor( get(urlMatching(".*")).atPriority(10).willReturn(aResponse().proxiedFrom("<LINK_0>"))); githubRaw.stubFor(get(urlMatching(".*")).atPriority(10) .willReturn(aResponse().proxiedFrom("<LINK_1>"))); github = Connector.connect("http://localhost:" + githubApi.port(), null); resetAllScenarios(); handler = new RingBufferLogHandler(1000); final Logger logger = Logger.getLogger(getClass().getName()); logger.addHandler(handler); listener = new LogTaskListener(logger, Level.INFO); ApiRateLimitChecker.setEntropy(entropy); ApiRateLimitChecker.setExpirationWaitMillis(20); ApiRateLimitChecker. setNotificationWaitMillis(60); }
Source:
public Void visitSetPath(SetPath node, Integer indent) { builder.append("SET PATH "); builder.append(node.getPath().stream().map(element -> format(element.toString())).collect(joining(", "))); return null; }

Target:
public Void visitSetPath(SetPath node, Integer indent) { builder.append("SET PATH "); builder.append(Joiner.on(", ").join(node.getPathSpecification().getPath())); return null; }
Source:
public void handleEvent(Event event) { EventContext ctx = event.getContext(); if (ctx instanceof DocumentEventContext) { DocumentEventContext docCtx = (DocumentEventContext) ctx; CoreSession session = docCtx.getCoreSession(); DocumentModel doc = docCtx.getSourceDocument(); if (doc == null) { return; } DocumentRef versionRef = (DocumentRef) ctx.getProperty("checkedInVersionRef"); if (session.hasChild(versionRef, COMMENTS_DIRECTORY)) { DocumentModel comments = session.getChild(versionRef, COMMENTS_DIRECTORY); updateCommentProperties(session, comments.getId(), versionRef.reference().toString()); } } }

Target:
protected void handleEvent(Event event) { EventContext ctx = event.getContext(); CoreSession session = ctx.getCoreSession(); DocumentRef versionRef = (DocumentRef) ctx.getProperty("checkedInVersionRef"); if (versionRef != null && session.hasChild(versionRef, COMMENTS_DIRECTORY)) { DocumentModel comments = session.getChild(versionRef, COMMENTS_DIRECTORY); updateCommentProperties(session, comments.getId(), versionRef.reference().toString()); } }
Source:
public List<Variant> mapLine(String line, int lineNumber) throws Exception { Assert.notNull(factory, this.getClass().getSimpleName() + " should be used to read aggregated VCFs only " + "(hint: do not set Aggregation to NONE)"); return factory.create(fileId, studyId, line); }

Target:
public List<Variant> mapLine(String line, int lineNumber) throws Exception { return factory.create(fileId, studyId, line); }
Source:
public void showRevisions() { project = appContext.getCurrentProject().getRootProject(); String pattern; String path; Selection<ResourceBasedNode< ? >> selection = getExplorerSelection(); if (selection == null || selection.getHeadElement() == null) { path = project.getPath(); } else { path = ((HasStorablePath)selection.getHeadElement()).getStorablePath(); } pattern = path.replaceFirst(project.getPath(), ""); selectedFile = (pattern.startsWith("/")) ? pattern.replaceFirst("/", "") : pattern; getRevisions(); }

Target:
public void showRevisions() { project = appContext.getCurrentProject().getRootProject(); String path; Selection<?> selection = getExplorerSelection(); if (selection == null || selection.getHeadElement() == null) { path = project.getPath(); } else { path = ((HasStorablePath)selection.getHeadElement()).getStorablePath(); } String pattern = path.replaceFirst(project.getPath(), ""); selectedFile = (pattern.startsWith("/")) ? pattern.replaceFirst("/", "") : pattern; getRevisions(); }
Source:
public String getXWidgetsXml() { switch (source) { case FILE: return OseeInf.getResourceContents(getClass().getSimpleName(), getClass()); case DEFAULT: default: StringBuilder sb = new StringBuilder(); sb.append("<xWidgets>"); sb.append(branchXWidgetXml); sb.append(BRANCH_VIEW_WIDGET); sb.append("</xWidgets>"); return sb.toString(); } }

Target:
public String getXWidgetsXml() { switch (source) { case FILE: return getXWidgetsXmlFromUiFile(getClass().getSimpleName(), getClass()); case DEFAULT: default: StringBuilder sb = new StringBuilder(); sb.append("<xWidgets>"); sb.append(branchXWidgetXml); sb.append(BRANCH_VIEW_WIDGET); sb.append("</xWidgets>"); return sb.toString(); } }
Source:
protected HttpURLConnection createConnection(URL url, String username, String password, String authKey, String authIV, String userAgent, String acceptedVersion, String acceptedMediaType, ISSLCertificateCallback callback, int timeout) throws IOException { LOGGER.trace( "creating connection to using username \"{}\" and password \"{}\"", new Object[] { url, username, password }); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); if (isHttps(url)) { HttpsURLConnection httpsConnection = (HttpsURLConnection) connection; SSLContext sslContext = setSSLCallback(sslCertificateCallback, url, httpsConnection); setCipherFilter(excludedSSLCipherRegex, sslContext, url, httpsConnection); } setAuthorisation(username, password, authKey, authIV, connection); connection.setUseCaches(false); connection.setDoInput(true); connection.setAllowUserInteraction(false); setConnectTimeout(NO_TIMEOUT, connection); setReadTimeout(timeout, connection); connection.setInstanceFollowRedirects(true); setUserAgent(userAgent, authKey, connection); setAcceptHeader(acceptedVersion, acceptedMediaType, connection); return connection; }

Target:
protected HttpURLConnection createConnection(URL url, String username, String password, String authKey, String authIV, String userAgent, String acceptedVersion, String acceptedMediaType, ISSLCertificateCallback callback, int timeout) throws IOException { LOGGER.trace( "creating connection to using username \"{}\" and password \"{}\"", new Object[] { url, username, password }); HttpURLConnection connection = (HttpURLConnection) url.openConnection(); if (isHttps(url)) { HttpsURLConnection httpsConnection = (HttpsURLConnection) connection; SSLContext sslContext = setSSLCallback(sslAuthorizationCallback, url, httpsConnection); setFilteredCiphers(excludedSSLCipherRegex, sslContext, httpsConnection); } setAuthorisation(username, password, authKey, authIV, connection); connection.setUseCaches(false); connection.setDoInput(true); connection.setAllowUserInteraction(false); setConnectTimeout(NO_TIMEOUT, connection); setReadTimeout(timeout, connection); connection.setInstanceFollowRedirects(true); setUserAgent(userAgent, authKey, connection); setAcceptHeader(acceptedVersion, acceptedMediaType, connection); return connection; }
Source:
public ValuesMatcher( Map<String, Integer> outputSymbolAliases, Optional<Integer> expectedOutputSymbolCount, Optional<List<List<Expression>>> expectedRows) { this.outputSymbolAliases = requireNonNull(outputSymbolAliases, "outputSymbolAliases is null"); this.expectedOutputSymbolCount = requireNonNull(expectedOutputSymbolCount, "expectedOutputSymbolCount is null"); this.expectedRows = requireNonNull(expectedRows, "expectedRows is null"); }

Target:
public ValuesMatcher( Map<String, Integer> outputSymbolAliases, Optional<Integer> expectedOutputSymbolCount, Optional<List<List<Expression>>> expectedRows) { this.outputSymbolAliases = ImmutableMap.copyOf(outputSymbolAliases); this.expectedOutputSymbolCount = requireNonNull(expectedOutputSymbolCount, "expectedOutputSymbolCount is null"); this.expectedRows = requireNonNull(expectedRows, "expectedRows is null"); }
Source:
public static String authorsAlpha(AuthorList authorList) { StringBuilder authors = new StringBuilder(); String[] tokens = authorList.getAuthors().stream().map(Author::getLastOnly).toArray(String[]::new); int max = tokens.length > 4 ? 3 : tokens.length; if (max == 1) { String[] firstAuthor = tokens[0].replaceAll("\\s+", " ").trim().split(" "); for (int j = 0; j < (firstAuthor.length - 1); j++) { authors.append(firstAuthor[j].substring(0, 1)); } authors.append(firstAuthor[firstAuthor.length - 1], 0, Math.min(3, firstAuthor[firstAuthor.length - 1].length())); } else { for (int i = 0; i < max; i++) { String[] curAuthor = tokens[i].replaceAll("\\s+", " ").trim().split(" "); for (String aCurAuthor : curAuthor) { authors.append(aCurAuthor, 0, 1); } } if (tokens.length > 4) { authors.append("+"); } } return authors.toString(); }

Target:
private static String authorsAlpha(AuthorList authorList) { StringBuilder alphaStyle = new StringBuilder(); int maxAuthors = authorList.getNumberOfAuthors() <= MAX_ALPHA_AUTHORS ? authorList.getNumberOfAuthors() : (MAX_ALPHA_AUTHORS - 1); if (authorList.getNumberOfAuthors() == 1) { String[] firstAuthor = authorList.getAuthor(0).getLastOnly() .replaceAll("\\s+", " ").trim().split(" "); for (int j = 0; j < (firstAuthor.length - 1); j++) { alphaStyle.append(firstAuthor[j], 0, 1); } alphaStyle.append(firstAuthor[firstAuthor.length - 1], 0, Math.min(3, firstAuthor[firstAuthor.length - 1].length())); } else { List<String> vonAndLastNames = authorList.getAuthors().stream() .limit(maxAuthors).map(Author::getLastOnly) .collect(Collectors.toList()); for (String vonAndLast : vonAndLastNames) { String[] nameParts = vonAndLast.replaceAll("\\s+", " ").trim().split(" "); for (String part : nameParts) { alphaStyle.append(part, 0, 1); } } if (authorList.getNumberOfAuthors() > MAX_ALPHA_AUTHORS) { alphaStyle.append("+"); } } return alphaStyle.toString(); }
Source:
private void ensureIndexes() { storageStrategy.ensureIndexes(template.eventCollection(), template.snapshotCollection()); }

Target:
public void ensureIndexes() { storageStrategy.ensureIndexes(template.eventCollection(), template.snapshotCollection()); }
Source:
private void postError(RealmNotifier handler, final AppException error, App.Callback<T> callback) { boolean errorHandled; Runnable action = new Runnable() { @Override public void run() { if (!isCancelled) { callback.onResult(App.Result.withError(error)); isCancelled = true; } } }; errorHandled = handler.post(action); if (!errorHandled) { RealmLog.error(error, "An error was thrown, but could not be posted: \n" + error.toString()); } }

Target:
private void postError(RealmNotifier handler, final AppException error, App.Callback<T> callback) { boolean errorHandled; Runnable action = new Runnable() { @Override public void run() { if (!isCancelled) { callback.onResult(App.Result.withError(error)); } } }; errorHandled = handler.post(action); if (!errorHandled) { RealmLog.error(error, "An error was thrown, but could not be posted: \n" + error.toString()); } }
Source:
public int hashCode() { final int prime = 31; int result = 1; result = prime * result + (dataCollection == null ? 0 : dataCollection.hashCode()); return result; }

Target:
public int hashCode() { return dataCollection == null ? 0 : dataCollection.hashCode(); }
Source:
public static String getDefaultRepositoryDir() { String key = GitCorePreferences.core_defaultRepositoryDir; String dir = migrateRepoRootPreference(); IEclipsePreferences p = InstanceScope.INSTANCE .getNode(Activator.getPluginId()); if (dir == null) { dir = Platform.getPreferencesService().getString( Activator.getPluginId(), key, getDefaultDefaultRepositoryDir(), null); } else { p.put(key, dir); } IStringVariableManager manager = VariablesPlugin.getDefault() .getStringVariableManager(); String result; try { result = manager.performStringSubstitution(dir); } catch (CoreException e) { result = ""; } if (result == null || result.isEmpty()) { result = ResourcesPlugin.getWorkspace().getRoot().getRawLocation() .toOSString(); } try { result = FileSystems.getDefault().getPath(result).normalize() .toAbsolutePath().toString(); } catch (Exception e) { } return result; }

Target:
public static String getDefaultRepositoryDir() { String key = GitCorePreferences.core_defaultRepositoryDir; String dir = migrateRepoRootPreference(); IEclipsePreferences p = InstanceScope.INSTANCE .getNode(Activator.getPluginId()); if (dir == null) { dir = Platform.getPreferencesService().getString( Activator.getPluginId(), key, getDefaultDefaultRepositoryDir(), null); } else { p.put(key, dir); } IStringVariableManager manager = VariablesPlugin.getDefault() .getStringVariableManager(); String result; try { result = manager.performStringSubstitution(dir); } catch (CoreException e) { result = ""; } if (result == null || result.isEmpty()) { result = ResourcesPlugin.getWorkspace().getRoot().getRawLocation() .toOSString(); } return FileUtils.canonicalize(new File(result)).toString(); }
Source:
protected void writeTextFields() { super.writeTextFields(); setTextField(PROTOMECH_INDEX, "PROTOMECH " + (unitIndex + 1)); splitName(); if (getEntity().hasUMU()) { setTextField(LBL_JUMP, "Underwater:"); setTextField(MP_JUMP, getEntity().getAllUMUCount()); } printTorsoCritChart(); if (!proto.hasMainGun()) { hideElement(MAIN_GUN_ARMOR); hideElement(MAIN_GUN_SHADOW); hideElement(MAIN_GUN_TEXT); } if (proto.hasUMU()) { setTextField(LBL_JUMP, "Underwater"); } }

Target:
protected void writeTextFields() { super.writeTextFields(); setTextField(PROTOMECH_INDEX, "PROTOMECH " + (unitIndex + 1)); splitName(); if (getEntity().hasUMU()) { setTextField(LBL_JUMP, "Underwater:"); setTextField(MP_JUMP, getEntity().getAllUMUCount()); } printTorsoCritChart(); if (!proto.hasMainGun()) { hideElement(MAIN_GUN_ARMOR); hideElement(MAIN_GUN_SHADOW); hideElement(MAIN_GUN_TEXT); } }
Source:
public DenseMatrix horzcatDense(final List<Vector> vectors) { List<breeze.linalg.DenseVector<Double>> breezeVecList = Lists.transform(vectors, new Function<Vector, breeze.linalg.DenseVector<Double>>() { public breeze.linalg.DenseVector<Double> apply(final Vector vector) { return ((DenseVector) vector).getBreezeVector(); } }); return new DenseMatrix( breeze.linalg.DenseVector.horzcat(JavaConversions.asScalaBuffer(breezeVecList), TAG, ZERO)); }

Target:
public DenseMatrix horzcatDense(final List<Vector> vectors) { final List<breeze.linalg.DenseVector<Double>> breezeVecList = Lists.transform(vectors, new Function<Vector, breeze.linalg.DenseVector<Double>>() { public breeze.linalg.DenseVector<Double> apply(final Vector vector) { return ((DenseVector) vector).getBreezeVector(); } }); return new DenseMatrix( breeze.linalg.DenseVector.horzcat(JavaConversions.asScalaBuffer(breezeVecList), TAG, ZERO)); }
Source:
public PinotConnectorPlanOptimizer(PinotQueryGenerator pinotQueryGenerator, TypeManager typeManager, FunctionMetadataManager functionMetadataManager, LogicalRowExpressions logicalRowExpressions, StandardFunctionResolution standardFunctionResolution) { this.pinotQueryGenerator = requireNonNull(pinotQueryGenerator, "pinot query generator is null"); this.typeManager = requireNonNull(typeManager, "type manager"); this.functionMetadataManager = requireNonNull(functionMetadataManager, "function manager"); this.logicalRowExpressions = requireNonNull(logicalRowExpressions, "logical row expressions"); this.standardFunctionResolution = requireNonNull(standardFunctionResolution, "standard function resolution"); }

Target:
public PinotConnectorPlanOptimizer( PinotQueryGenerator pinotQueryGenerator, TypeManager typeManager, FunctionMetadataManager functionMetadataManager, LogicalRowExpressions logicalRowExpressions, StandardFunctionResolution standardFunctionResolution) { this.pinotQueryGenerator = requireNonNull(pinotQueryGenerator, "pinot query generator is null"); this.typeManager = requireNonNull(typeManager, "type manager is null"); this.functionMetadataManager = requireNonNull(functionMetadataManager, "function manager is null"); this.logicalRowExpressions = requireNonNull(logicalRowExpressions, "logical row expressions is null"); this.standardFunctionResolution = requireNonNull(standardFunctionResolution, "standard function resolution is null"); }
Source:
public String[] getIdentityColumns() { checkInitialized(); final String table = getTableAlias(); if ( table == null ) { throw new IllegalStateException( "No table alias for node " + this ); } final String[] propertyNames = getIdentifierPropertyNames(); List<String> columns = new ArrayList<>(); final boolean inSelect = getWalker().getStatementType() == HqlSqlTokenTypes.SELECT; for ( int i = 0; i < propertyNames.length; i++ ) { String[] propertyNameColumns = toColumns( table, propertyNames[i], inSelect ); columns.addAll(Arrays.asList(propertyNameColumns)); } return columns.toArray( new String[columns.size()] ); }

Target:
public String[] getIdentityColumns() { checkInitialized(); final String table = getTableAlias(); if ( table == null ) { throw new IllegalStateException( "No table alias for node " + this ); } final String[] propertyNames = getIdentifierPropertyNames(); ArrayList<String> columns = new ArrayList<>( propertyNames.length ); final boolean inSelect = getWalker().getStatementType() == HqlSqlTokenTypes.SELECT; for ( String propertyName : propertyNames ) { String[] propertyNameColumns = toColumns( table, propertyName, inSelect ); columns.ensureCapacity( columns.size() + propertyNameColumns.length ); Collections.addAll( columns,propertyNameColumns ); } return columns.toArray( new String[0] ); }
Source:
public void remove(ExtSed sed) { if (sedPreferences.containsKey(sed)) { } sedPreferences.get(sed).removeAll(); sedPreferences.remove(sed); fire(sed, VisualizerCommand.RESET); }

Target:
public void remove(ExtSed sed) { if (!sedPreferences.containsKey(sed)) { return; } sedPreferences.get(sed).removeAll(); sedPreferences.remove(sed); fire(sed, VisualizerCommand.RESET); }
Source:
public long estimateEncodedKeyComponentSize(int[] key) { long estimatedSize = (key.length * Integer.BYTES); estimatedSize += Arrays.stream(key) .filter(element -> dimLookup.getValue(element) != null) .mapToLong(element -> dimLookup.getValue(element).length() * Character.BYTES).sum(); return estimatedSize; }

Target:
public long estimateEncodedKeyComponentSize(int[] key) { long estimatedSize = key.length * Integer.BYTES; estimatedSize += Arrays.stream(key) .filter(element -> dimLookup.getValue(element) != null) .mapToLong(element -> dimLookup.getValue(element).length() * Character.BYTES) .sum(); return estimatedSize; }
Source:
public long acceptWay(ReaderWay way) { String highwayValue = way.getTag("highway"); if (highwayValue == null) { if (way.hasTag("route", ferries)) { String bikeTag = way.getTag("bicycle"); if (bikeTag == null && !way.hasTag("foot") || "yes".equals(bikeTag)) return acceptBit | ferryBit; } if (way.hasTag("railway", "platform")) return acceptBit; return 0; } if (!highwaySpeeds.containsKey(highwayValue)) return 0; String sacScale = way.getTag("sac_scale"); if (sacScale != null) { if ((way.hasTag("highway", "cycleway")) && (way.hasTag("sac_scale", "hiking"))) return acceptBit; if (!isSacScaleAllowed(sacScale)) return 0; } if (way.hasTag("bicycle", intendedValues) || way.hasTag("bicycle", "dismount") || (way.hasTag("highway", "cycleway"))) return acceptBit; if ("motorway".equals(highwayValue) || "motorway_link".equals(highwayValue)) return 0; if (way.hasTag("motorroad", "yes")) return 0; if (isBlockFords() && (way.hasTag("highway", "ford") || way.hasTag("ford"))) return 0; if (way.hasTag(restrictions, restrictedValues) && !getConditionalTagInspector().isRestrictedWayConditionallyPermitted(way)) return 0; if (getConditionalTagInspector().isPermittedWayConditionallyRestricted(way)) return 0; else return acceptBit; }

Target:
public long acceptWay(ReaderWay way) { String highwayValue = way.getTag("highway"); if (highwayValue == null) { if (way.hasTag("route", ferries)) { String bikeTag = way.getTag("bicycle"); if (bikeTag == null && !way.hasTag("foot") || "yes".equals(bikeTag)) return acceptBit | ferryBit; } if (way.hasTag("railway", "platform")) return acceptBit; return 0; } if (!highwaySpeeds.containsKey(highwayValue)) return 0; String sacScale = way.getTag("sac_scale"); if (sacScale != null) { if ((way.hasTag("highway", "cycleway")) && (way.hasTag("sac_scale", "hiking"))) return acceptBit; if (!isSacScaleAllowed(sacScale)) return 0; } if (way.hasTag("bicycle", intendedValues) || way.hasTag("bicycle", "dismount") || way.hasTag("highway", "cycleway")) return acceptBit; if ("motorway".equals(highwayValue) || "motorway_link".equals(highwayValue)) return 0; if (way.hasTag("motorroad", "yes")) return 0; if (isBlockFords() && (way.hasTag("highway", "ford") || way.hasTag("ford"))) return 0; if (way.hasTag(restrictions, restrictedValues) && !getConditionalTagInspector().isRestrictedWayConditionallyPermitted(way)) return 0; if (getConditionalTagInspector().isPermittedWayConditionallyRestricted(way)) return 0; else return acceptBit; }
Source:
public void sendTo(OutputStream<M> outputStream) { String opId = this.graph.getNextOpId(OpCode.SEND_TO, null); OutputOperatorSpec<M> op = OperatorSpecs.createSendToOperatorSpec((OutputStreamImpl<M>) outputStream, opId); this.operatorSpec.registerNextOperatorSpec(op); }

Target:
public void sendTo(OutputStream<M> outputStream) { String opId = this.graph.getNextOpId(OpCode.SEND_TO); OutputOperatorSpec<M> op = OperatorSpecs.createSendToOperatorSpec((OutputStreamImpl<M>) outputStream, opId); this.operatorSpec.registerNextOperatorSpec(op); }
Source:
public static String toStr(Object o) { if (o instanceof byte[]) { return printArray((byte[]) o, false); } else if (o == null) { return "null"; } else if (o.getClass().isArray()) { int length = Array.getLength(o); if (length == 0) return "[]"; StringBuilder sb = new StringBuilder("[").append(Array.get(o, 0)); for (int i = 1; i < length; ++i) sb.append(", ").append(Array.get(o, i)); return sb.append("]").toString(); } else { return o.toString(); } }

Target:
public static String toStr(Object o) { if (o == null) { return "null"; } else if (o.getClass().isArray()) { if (o.getClass().getComponentType().isPrimitive()) { if (o instanceof byte[]) { return printArray((byte[]) o, false); } else if (o instanceof int[]) { return Arrays.toString((int[]) o); } else if (o instanceof long[]) { return Arrays.toString((long[]) o); } else if (o instanceof short[]) { return Arrays.toString((short[]) o); } else if (o instanceof double[]) { return Arrays.toString((double[]) o); } else if (o instanceof float[]) { return Arrays.toString((float[]) o); } else if (o instanceof char[]) { return Arrays.toString((char[]) o); } else if (o instanceof boolean[]) { return Arrays.toString((boolean[]) o); } } return Arrays.toString((Object[]) o); } else { return o.toString(); } }
Source:
public void should_get_attributes() { final String documentWithAttributes = "= Document Title\n" + ":docattr: docvalue\n" + "\n" + "preamble\n" + "\n" + "== Section A\n" + "\n" + "paragraph\n" + "\n"; Document document = asciidoctor.load(documentWithAttributes, new HashMap<String, Object>()); List<? extends StructuralNode> blocks = document.getBlocks(); Section section = (Section) blocks.get(1); section.setAttribute("testattr", "testvalue", true); assertThat(document.hasAttribute("testattr"), is(false)); assertThat(section.hasAttribute("testattr"), is(true)); assertThat(section.hasAttribute("testattr", true), is(true)); assertThat(section.hasAttribute("testattr", false), is(true)); assertThat(section.isAttribute("testattr", "testvalue"), is(true)); assertThat(section.hasAttribute("docattr", true), is(true)); assertThat(section.hasAttribute("docattr", false), is(false)); }

Target:
public void should_get_attributes() { final String documentWithAttributes = "= Document Title\n" + ":docattr: docvalue\n" + "\n" + "preamble\n" + "\n" + "== Section A\n" + "\n" + "paragraph\n" + "\n"; Document document = asciidoctor.load(documentWithAttributes, new HashMap<String, Object>()); List<StructuralNode> blocks = document.getBlocks(); Section section = (Section) blocks.get(1); section.setAttribute("testattr", "testvalue", true); assertThat(document.hasAttribute("testattr"), is(false)); assertThat(section.hasAttribute("testattr"), is(true)); assertThat(section.hasAttribute("testattr", true), is(true)); assertThat(section.hasAttribute("testattr", false), is(true)); assertThat(section.isAttribute("testattr", "testvalue"), is(true)); assertThat(section.hasAttribute("docattr", true), is(true)); assertThat(section.hasAttribute("docattr", false), is(false)); }
Source:
protected FilterResults performFiltering(CharSequence searchTerm) { mSearchTerm = searchTerm; FilterResults results = new FilterResults(); Locale locale = Locale.getDefault(); if ((searchTerm == null) || (searchTerm.length() == 0)) { List<FolderInfoHolder> list = new ArrayList<FolderInfoHolder>(mFolders); results.values = list; results.count = list.size(); } else { final String searchTermString = searchTerm.toString().toLowerCase(locale); final String[] words = searchTermString.split(" "); final int wordCount = words.length; final List<FolderInfoHolder> newValues = new ArrayList<FolderInfoHolder>(); for (final FolderInfoHolder value : mFolders) { if (value.displayName == null) { continue; } final String valueText = value.displayName.toLowerCase(locale); for (String word : words) { if (valueText.contains(word)) { newValues.add(value); break; } } } results.values = newValues; results.count = newValues.size(); } return results; }

Target:
protected FilterResults performFiltering(CharSequence searchTerm) { mSearchTerm = searchTerm; FilterResults results = new FilterResults(); Locale locale = Locale.getDefault(); if ((searchTerm == null) || (searchTerm.length() == 0)) { List<FolderInfoHolder> list = new ArrayList<FolderInfoHolder>(mFolders); results.values = list; results.count = list.size(); } else { final String searchTermString = searchTerm.toString().toLowerCase(locale); final String[] words = searchTermString.split(" "); final int wordCount = words.length; final List<FolderInfoHolder> newValues = new ArrayList<FolderInfoHolder>(); for (final FolderInfoHolder value : mFolders) { if (value.displayName == null) { continue; } final String valueText = value.displayName.toLowerCase(locale); for (int k = 0; k < wordCount; k++) { if (valueText.contains(words[k])) { newValues.add(value); break; } } } results.values = newValues; results.count = newValues.size(); } return results; }
Source:
public void warnMemorySizeLegal(VmBase vm, Version clusterVersion) { if (! VmValidationUtils.isMemorySizeLegal(vm.getOsId(), vm.getMemSizeMb(), clusterVersion)) { AuditLogableBase logable = new AuditLogableBase(); logable.setVmId(vm.getId()); logable.addCustomValue("VmName", vm.getName()); logable.addCustomValue("VmMemInMb", String.valueOf(vm.getMemSizeMb())); logable.addCustomValue("VmMinMemInMb", String.valueOf(VmValidationUtils.getMinMemorySizeInMb(vm.getOsId(), clusterVersion))); logable.addCustomValue("VmMaxMemInMb", String.valueOf(VmValidationUtils.getMaxMemorySizeInMb(vm.getOsId(), clusterVersion))); auditLogDirector.log(logable, AuditLogType.VM_MEMORY_NOT_IN_RECOMMENDED_RANGE); } }

Target:
public void warnMemorySizeLegal(VmBase vm, Version clusterVersion) { if (! VmValidationUtils.isMemorySizeLegal(vm.getOsId(), vm.getMemSizeMb(), clusterVersion)) { AuditLogableBase logable = new AuditLogableBase(); logable.addCustomValue("VmName", vm.getName()); logable.addCustomValue("VmMemInMb", String.valueOf(vm.getMemSizeMb())); logable.addCustomValue("VmMinMemInMb", String.valueOf(VmValidationUtils.getMinMemorySizeInMb(vm.getOsId(), clusterVersion))); logable.addCustomValue("VmMaxMemInMb", String.valueOf(VmValidationUtils.getMaxMemorySizeInMb(vm.getOsId(), clusterVersion))); auditLogDirector.log(logable, AuditLogType.VM_MEMORY_NOT_IN_RECOMMENDED_RANGE); } }
Source:
public NoCRSPanel(String id, final IModel<ImportTask> model) { super(id, model); Form form = new Form("form"); add(form); form.add(new CRSPanel("crs", new SRSToCRSModel(new PropertyModel(model, "layer.resource.sRS"))) { @Override protected CoordinateReferenceSystem fromSRS(String srs) { try { return CRS.decode(srs); } catch(Exception e) { error(e); return null; } } }); form.add(new AjaxSubmitLink("apply") { @Override protected void onError(AjaxRequestTarget target, Form<?> form) { target.add(feedbackPanel); } @Override protected void onSubmit(AjaxRequestTarget target, Form<?> form) { target.add(feedbackPanel); ImportTask item = model.getObject(); try { ImporterWebUtils.importer().changed(item); } catch (IOException e) { throw new RuntimeException(e); } target.add(ImportTaskTable.this); onItemFixed(item, target); } }); }

Target:
public NoCRSPanel(String id, final IModel<ImportTask> model) { super(id, model); Form form = new Form("form"); add(form); form.add(new CRSPanel("crs", new SRSToCRSModel(new PropertyModel(model, "layer.resource.sRS"))) { @Override protected CoordinateReferenceSystem fromSRS(String srs) { try { return CRS.decode(srs); } catch(Exception e) { error(e); return null; } } }); form.add(new AjaxSubmitLink("apply") { @Override protected void onError(AjaxRequestTarget target, Form<?> form) { target.add(feedbackPanel); } @Override protected void onSubmit(AjaxRequestTarget target, Form<?> form) { target.add(feedbackPanel); ImportTask item = model.getObject(); try { ImporterWebUtils.importer().changed(item); } catch (IOException e) { error(e); } target.add(ImportTaskTable.this); onItemFixed(item, target); } }); }
Source:
public CRAMIterator(final SeekableStream seekableStream, final CRAMReferenceSource referenceSource, final long[] coordinates, final ValidationStringency validationStringency) throws IOException { if (null == referenceSource) { throw new CRAMException("A reference source is required for CRAM files"); } this.countingInputStream = new CountingInputStream(seekableStream); this.referenceSource = referenceSource; this.validationStringency = validationStringency; final CramSpanContainerIterator containerIterator = CramSpanContainerIterator.fromFileSpan(seekableStream, coordinates); cramHeader = containerIterator.getCramHeader(); this.containerIterator = containerIterator; firstContainerOffset = containerIterator.getFirstContainerOffset(); records = new ArrayList<SAMRecord>(); normalizer = new CramNormalizer(cramHeader.getSamFileHeader(), referenceSource); parser = new ContainerParser(cramHeader.getSamFileHeader()); }

Target:
public CRAMIterator(final SeekableStream seekableStream, final CRAMReferenceSource referenceSource, final long[] coordinates, final ValidationStringency validationStringency) throws IOException { if (null == referenceSource) { throw new CRAMException("A reference source is required for CRAM files"); } this.countingInputStream = new CountingInputStream(seekableStream); this.referenceSource = referenceSource; this.validationStringency = validationStringency; final CramSpanContainerIterator containerIterator = CramSpanContainerIterator.fromFileSpan(seekableStream, coordinates); cramHeader = containerIterator.getCramHeader(); this.containerIterator = containerIterator; firstContainerOffset = containerIterator.getFirstContainerOffset(); records = new ArrayList<SAMRecord>(CRAMContainerStreamWriter.DEFAULT_RECORDS_PER_SLICE); normalizer = new CramNormalizer(cramHeader.getSamFileHeader(), referenceSource); parser = new ContainerParser(cramHeader.getSamFileHeader()); }
Source:
public static String getFingerPrint(Digest d, PublicKey key) throws Exception { if (key == null) { return null; } Buffer buffer = new ByteArrayBuffer(); buffer.putRawPublicKey(key); d.init(); d.update(buffer.array(), 0, buffer.wpos()); byte[] data = d.digest(); if ("MD5".equals(d.getAlgorithm())) { return "MD5:" + BufferUtils.printHex(':', data); } else { return d.getAlgorithm().replace("-", "").toUpperCase() + ":" + Base64.encodeToString(data).replaceAll("=", ""); } }

Target:
public static String getFingerPrint(Digest d, PublicKey key) throws Exception { if (key == null) { return null; } Buffer buffer = new ByteArrayBuffer(); buffer.putRawPublicKey(key); d.init(); d.update(buffer.array(), 0, buffer.wpos()); byte[] data = d.digest(); String algo = d.getAlgorithm(); if (BuiltinDigests.md5.getAlgorithm().equals(algo)) { return algo + ":" + BufferUtils.printHex(':', data); } else { return algo.replace("-", "").toUpperCase() + ":" + Base64.encodeToString(data).replaceAll("=", ""); } }
Source:
public static Either<Exception, DMNImportPMMLInfo> from(InputStream is, DMNModelImpl model, Import i) { try { PMML pmml = org.jpmml.model.PMMLUtil.unmarshal(is); Map<String, String> headerExtensions = new HashMap<>(); for (Extension ex : pmml.getHeader().getExtensions()) { headerExtensions.put(ex.getName(), ex.getValue()); } PMMLHeaderInfo h = new PMMLHeaderInfo("<LINK_0>" + pmml.getBaseVersion().replace(".", "_"), headerExtensions); List<DMNPMMLModelInfo> models = new ArrayList<>(); for (Model pm : pmml.getModels()) { MiningSchema miningSchema = pm.getMiningSchema(); Map<String, DMNType> inputFields = new HashMap<>(); miningSchema.getMiningFields() .stream() .filter(mf -> mf.getUsageType() == UsageType.ACTIVE) .forEach(fn -> inputFields.put(fn.getName().getValue(), model.getTypeRegistry().unknown())); Collection<String> outputFields = new ArrayList<>(); pm.getOutput().getOutputFields().forEach(of -> outputFields.add(of.getName().getValue())); models.add(new DMNPMMLModelInfo(pm.getModelName(), inputFields, outputFields)); } DataDictionary dd = pmml.getDataDictionary(); for (DataField df : dd.getDataFields()) { BuiltInType baseFeelType = BuiltInType.UNKNOWN; switch (df.getDataType()) { case BOOLEAN: baseFeelType = BuiltInType.BOOLEAN; break; case DOUBLE: case FLOAT: case INTEGER: baseFeelType = BuiltInType.NUMBER; break; case STRING: baseFeelType = BuiltInType.STRING; break; default: LOG.warn("{}", df.getDataType()); break; } if (df.getOpType() == OpType.CATEGORICAL) { } } DMNImportPMMLInfo info = new DMNImportPMMLInfo(i, models, h); return Either.ofRight(info); } catch (Throwable e) { return Either.ofLeft(new Exception(e)); } }

Target:
public static Either<Exception, DMNImportPMMLInfo> from(InputStream is, DMNModelImpl model, Import i) { try { PMMLInfo<?> prototype = PMMLInfo.from(is); PMMLHeaderInfo h = prototype.getHeader(); List<DMNPMMLModelInfo> models = prototype.getModels().stream().map(proto -> DMNPMMLModelInfo.from(proto, model)).collect(Collectors.toList()); DMNImportPMMLInfo info = new DMNImportPMMLInfo(i, models, h); return Either.ofRight(info); } catch (Throwable e) { return Either.ofLeft(new Exception(e)); } }
Source:
public void onStartup(final Set<Class<?>> c, final ServletContext servletContext) throws ServletException { ServerConfiguration configuration = ConfigurationFileLoader.loadConfiguration(); PlatformBootstrap bootstrap = new PlatformBootstrap(); bootstrap.init(servletContext, configuration); }

Target:
public void onStartup(final Set<Class<?>> c, final ServletContext servletContext) throws ServletException { final ServerConfiguration configuration = ConfigurationFileLoader.loadConfiguration(); final PlatformBootstrap bootstrap = new PlatformBootstrap(); bootstrap.init(servletContext, configuration); }
Source:
public String encode(String plainText) { String copy = plainText; StringBuilder ciphertext = new StringBuilder(plainText.length()); while (copy.length() > 0) { for (int i = 0; i < Math.min(copy.length(), key.length()); i++) { ciphertext.append(encodeCharacter(copy, i)); } copy = plainText.substring(ciphertext.length(), plainText.length()); } return ciphertext.toString(); }

Target:
public String encode(String plainText) { StringBuilder ciphertext = new StringBuilder(plainText.length()); String sameLengthKey = getSufficientlyLongKeyForPlaintext(plainText, key); for (int index = 0; index < plainText.length(); index++) { ciphertext.append(encodeCharacter(plainText, index, sameLengthKey)); } return ciphertext.toString(); }
Source:
public byte[] call(final byte[] memento) throws Exception { LOG.log(Level.INFO, "{0} starting...", taskId); memoryStoreInitializer.initialize(); trainer.initialize(); synchronizer.globalBarrier(); workerClock.initialize(); for (int epoch = 0; epoch < maxEpochs; ++epoch) { if (aborted) { LOG.log(Level.INFO, "Abort a thread to completely close the task"); workerClock.recordClockNetworkWaitingTime(); return null; } if (workerClock.getWorkerClock() > maxEpochs * numMiniBatchPerEpoch) { break; } trainingDataDivider.onEpochStart(); trainer.onEpochStart(epoch); for (int minibatch = 0; minibatch < numMiniBatchPerEpoch; minibatch++) { if (workerClock.getWorkerClock() > maxEpochs * numMiniBatchPerEpoch) { break; } trainer.run(minibatch); miniBatchParameterWorker.onMiniBatchEnd(); trainingDataDivider.onMiniBatchEnd(); workerClock.clock(); } trainer.onEpochEnd(epoch); } synchronizer.globalBarrier(); trainer.cleanup(); workerClock.recordClockNetworkWaitingTime(); return null; }

Target:
public byte[] call(final byte[] memento) throws Exception { LOG.log(Level.INFO, "{0} starting...", taskId); trainingDataInitializer.initialize(); trainer.initialize(); workerClock.initialize(); synchronizer.globalBarrier(); int currentEpoch = workerClock.getWorkerClock(); final int maxIterationCount = maxEpochs * numMiniBatchPerEpoch; final int initialIteration = currentEpoch * numMiniBatchPerEpoch; for (int iteration = initialIteration; iteration < maxIterationCount; ++iteration) { if (aborted) { LOG.log(Level.INFO, "Abort a thread to completely close the task"); workerClock.recordClockNetworkWaitingTime(); return null; } final boolean isEpochStart = iteration % numMiniBatchPerEpoch == 0; if (isEpochStart) { trainingDataSplitter.prepareSplitsForEpoch(); trainer.initEpochVariables(currentEpoch); } trainer.run(); miniBatchParameterWorker.flushLocalUpdates(); final boolean isEpochEnd = (iteration + 1) % numMiniBatchPerEpoch == 0; if (isEpochEnd) { trainer.wrapUpEpochVariables(currentEpoch); workerClock.clock(); currentEpoch++; } } synchronizer.globalBarrier(); trainer.cleanup(); workerClock.recordClockNetworkWaitingTime(); return null; }
Source:
public MapSqlParameterMapper<GlusterServerService> getBatchMapper() { throw new RuntimeException("Unsupported operation"); }

Target:
public MapSqlParameterMapper<GlusterServerService> getBatchMapper() { throw new NotImplementedException("Unsupported operation"); }
Source:
public boolean isPageComplete() { boolean isComplete = true; String name = helper.getDefaultTableName(); String type = helper.getTableType(); String errorMessage = null; StringBuffer buffer = new StringBuffer(); if (name.isEmpty()) { buffer.append(Messages.EditGenericNattableConfigurationFieldsNattableWizardPage_nameMustBeSetError); } if (type.isEmpty()) { buffer.append(Messages.EditGenericNattableConfigurationFieldsNattableWizardPage_typeMustBeSetError); } errorMessage = buffer.toString(); if (errorMessage.isEmpty()) { setErrorMessage(null); } else { setErrorMessage(errorMessage.toString()); } isComplete = !name.isEmpty() && !type.isEmpty(); return isComplete; }

Target:
public boolean isPageComplete() { boolean isComplete = true; final String name = helper.getDefaultTableName(); final String type = helper.getTableType(); String errorMessage = null; StringBuffer buffer = new StringBuffer(); if (name.isEmpty()) { buffer.append(Messages.EditGenericNattableConfigurationFieldsNattableWizardPage_nameMustBeSetError); } if (type.isEmpty()) { buffer.append(Messages.EditGenericNattableConfigurationFieldsNattableWizardPage_typeMustBeSetError); } errorMessage = buffer.toString(); if (errorMessage.isEmpty()) { setErrorMessage(null); } else { setErrorMessage(errorMessage.toString()); } isComplete = !name.isEmpty() && !type.isEmpty(); return isComplete; }
Source:
public void next(T value) { if (!terminated) { list.addLast(enterTransform.call(nl.next(value))); evictionPolicy.evict(list); TAIL_UPDATER.lazySet(this, list.tail); } }

Target:
public void next(T value) { if (!terminated) { list.addLast(enterTransform.call(nl.next(value))); evictionPolicy.evict(list); tail = list.tail; } }