auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public SupremeCourtJudgment process(RawSourceScJudgment rJudgment) { log.debug("Processing: {}", rJudgment); <START> markProcessed(rJudgment); <END> SourceScJudgment sourceScJudgment = sourceScJudgmentParser.parse(rJudgment.getJsonContent()); SupremeCourtJudgment scJudgment = sourceScJudgmentConverter.convertJudgment(sourceScJudgment); SupremeCourtJudgment oldScJudgment = scJudgmentRepository.findOneBySourceCodeAndSourceJudgmentId(SourceCode.SUPREME_COURT, scJudgment.getSourceInfo().getSourceJudgmentId()); if (oldScJudgment != null) { log.debug("same found (rJudgmentId:{}, judgmentId: {}), updating...", rJudgment.getId(), oldScJudgment.getId()); judgmentOverwriter.overwriteJudgment(oldScJudgment, scJudgment); return oldScJudgment; } return scJudgment; }</code><technical_language>J) invoke this method return statement</technical_language>

Target:
public SupremeCourtJudgment process(RawSourceScJudgment rJudgment) { log.trace("Processing: rawSourceScJudgment id={}", rJudgment.getId()); markProcessed(rJudgment); SourceScJudgment sourceScJudgment = sourceScJudgmentParser.parse(rJudgment.getJsonContent()); SupremeCourtJudgment scJudgment = sourceScJudgmentConverter.convertJudgment(sourceScJudgment); SupremeCourtJudgment oldScJudgment = scJudgmentRepository.findOneBySourceCodeAndSourceJudgmentId(SourceCode.SUPREME_COURT, scJudgment.getSourceInfo().getSourceJudgmentId()); if (oldScJudgment != null) { log.trace("same found (rJudgmentId:{}, judgmentId: {}), updating...", rJudgment.getId(), oldScJudgment.getId()); judgmentOverwriter.overwriteJudgment(oldScJudgment, scJudgment); return oldScJudgment; } return scJudgment; }
Source:
<code>public void writePackedRefs() throws IOException { boolean peeled = false; for (final Ref r : refs) { if (r.getStorage().isPacked() && r.isPeeled()) { peeled = true; break; } } final StringWriter w = new StringWriter(); if (peeled) { w.write(RefDirectory.PACKED_REFS_HEADER); if (peeled) w.write(RefDirectory.PACKED_REFS_PEELED); w.write('\n'); } final char[] tmp = new char[Constants.OBJECT_ID_STRING_LENGTH]; for (final Ref r : refs) { if (r.getStorage() != Ref.Storage.PACKED) continue; ObjectId objectId = r.getObjectId(); <START> if (objectId == null) { throw new TransportException(MessageFormat .format(JGitText.get().cannotRead, r.getName())); } <END> objectId.copyTo(tmp, w); w.write(' '); w.write(r.getName()); w.write('\n'); ObjectId peeledObjectId = r.getPeeledObjectId(); if (peeledObjectId != null) { w.write('^'); peeledObjectId.copyTo(tmp, w); w.write('\n'); } } writeFile(Constants.PACKED_REFS, Constants.encode(w.toString())); }</code><technical_language>This --- symrefs storage PACKED. guard it: if (objectId == null) { // A packed ref a symref, a symref // unborn branch. throw new NullPointerException(); } ..</technical_language>

Target:
public void writePackedRefs() throws IOException { boolean peeled = false; for (final Ref r : refs) { if (r.getStorage().isPacked() && r.isPeeled()) { peeled = true; break; } } final StringWriter w = new StringWriter(); if (peeled) { w.write(RefDirectory.PACKED_REFS_HEADER); if (peeled) w.write(RefDirectory.PACKED_REFS_PEELED); w.write('\n'); } final char[] tmp = new char[Constants.OBJECT_ID_STRING_LENGTH]; for (final Ref r : refs) { if (r.getStorage() != Ref.Storage.PACKED) continue; ObjectId objectId = r.getObjectId(); if (objectId == null) { throw new NullPointerException(); } objectId.copyTo(tmp, w); w.write(' '); w.write(r.getName()); w.write('\n'); ObjectId peeledObjectId = r.getPeeledObjectId(); if (peeledObjectId != null) { w.write('^'); peeledObjectId.copyTo(tmp, w); w.write('\n'); } } writeFile(Constants.PACKED_REFS, Constants.encode(w.toString())); }
Source:
<code>public void put(AlluxioURI dir, List<URIStatus> statuses) { try { CachedItem item = mCache.get(dir.getPath(), new Callable<CachedItem>() { @Override public CachedItem call() throws Exception { return new CachedItem(); } <START> }); <END> item.setDirStatuses(statuses); for (URIStatus status : statuses) { put(status.getPath(), status); } } catch (Exception e) { e.printStackTrace(); } }</code><technical_language>lambda syntax here? () -> new CachedItem()); edit: simply CachedItem::new</technical_language>

Target:
public void put(AlluxioURI dir, List<URIStatus> statuses) { try { CachedItem item = mCache.get(dir.getPath(), () -> new CachedItem()); item.setDirStatuses(statuses); for (URIStatus status : statuses) { put(status.getPath(), status); } } catch (ExecutionException e) { LOG.warn("Failed to cache metadata for dir {}", dir.getPath()); } }
Source:
<code>private void dispatch(ExecutionReference reference, ExecutableFlow exflow, Executor choosenExecutor) throws ExecutorManagerException { exflow.setUpdateTime(System.currentTimeMillis()); reference.setExecutor(choosenExecutor); callExecutorServer(reference, ConnectorParams.EXECUTE_ACTION); executorLoader.assignExecutor(exflow.getExecutionId(), choosenExecutor.getId()); runningFlows.put(exflow.getExecutionId(), <START> new Pair<ExecutionReference, ExecutableFlow>(reference, exflow)); <END> }</code><technical_language>add logging successful dispatch for flow specific executor</technical_language>

Target:
private void dispatch(ExecutionReference reference, ExecutableFlow exflow, Executor choosenExecutor) throws ExecutorManagerException { exflow.setUpdateTime(System.currentTimeMillis()); reference.setExecutor(choosenExecutor); callExecutorServer(reference, ConnectorParams.EXECUTE_ACTION); executorLoader.assignExecutor(exflow.getExecutionId(), choosenExecutor.getId()); runningFlows.put(exflow.getExecutionId(), new Pair<ExecutionReference, ExecutableFlow>(reference, exflow)); logger.info(String.format( "Successfully dispatched exec %d with error count %d", exflow.getExecutionId(), reference.getNumErrors())); }
Source:
<code>public String getLabel(Object element, int columnIdx) { GerritDiffNode gerrritNode = (GerritDiffNode) element; FileInfo fileInfo = gerrritNode.getFileInfo(); switch (columnIdx) { case 0: return ""; case 1: { switch (gerrritNode.getKind()) { case GerritDifferences.NO_CHANGE: <START> return ""; <END> case GerritDifferences.ADDITION: return "A"; case GerritDifferences.DELETION: return "D"; case GerritDifferences.CHANGE: return "M"; case GerritDifferences.RENAMED: return "R"; case GerritDifferences.COPIED: return "C"; default: return "M"; } } case 2: return gerrritNode.getLabelName(nameFirst); case 3: String commentString = ""; int commentsCount = fileInfo.getCommentsCount(); int draftsCount = fileInfo.getDraftsCount(); if (draftsCount != 0) { commentString += DRAFTS + draftsCount; if (commentsCount != 0) { commentString += " "; } } else { commentString = " "; } if (commentsCount != 0) { commentString += COMMENTS + commentsCount; } return commentString; case 4: StringBuilder modifySize = new StringBuilder(); modifySize.append('+'); modifySize.append(Integer.toString(fileInfo.getLines_inserted())); modifySize.append('/'); modifySize.append('-'); modifySize.append(Integer.toString(fileInfo.getLines_deleted())); return modifySize.toString(); default: return ""; } }</code><technical_language>add "Non nls"</technical_language>

Target:
public String getLabel(Object element, int columnIdx) { GerritDiffNode gerrritNode = (GerritDiffNode) element; FileInfo fileInfo = gerrritNode.getFileInfo(); switch (columnIdx) { case 0: return ""; case 1: { switch (gerrritNode.getKind()) { case GerritDifferences.NO_CHANGE: return ""; case GerritDifferences.ADDITION: return "A"; case GerritDifferences.DELETION: return "D"; case GerritDifferences.CHANGE: return "M"; case GerritDifferences.RENAMED: return "R"; case GerritDifferences.COPIED: return "C"; default: return "M"; } } case 2: return gerrritNode.getLabelName(nameFirst); case 3: String commentString = ""; int commentsCount = fileInfo.getCommentsCount(); int draftsCount = fileInfo.getDraftsCount(); if (draftsCount != 0) { commentString += DRAFTS + draftsCount; if (commentsCount != 0) { commentString += " "; } } else { commentString = " "; } if (commentsCount != 0) { commentString += COMMENTS + commentsCount; } return commentString; case 4: StringBuilder modifySize = new StringBuilder(); FileInfo file = gerrritNode.getDiffFileInfo() != null ? gerrritNode.getDiffFileInfo() : gerrritNode.getFileInfo(); modifySize.append('+'); modifySize.append(Integer.toString(file.getLines_inserted())); modifySize.append('/'); modifySize.append('-'); modifySize.append(Integer.toString(file.getLines_deleted())); return modifySize.toString(); default: return ""; } }
Source:
<code>public int execute() throws InterruptedException { if (!executionCheck.apply(this)) { return 0; } List<String> lines = getLines(); if (log.isDebugEnabled()) { log.debug("executing: - {}", summary, lines); } int result; try { mutexAcquire.call(); result = runner.execute(lines, summary); } catch (UncheckedInterruptedException e) { throw e.getCause(); } catch (Exception e) { throw new IllegalStateException("execution failed, invocation error for ${summary}", e); } finally { mutexRelease.call(); } if (log.isDebugEnabled()) { log.debug("finished executing: - result code {}", summary, result); } if (!resultCodeCheck.apply(result)) <START> throw new IllegalStateException("execution failed, invalid result ${result} for ${summary}"); <END> return result; }</code><technical_language>${result} ${summary} need converted Java</technical_language>

Target:
public int execute() { if (!executionCheck.apply(this)) { return 0; } List<String> lines = getLines(); if (log.isDebugEnabled()) { log.debug("executing: - {}", summary, lines); } int result; try { mutexAcquire.run(); result = runner.execute(lines, summary); } catch (RuntimeInterruptedException e) { throw e; } catch (Exception e) { throw new IllegalStateException(format("execution failed, invocation error for %s", summary), e); } finally { mutexRelease.run(); } if (log.isDebugEnabled()) { log.debug("finished executing: - result code {}", summary, result); } if (!resultCodeCheck.apply(result)) { throw new IllegalStateException(format("execution failed, invalid result %s for %s", result, summary)); } return result; }
Source:
<code>private String getFullyQualifiedName(String name) { <START> if (currentScopeRootTree().is(Kind.CLASSDEF)) { <END> Name className = ((ClassDef) currentScopeRootTree()).name(); String enclosingClassQualifiedName = Optional.ofNullable(className.symbol()).map(Symbol::fullyQualifiedName).orElse(className.name()); return enclosingClassQualifiedName + "." + name; } return fullyQualifiedModuleName != null ? (fullyQualifiedModuleName + "." + name) : null; }</code><technical_language>a function is defined another function? fully qualified name</technical_language>

Target:
private String getFullyQualifiedName(String name) { String prefix = scopeQualifiedName(); return prefix != null ? (prefix + "." + name) : null; }
Source:
<code>public static Object[][] testDataExample() { return new Object[][]{ new Object[]{ "admin@.com", "admin", <START> "test problem name", <END> "test problem type", "test problem description", "test problem propose", Arrays.asList("1 test image comment", "2 test image comment"), Arrays.asList(new File("resources" + File.separator + "images" + File.separator + "bomb.jpg").getAbsolutePath(), new File("resources" + File.separator + "images" + File.separator + "svalka.jpg").getAbsolutePath()), 50.2, 30.0 } }; }</code><technical_language>"admin@.com", password Constant class in utility package. please create problems delete/approve them</technical_language>

Target:
public static Object[][] testDataExample() { return new Object[][]{ new Object[]{ "test problem type", "test problem description", "test problem propose", Arrays.asList("1 test image comment", "2 test image comment"), Arrays.asList(new File("resources" + File.separator + "images" + File.separator + "bomb.jpg").getAbsolutePath(), new File("resources" + File.separator + "images" + File.separator + "svalka.jpg").getAbsolutePath()), 47.3, 31.1 } }; }
Source:
<code>protected int getNeededDiskSize(Guid storageDomainId) { int result = 0; <START> for (DiskImage img : getParameters().getDiskInfoMap().values()) { <END> if (ImagesHandler.getStorageDomainId(img).getValue().equals(storageDomainId)) { result = result + (int) Math.ceil(img.getActualSize()); } } return result; }</code><technical_language>disks parameters? Also, illegal images</technical_language>

Target:
protected int getNeededDiskSize(Guid storageDomainId) { int result = 0; for (DiskImage img : getParameters().getDiskInfoList()) { if (ImagesHandler.getStorageDomainId(img).getValue().equals(storageDomainId)) { result = result + (int) Math.ceil(img.getActualSize()); } } return result; }
Source:
<code>private CacheConfiguration defaultCacheConfiguration(String cacheName) { CacheConfiguration cfg = new CacheConfiguration(cacheName); <START> cfg.setAtomicityMode(TRANSACTIONAL); <END> cfg.setWriteSynchronizationMode(FULL_SYNC); return cfg; }</code><technical_language>atomicityMode() method return TRANSACTIONAL life easier for wants extend this test</technical_language>

Target:
private CacheConfiguration defaultCacheConfiguration(String cacheName) { CacheConfiguration cfg = new CacheConfiguration(cacheName); cfg.setWriteSynchronizationMode(writeSynchronizationMode()); return cfg; }
Source:
<code>public void testAddWithoutParameterUpdate() throws Exception { <START> assertTrue(new File(db.getWorkTree(), "sub").mkdir()); <END> File file = new File(db.getWorkTree(), "sub/a.txt"); FileUtils.createNewFile(file); PrintWriter writer = new PrintWriter(file); writer.print("content"); writer.close(); File file2 = new File(db.getWorkTree(), "sub/b.txt"); FileUtils.createNewFile(file2); writer = new PrintWriter(file2); writer.print("content b"); writer.close(); Git git = new Git(db); git.add().addFilepattern("sub").call(); assertEquals( "[sub/a.txt, mode:100644, content:content]" + "[sub/b.txt, mode:100644, content:content b]", indexState(CONTENT)); git.commit().setMessage("commit").call(); File file3 = new File(db.getWorkTree(), "sub/c.txt"); FileUtils.createNewFile(file3); writer = new PrintWriter(file3); writer.print("content c"); writer.close(); writer = new PrintWriter(file); writer.print("modified content"); writer.close(); FileUtils.delete(file2); git.add().addFilepattern("sub").call(); assertEquals( "[sub/a.txt, mode:100644, content:modified content]" + "[sub/b.txt, mode:100644, content:content b]" + "[sub/c.txt, mode:100644, content:content c]", indexState(CONTENT)); }</code><technical_language>FileUtils.mkdirs</technical_language>

Target:
public void testAddWithoutParameterUpdate() throws Exception { FileUtils.mkdir(new File(db.getWorkTree(), "sub")); File file = new File(db.getWorkTree(), "sub/a.txt"); FileUtils.createNewFile(file); PrintWriter writer = new PrintWriter(file); writer.print("content"); writer.close(); File file2 = new File(db.getWorkTree(), "sub/b.txt"); FileUtils.createNewFile(file2); writer = new PrintWriter(file2); writer.print("content b"); writer.close(); Git git = new Git(db); git.add().addFilepattern("sub").call(); assertEquals( "[sub/a.txt, mode:100644, content:content]" + "[sub/b.txt, mode:100644, content:content b]", indexState(CONTENT)); git.commit().setMessage("commit").call(); File file3 = new File(db.getWorkTree(), "sub/c.txt"); FileUtils.createNewFile(file3); writer = new PrintWriter(file3); writer.print("content c"); writer.close(); writer = new PrintWriter(file); writer.print("modified content"); writer.close(); FileUtils.delete(file2); git.add().addFilepattern("sub").call(); assertEquals( "[sub/a.txt, mode:100644, content:modified content]" + "[sub/b.txt, mode:100644, content:content b]" + "[sub/c.txt, mode:100644, content:content c]", indexState(CONTENT)); }
Source:
<code>public List<String> validateResponseAttributes( List<FeedbackResponseAttributes> responses, int numRecipients) { List<String> errors = new ArrayList<String>(); for(FeedbackResponseAttributes response : responses){ boolean validAnswer = false; FeedbackContributionResponseDetails frd = (FeedbackContributionResponseDetails) response.getResponseDetails(); <START> if(frd.getAnswer() <= 200 && frd.getAnswer() >= 0 && frd.getAnswer() % 10 == 0) { <END> validAnswer = true; } if(frd.getAnswer() == Const.POINTS_NOT_SURE){ validAnswer = true; } if(validAnswer == false){ errors.add(ERROR_INVALID_OPTION); } } return errors; }</code><technical_language>meaning of this condition apparent straight away. 'introduce explaining variable' refactoring</technical_language>

Target:
public List<String> validateResponseAttributes( List<FeedbackResponseAttributes> responses, int numRecipients) { List<String> errors = new ArrayList<String>(); for(FeedbackResponseAttributes response : responses){ boolean validAnswer = false; FeedbackContributionResponseDetails frd = (FeedbackContributionResponseDetails) response.getResponseDetails(); boolean isValidRange = frd.getAnswer() >= 0 && frd.getAnswer() <= 200; boolean isMultipleOf10 = frd.getAnswer() % 10 == 0; if(isValidRange && isMultipleOf10) { validAnswer = true; } if(frd.getAnswer() == Const.POINTS_NOT_SURE){ validAnswer = true; } if(validAnswer == false){ errors.add(ERROR_INVALID_OPTION); } } return errors; }
Source:
<code>public static synchronized void stop() throws InterruptedException{ if (m_es != null) { try { <START> m_es.submit(new Runnable() { <END> @Override public void run() }).get(); } catch (Exception e) { Throwables.getRootCause(e).printStackTrace(); } m_es.shutdown(); try { m_es.awaitTermination(365, TimeUnit.DAYS); } catch (InterruptedException e) { throw new RuntimeException("Unable to shutdown ReverseDNSCache", e); } m_es = null; } }</code><technical_language>need this flush</technical_language>

Target:
public static synchronized void stop() throws InterruptedException{ if (m_es != null) { m_es.shutdown(); try { m_es.awaitTermination(365, TimeUnit.DAYS); } catch (InterruptedException e) { throw new RuntimeException("Unable to shutdown ReverseDNSCache", e); } m_es = null; } }
Source:
<code>CassandraDependenciesJob(Builder builder) { this.keyspace = builder.keyspace; this.day = builder.day; SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd"); df.setTimeZone(TimeZone.getTimeZone("UTC")); this.dateStamp = df.format(new Date(builder.day)); this.conf = new SparkConf(true).setMaster(builder.sparkMaster).setAppName(getClass().getName()); conf.set("spark.cassandra.connection.host", parseHosts(builder.contactPoints)); conf.set("spark.cassandra.connection.port", parsePort(builder.contactPoints)); if (builder.localDc != null) conf.set("connection.local_dc", builder.localDc); if (builder.jars != null) conf.setJars(builder.jars); for (Map.Entry<String, String> entry : builder.sparkProperties.entrySet()) { conf.set(entry.getKey(), entry.getValue()); <START> log.info("Spark conf properties: {}={}", entry.getKey(), entry.getValue()); <END> } this.logInitializer = builder.logInitializer; }</code><technical_language>please change debug level in case a sensitive property</technical_language>

Target:
CassandraDependenciesJob(Builder builder) { this.keyspace = builder.keyspace; this.day = builder.day; SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd"); df.setTimeZone(TimeZone.getTimeZone("UTC")); this.dateStamp = df.format(new Date(builder.day)); this.conf = new SparkConf(true).setMaster(builder.sparkMaster).setAppName(getClass().getName()); conf.set("spark.cassandra.connection.host", parseHosts(builder.contactPoints)); conf.set("spark.cassandra.connection.port", parsePort(builder.contactPoints)); if (builder.localDc != null) conf.set("connection.local_dc", builder.localDc); if (builder.jars != null) conf.setJars(builder.jars); for (Map.Entry<String, String> entry : builder.sparkProperties.entrySet()) { conf.set(entry.getKey(), entry.getValue()); log.debug("Spark conf properties: {}={}", entry.getKey(), entry.getValue()); } this.logInitializer = builder.logInitializer; }
Source:
<code>private void visitRecordType(ObjectType type) { emit("{"); Iterator<String> it = getEmittablePropertyNames(type).iterator(); while (it.hasNext()) { String propName = it.next(); JSType propType = type.getPropertyType(propName); <START> if (propType == type) { <END> emitComment("Unsupported circular reference for prop name: " + propName); continue; } if (isValidJSProperty(propName)) { emit(propName); } else { emit("'" + propName + "'"); } UnionType unionType = propType.toMaybeUnionType(); if (unionType != null && unionType .getAlternatesWithoutStructuralTyping() .stream() .anyMatch(JSType::isVoidType)) { emit("?"); visitTypeDeclaration(propType, false, true); } else { visitTypeDeclaration(propType, false, false); } if (it.hasNext()) { emit(","); } } emit("}"); }</code><technical_language>easily a Set of objects acts a stack, i.e. add visiting, remove leave</technical_language>

Target:
private void visitRecordType(ObjectType type) { visitedRecordTypes.add(type); emit("{"); Iterator<String> it = getEmittablePropertyNames(type).iterator(); while (it.hasNext()) { String propName = it.next(); JSType propType = type.getPropertyType(propName); if (visitedRecordTypes.contains(propType)) { emitComment("Unsupported circular reference for prop name: " + propName); continue; } if (isValidJSProperty(propName)) { emit(propName); } else { emit("'" + propName + "'"); } UnionType unionType = propType.toMaybeUnionType(); if (unionType != null && unionType .getAlternatesWithoutStructuralTyping() .stream() .anyMatch(JSType::isVoidType)) { emit("?"); visitTypeDeclaration(propType, false, true); } else { visitTypeDeclaration(propType, false, false); } if (it.hasNext()) { emit(","); } } emit("}"); visitedRecordTypes.remove(type); }
Source:
<code><START> private Pair<String, Boolean> sanitize(String s) { <END> if (s == null) { return new Pair<>(null, false); } StringBuilder sb = new StringBuilder(); boolean ruleApplied = false; for (int i = 0; i < s.length(); i++) { char cur = s.charAt(i); boolean isLegal = true; if (!(44 <= cur && cur <= 57) && !(65 <= cur && cur <= 90) && !(97 <= cur && cur <= 122) && cur != 95) { if (!((i == 0 && cur == 0x2206) || (i == 0 && cur == 0x0394) || (i == 0 && cur == 126))) { isLegal = false; ruleApplied = true; } } sb.append(isLegal ? cur : '-'); } return new Pair<>(sb.toString(), ruleApplied); }</code><technical_language>if this is defined in tier 1 SDK, instead of defining again</technical_language>

Target:
private String sanitize(String s) { if (s == null) { return null; } StringBuilder sb = new StringBuilder(); for (int i = 0; i < s.length(); i++) { char c = s.charAt(i); sb.append(characterIsValid(c) ? c : '-'); } return sb.toString(); }
Source:
<code>public void correctHttpResponse() throws Exception { <START> final PublicMetrics publicMetrics = () -> Collections.singleton(new Metric<Number>("mem.free", 1024)); <END> final ResponseEntity<String> response = responseForMetrics(publicMetrics); assertThat(response.getStatusCode(), equalTo(HttpStatus.OK)); assertThat(response.getHeaders().getContentType().toString(), equalTo("text/plain;version=0.0.4;charset=utf-8")); }</code><technical_language>big deal, put final variables if is explicit good reasons some folks conventions that. leaving out line shorter focuses more attention test code (at risk of shell-game references)</technical_language>

Target:
public void correctHttpResponse() throws Exception { PublicMetrics publicMetrics = () -> Collections.singleton(new Metric<Number>("mem.free", 1024)); ResponseEntity<String> response = responseForMetrics(publicMetrics); assertThat(response.getStatusCode(), equalTo(HttpStatus.OK)); assertThat(response.getHeaders().getContentType().toString(), equalTo("text/plain;version=0.0.4;charset=utf-8")); }
Source:
<code>public <T> Codec<T> getCodec(String codecName, Class<T> objectClass) { <START> if (! codecs.containsKey(codecName)) { <END> return null; } return codecs.get(codecName).getCodec(objectClass); }</code><technical_language>space</technical_language>

Target:
public <T> Codec<T> getCodec(String codecName, Class<T> objectClass) { if (!codecFactories.containsKey(codecName)) { return null; } return codecFactories.get(codecName).newCodec(objectClass); }
Source:
<code>public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException { try { fConfigDir = null; <START> SubMonitor subMonitor = SubMonitor.convert(monitor, "", 4); END> try { preLaunchCheck(configuration, launch, subMonitor.newChild(2)); } catch (CoreException e) { if (e.getStatus().getSeverity() == IStatus.CANCEL) { monitor.setCanceled(true); return; } throw e; } VMRunnerConfiguration runnerConfig = new VMRunnerConfiguration(getMainClass(), getClasspath(configuration)); runnerConfig.setVMArguments(getVMArguments(configuration)); runnerConfig.setProgramArguments(getProgramArguments(configuration)); runnerConfig.setWorkingDirectory(getWorkingDirectory(configuration).getAbsolutePath()); runnerConfig.setEnvironment(getEnvironment(configuration)); runnerConfig.setVMSpecificAttributesMap(getVMSpecificAttributesMap(configuration)); monitor.worked(1); setDefaultSourceLocator(configuration); manageLaunch(launch); IVMRunner runner = getVMRunner(configuration, mode); if (runner != null) runner.run(runnerConfig, launch, monitor); else monitor.setCanceled(true); monitor.done(); } catch (final CoreException e) { monitor.setCanceled(true); throw e; } }</code><technical_language>parameter constructor</technical_language>

Target:
public void launch(ILaunchConfiguration configuration, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException { try { fConfigDir = null; SubMonitor subMonitor = SubMonitor.convert(monitor, 4); try { preLaunchCheck(configuration, launch, subMonitor.newChild(2)); } catch (CoreException e) { if (e.getStatus().getSeverity() == IStatus.CANCEL) { subMonitor.setCanceled(true); return; } throw e; } VMRunnerConfiguration runnerConfig = new VMRunnerConfiguration(getMainClass(), getClasspath(configuration)); runnerConfig.setVMArguments(getVMArguments(configuration)); runnerConfig.setProgramArguments(getProgramArguments(configuration)); runnerConfig.setWorkingDirectory(getWorkingDirectory(configuration).getAbsolutePath()); runnerConfig.setEnvironment(getEnvironment(configuration)); runnerConfig.setVMSpecificAttributesMap(getVMSpecificAttributesMap(configuration)); subMonitor.worked(1); setDefaultSourceLocator(configuration); manageLaunch(launch); IVMRunner runner = getVMRunner(configuration, mode); if (runner != null) runner.run(runnerConfig, launch, subMonitor); else subMonitor.setCanceled(true); } catch (final CoreException e) { throw e; } }
Source:
<code>public <T> ResourceOperations<T> getResourceOperations(Class<T> type) { FileResourceTransactionImpl transaction = getTransaction(); if (transaction.isStarted()) { <START> return (ResourceOperations<T>) transaction; <END> } else { if (File.class.equals(type)) { return (ResourceOperations<T>) DefaultFileOperations.INSTANCE; } else if (Path.class.equals(type)) { return (ResourceOperations<T>) DefaultPathOperations.INSTANCE; } else { throw new IllegalArgumentException("Unsupport resource type [" + type.getName() + "]"); } } }</code><technical_language>if type == Path.class? ClassCastException methods called</technical_language>

Target:
public <T> ResourceOperations<T> getResourceOperations(Class<T> type) { if (File.class.equals(type)) { FileResourceTransactionImpl transaction = getTransaction(); if (transaction.isStarted()) { return (ResourceOperations<T>) transaction; } else { return (ResourceOperations<T>) DefaultFileOperations.INSTANCE; } } else if (Path.class.equals(type)) { return (ResourceOperations<T>) DefaultPathOperations.INSTANCE; } else { throw new IllegalArgumentException("Unsupport resource type [" + type.getName() + "]"); } }
Source:
<code>protected TextField<Integer> newHoursTextField(final String id, IModel<Integer> model, Class<Integer> type) { <START> TextField<Integer> hoursTextField = new TextField<Integer>(id, model, type); <END> hoursTextField.add(getMaximumHours() == 24 ? RangeValidator.range(0, 23) : RangeValidator .range(1, 12)); hoursTextField.setLabel(new Model<>(HOURS)); return hoursTextField; }</code><technical_language>Hi. please diamond operator? try is possible. Thank you</technical_language>

Target:
protected TextField<Integer> newHoursTextField(final String id, IModel<Integer> model, Class<Integer> type) { TextField<Integer> hoursTextField = new TextField<>(id, model, type); hoursTextField.add(getMaximumHours() == 24 ? RangeValidator.range(0, 23) : RangeValidator .range(1, 12)); hoursTextField.setLabel(new Model<>(HOURS)); return hoursTextField; }
Source:
<code>private void onReceiveTimeout(ReceiveTimeout message, ActorRef self, ActorRef sender) throws Exception { if (logger.isInfoEnabled()) { logger.info("Conference Received Timeout, will stop conference now."); } <START> onStopConference(new StopConference(SUPER_ADMIN_ACCOUNT_SID), self, sender); <END> }</code><technical_language>@maria-farooq differentiate StopConference initiated SuperAdmin initiated timer. This is idea, implementation I if sounds feasible investigate</technical_language>

Target:
private void onReceiveTimeout(ReceiveTimeout message, ActorRef self, ActorRef sender) throws Exception { if (logger.isInfoEnabled()) { logger.info("Conference Received Timeout, will stop conference now."); } onStopConference(new StopConference(), self, sender); }
Source:
<code>private static String readFile(File file) throws IOException { Reader in = new BufferedReader(new FileReader(file)); StringBuilder sb = new StringBuilder(); char[] chars = new char[1 << 16]; int length; while ((length = in.read(chars)) > 0) sb.append(chars, 0, length); <START> in.close(); <END> return sb.toString(); }</code><technical_language>do this in a finally block</technical_language>

Target:
private static String readFile(File file) throws IOException { Reader in = new BufferedReader(new FileReader(file)); StringBuilder sb = new StringBuilder(); char[] chars = new char[1 << 16]; int length; try { while ((length = in.read(chars)) > 0) sb.append(chars, 0, length); } finally { in.close(); } return sb.toString(); }
Source:
<code>protected boolean canDoAction() { return isImageExist() && checkOperationIsCorrect() && canFindVmOrTemplate() && isDiskUsedAsOvfStore() && isImageNotLocked() && isSourceAndDestTheSame() && validateSourceStorageDomain() && validateDestStorage() && checkTemplateInDestStorageDomain() && validateSpaceRequirements() && checkCanBeMoveInVm() && checkIfNeedToBeOverride() && setAndValidateDiskProfiles() <START> && verifyShareableDisksMoving(); <END> }</code><technical_language>/s/verifyShareableDisksMoving/validateShareableNotMovedToGluserDomain() i this check reside in validateDestStorage() method</technical_language>

Target:
protected boolean canDoAction() { return isImageExist() && checkOperationIsCorrect() && canFindVmOrTemplate() && isDiskUsedAsOvfStore() && isImageNotLocked() && isSourceAndDestTheSame() && validateSourceStorageDomain() && validateDestStorage() && checkTemplateInDestStorageDomain() && validateSpaceRequirements() && checkCanBeMoveInVm() && checkIfNeedToBeOverride() && setAndValidateDiskProfiles(); }
Source:
<code>public Response add(GlusterVolume volume) { validateParameters(volume, "name", "volumeType", "glusterBricks"); GlusterVolumeEntity volumeEntity = getMapper(GlusterVolume.class, GlusterVolumeEntity.class).map(volume, null); <START> volumeEntity.setClusterId(Guid.createGuidFromString(clusterId)); <END> return performCreation(VdcActionType.CreateGlusterVolume, new CreateGlusterVolumeParameters(volumeEntity), new QueryIdResolver(VdcQueryType.GetGlusterVolumeById, GetGlusterVolumeByIdQueryParameters.class), true); }</code><technical_language>is asGuid helper method. work I for AddVmFromSnapshot BackendVmsResource a reference</technical_language>

Target:
public Response add(GlusterVolume volume) { validateParameters(volume, "name", "volumeType", "glusterBricks"); GlusterVolumeEntity volumeEntity = getMapper(GlusterVolume.class, GlusterVolumeEntity.class).map(volume, null); volumeEntity.setClusterId(asGuid(clusterId)); return performCreation(VdcActionType.CreateGlusterVolume, new CreateGlusterVolumeParameters(volumeEntity), new QueryIdResolver(VdcQueryType.GetGlusterVolumeById, GetGlusterVolumeByIdQueryParameters.class), true); }
Source:
<code>public void update(List<File> files) { containers.clear(); <START> for(File file: files) { <END> ConfigFile containerConfigFile = new CompatibleConfigFileFormat(new File(file, "playonlinux.cfg")); String containerType = containerConfigFile.readValue("containerType"); if(StringUtils.isBlank(containerType)) { containerType = "WinePrefix"; } containers.add(anyContainerFactory.createInstance(containerType, file)); } notifyObservers(this); }</code><technical_language>Please final</technical_language>

Target:
public void update(List<File> files) { containers.clear(); for(File file: files) { final ConfigFile containerConfigFile = new CompatibleConfigFileFormat(new File(file, "playonlinux.cfg")); String containerType = containerConfigFile.readValue("containerType"); if(StringUtils.isBlank(containerType)) { containerType = "WinePrefix"; } containers.add(anyContainerFactory.createInstance(containerType, file)); } notifyObservers(this); }
Source:
<code>private Stringer getStringerForName(Table t, Index indy, String name, int createMediaMask) { if ((name == null) || (name.length() == 0)) return null; Stringer rv; try { t.acquireReadLock(); rv = getStringerForNameWhileLocked(t, indy, name); if (rv != null) return rv; } finally { t.releaseReadLock(); } try { t.acquireWriteLock(); rv = getStringerForNameWhileLocked(t, indy, name); if (rv != null) return rv; rv = new Stringer(getNextWizID()); rv.name = new String(name); <START> rv.ignoreCaseHash = rv.name.toLowerCase().hashCode(); <END> rv.setMediaMask(createMediaMask); t.add(rv, !loading); return rv; } finally { t.releaseWriteLock(); } }</code><technical_language>name instead of rv.name avoid extra dereference</technical_language>

Target:
private Stringer getStringerForName(Table t, Index indy, String name, int createMediaMask) { if ((name == null) || (name.length() == 0)) return null; Stringer rv; try { t.acquireReadLock(); rv = getStringerForNameWhileLocked(t, indy, name); if (rv != null) return rv; } finally { t.releaseReadLock(); } try { t.acquireWriteLock(); rv = getStringerForNameWhileLocked(t, indy, name); if (rv != null) return rv; rv = new Stringer(getNextWizID()); rv.name = new String(name); rv.ignoreCaseHash = name.toLowerCase().hashCode(); rv.setMediaMask(createMediaMask); t.add(rv, !loading); return rv; } finally { t.releaseWriteLock(); } }
Source:
<code><START> public Result getRpcResult() { <END> Result result; try { if (resultFuture.isDone()) { result = resultFuture.get(); } else { result = new RpcResult(); } } catch (Exception e) { logger.error("Got exception when trying to fetch the underlying result of AsyncRpcResult.", e); result = new RpcResult(); } return result; }</code><technical_language>I method simplified public Result getRpcResult() { try { if (resultFuture.isDone()) { return resultFuture.get(); } } catch (Exception e) { // This happen; logger.error("Got exception fetch underlying result of AsyncRpcResult.", e); } return new RpcResult(); } do say</technical_language>

Target:
public Result getRpcResult() { try { if (resultFuture.isDone()) { return resultFuture.get(); } } catch (Exception e) { logger.error("Got exception when trying to fetch the underlying result from AsyncRpcResult.", e); } return new RpcResult(); }
Source:
<code>protected AbstractBeanDefinition doParse(Element element, ParserContext parserContext, String channelName) { BeanDefinitionBuilder listeningMessageProducer = BeanDefinitionBuilder.genericBeanDefinition(CacheListeningMessageProducer.class); IntegrationNamespaceUtils.setValueIfAttributeDefined(listeningMessageProducer, element, EXPRESSION_ATTRIBUTE,PAYLOAD_EXPRESSION_PROPERTY); IntegrationNamespaceUtils.setValueIfAttributeDefined(listeningMessageProducer, element, CACHE_EVENTS_ATTRIBUTE, SUPPORTED_EVENT_TYPES_PROPERTY); if (!element.hasAttribute(REGION_ATTRIBUTE)){ parserContext.getReaderContext().error("'region' attribute is required.",element); } listeningMessageProducer.addConstructorArgReference(element.getAttribute(REGION_ATTRIBUTE)); listeningMessageProducer.addPropertyReference(OUTPUT_CHANNEL_PROPERTY, channelName); IntegrationNamespaceUtils.setReferenceIfAttributeDefined(listeningMessageProducer, element, ERROR_CHANNEL_ATTRIBUTE); if (element.hasAttribute(AUTO_STARTUP)){ IntegrationNamespaceUtils.setValueIfAttributeDefined(listeningMessageProducer, element, AUTO_STARTUP); <START> } <END> return listeningMessageProducer.getBeanDefinition(); }</code><technical_language>here. Revert changes, please</technical_language>

Target:
protected AbstractBeanDefinition doParse(Element element, ParserContext parserContext, String channelName) { BeanDefinitionBuilder listeningMessageProducer = BeanDefinitionBuilder.genericBeanDefinition(CacheListeningMessageProducer.class); IntegrationNamespaceUtils.setValueIfAttributeDefined(listeningMessageProducer, element, EXPRESSION_ATTRIBUTE,PAYLOAD_EXPRESSION_PROPERTY); IntegrationNamespaceUtils.setValueIfAttributeDefined(listeningMessageProducer, element, CACHE_EVENTS_ATTRIBUTE, SUPPORTED_EVENT_TYPES_PROPERTY); if (!element.hasAttribute(REGION_ATTRIBUTE)){ parserContext.getReaderContext().error("'region' attribute is required.",element); } listeningMessageProducer.addConstructorArgReference(element.getAttribute(REGION_ATTRIBUTE)); listeningMessageProducer.addPropertyReference(OUTPUT_CHANNEL_PROPERTY, channelName); IntegrationNamespaceUtils.setReferenceIfAttributeDefined(listeningMessageProducer, element, ERROR_CHANNEL_ATTRIBUTE); return listeningMessageProducer.getBeanDefinition(); }
Source:
<code>public ArrayList loadTests(Context context) { SharedPreferences settings; List tests; settings = context.getSharedPreferences(PREFS_NAME,Context.MODE_PRIVATE); if (settings.contains(TESTS)) { String jsonTests = settings.getString(TESTS, null); Gson gson = new Gson(); NetworkMeasurement[] favoriteItems = gson.fromJson(jsonTests,NetworkMeasurement[].class); tests = Arrays.asList(favoriteItems); tests = new ArrayList(tests); } else return new ArrayList(); <START> return (ArrayList) tests; <END> }</code><technical_language>I remember, works way, need test</technical_language>

Target:
public ArrayList loadTests(Context context) { SharedPreferences settings; List tests; settings = context.getSharedPreferences(PREFS_NAME,Context.MODE_PRIVATE); if (!settings.contains(TESTS)) { return new ArrayList(); } String jsonTests = settings.getString(TESTS, null); Gson gson = new Gson(); NetworkMeasurement[] favoriteItems = gson.fromJson(jsonTests,NetworkMeasurement[].class); tests = Arrays.asList(favoriteItems); tests = new ArrayList(tests); return (ArrayList) tests; }
Source:
<code>private void startSimpleZKServer(CountDownLatch startupDelayLatch) throws IOException { zks = new SimpleZooKeeperServer(tmpDir, tmpDir, 3000, startupDelayLatch); SyncRequestProcessor.setSnapCount(100); final int PORT = Integer.parseInt(HOSTPORT.split(":")[1]); servcnxnf = ServerCnxnFactory.createFactory(PORT, -1); Thread startupThread = new Thread() { public void run() { try { servcnxnf.startup(zks); <START> } catch (IOException | InterruptedException e) { <END> LOG.error("Unexcepted exception during server startup", e); } }; }; LOG.info("Starting zk server {}", HOSTPORT); startupThread.start(); }</code><technical_language>a multi-catch Java 6, is earliest version support in docs</technical_language>

Target:
private void startSimpleZKServer(CountDownLatch startupDelayLatch) throws IOException { zks = new SimpleZooKeeperServer(tmpDir, tmpDir, 3000, startupDelayLatch); SyncRequestProcessor.setSnapCount(100); final int PORT = Integer.parseInt(HOSTPORT.split(":")[1]); servcnxnf = ServerCnxnFactory.createFactory(PORT, -1); Thread startupThread = new Thread() { public void run() { try { servcnxnf.startup(zks); } catch (IOException e) { LOG.error("Unexcepted exception during server startup", e); } catch (InterruptedException e) { LOG.error("Unexcepted exception during server startup", e); } }; }; LOG.info("Starting zk server {}", HOSTPORT); startupThread.start(); }
Source:
<code>public int getPartitionsCount() { if (m_wrapper != null) { <START> return m_wrapper.getConfigsCount(); <END> } else { return 0; } }</code><technical_language>return count for m_wrapper? need add count for wrap in m_bundles? This works for class-based importers, (i.e. socket importer), right</technical_language>

Target:
public int getPartitionsCount() { int count = 0; for (BundleWrapper wapper : m_bundles.values()) { if (wapper != null) { count += wapper.getConfigsCount(); } } return count; }
Source:
<code>public static Collection<Descriptor> getSortedDescriptorsForGlobalConfig(Predicate<GlobalConfigurationCategory> predicate) { ExtensionList<Descriptor> exts = ExtensionList.lookup(Descriptor.class); List<Tag> r = new ArrayList<>(exts.size()); for (ExtensionComponent<Descriptor> c : exts.getComponents()) { Descriptor d = c.getInstance(); if (d.getGlobalConfigPage()==null) continue; if (predicate.apply(d.getCategory())) { r.add(new Tag(c.ordinal(), d)); } } Collections.sort(r); List<Descriptor> answer = new ArrayList<>(r.size()); for (Tag d : r) answer.add(d.d); <START> return GlobalConfiguration.GlobalConfigHiddenByPermissionFilter.apply(Jenkins.get(),answer); <END> }</code><technical_language>filtered for Visibility. If GlobalConfigHiddenByPermissionFilter iot is clear name of class (it implied filter based if permission OK)</technical_language>

Target:
public static Collection<Descriptor> getSortedDescriptorsForGlobalConfig(Predicate<GlobalConfigurationCategory> predicate) { ExtensionList<Descriptor> exts = ExtensionList.lookup(Descriptor.class); List<Tag> r = new ArrayList<>(exts.size()); for (ExtensionComponent<Descriptor> c : exts.getComponents()) { Descriptor d = c.getInstance(); if (d.getGlobalConfigPage()==null) continue; if (predicate.apply(d.getCategory())) { r.add(new Tag(c.ordinal(), d)); } } Collections.sort(r); List<Descriptor> answer = new ArrayList<>(r.size()); for (Tag d : r) answer.add(d.d); return DescriptorVisibilityFilter.apply(Jenkins.get(),answer); }
Source:
<code>public String toString() { <START> String response = this.getResult() != null ? "result " + this.getResult().toString() : "error " + this.getError().toString(); <END> return "Response with " + this.getId() + " id containing " + response; }</code><technical_language>remove whitespace. s/id/ID</technical_language>

Target:
public String toString() { String response = this.getResult() != null ? "result " + this.getResult().toString() : "error " + this.getError().toString(); return "Response with " + this.getId() + " ID containing " + response; }
Source:
<code>protected boolean canDoAction() { if (getParameters().getParametersList().isEmpty()) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_NO_DISKS_SPECIFIED); <START> } else { <END> return verifyShareableDisksMoving(); } }</code><technical_language>else is redundant - unwrap (project's style)</technical_language>

Target:
protected boolean canDoAction() { if (getParameters().getParametersList().isEmpty()) { return failCanDoAction(VdcBllMessages.ACTION_TYPE_FAILED_NO_DISKS_SPECIFIED); } return verifyShareableDisksMoving(); }
Source:
<code>@Test public void testJsonReplace() { checkExp("json_replace('{ \"a\": 1, \"b\": [2]}', '$.a', 10, '$.c', '[true]')"); checkExpType("json_replace('{ \"a\": 1, \"b\": [2]}', '$.a', 10, '$.c', '[true]')", <START> "VARCHAR(2000)"); <END> checkFails("select ^json_replace('{\"foo\":\"bar\"}')^", "(?s).*Invalid number of arguments.*"); }</code><technical_language>indents incorrect</technical_language>

Target:
@Test public void testJsonReplace() { expr("json_replace('{ \"a\": 1, \"b\": [2]}', '$.a', 10, '$.c', '[true]')").ok(); expr("json_replace('{ \"a\": 1, \"b\": [2]}', '$.a', 10, '$.c', '[true]')") .columnType("VARCHAR(2000)"); expr("select ^json_replace('{\"foo\":\"bar\"}')^") .fails("(?s).*Invalid number of arguments.*"); }
Source:
<code>public void validate() { if (Strings.isNullOrEmpty(uf.server)) { throw new RuntimeConfigurationException("Server address required"); } try { new URL(uf.server); } catch (MalformedURLException e) { throw new RuntimeConfigurationException("Provided server address is not a valid URL", e); } if (!Strings.isNullOrEmpty(uf.solrServer)) { try { new URL(uf.solrServer); } catch (MalformedURLException e) { throw new RuntimeConfigurationException("Provided solr server address is not a valid URL", e); } } if (!Strings.isNullOrEmpty(uf.memcachedHost) && uf.memcachedPort == null) { throw new RuntimeConfigurationException("No memcachedPort specified"); } if (!Strings.isNullOrEmpty(uf.memcachedHost) && Strings.isNullOrEmpty(uf.cacheAppPrefix)) { throw new RuntimeConfigurationException("If memcachedHost is specified, cacheAppPrefix must be as well"); } if ((uf.devModeAssets == null || !uf.devModeAssets) && Strings.isNullOrEmpty(uf.compiledAssetDir)) { throw new RuntimeConfigurationException("If devModeAssets is false, compiledAssetDir must be specified"); } if (!Strings.isNullOrEmpty(uf.casLogoutUrl) && !Strings.isNullOrEmpty(uf.casLogoutServiceUrl)) { try { this.casLogoutUrl = uf.casLogoutUrl + "?service=" + URLEncoder.encode(uf.casLogoutServiceUrl, "UTF-8"); } catch (UnsupportedEncodingException e) { <START> this.casLogoutUrl = uf.casLogoutUrl + "?service=" + URLEncoder.encode(uf.casLogoutServiceUrl); <END> } } }</code><technical_language>rethrow (i.e., "throw new RuntimeException(e);"). "UTF-8" supported</technical_language>

Target:
public void validate() { if (Strings.isNullOrEmpty(uf.server)) { throw new RuntimeConfigurationException("Server address required"); } try { new URL(uf.server); } catch (MalformedURLException e) { throw new RuntimeConfigurationException("Provided server address is not a valid URL", e); } if (!Strings.isNullOrEmpty(uf.solrServer)) { try { new URL(uf.solrServer); } catch (MalformedURLException e) { throw new RuntimeConfigurationException("Provided solr server address is not a valid URL", e); } } if (!Strings.isNullOrEmpty(uf.memcachedHost) && uf.memcachedPort == null) { throw new RuntimeConfigurationException("No memcachedPort specified"); } if (!Strings.isNullOrEmpty(uf.memcachedHost) && Strings.isNullOrEmpty(uf.cacheAppPrefix)) { throw new RuntimeConfigurationException("If memcachedHost is specified, cacheAppPrefix must be as well"); } if ((uf.devModeAssets == null || !uf.devModeAssets) && Strings.isNullOrEmpty(uf.compiledAssetDir)) { throw new RuntimeConfigurationException("If devModeAssets is false, compiledAssetDir must be specified"); } if (!Strings.isNullOrEmpty(uf.casLogoutUrl) && !Strings.isNullOrEmpty(uf.casLogoutServiceUrl)) { try { this.casLogoutUrl = uf.casLogoutUrl + "?service=" + URLEncoder.encode(uf.casLogoutServiceUrl, Charsets.UTF_8.name()); } catch (UnsupportedEncodingException e) { throw new RuntimeException(e); } } }
Source:
<code>protected void setActionMessageParameters() { <START> super.setActionMessageParameters(); <END> addValidationMessages(EngineMessage.VAR__ACTION__TRANSFER, EngineMessage.VAR__TYPE__IMAGE); }</code><technical_language>need call super, extend CommandBase</technical_language>

Target:
protected void setActionMessageParameters() { addValidationMessages(EngineMessage.VAR__ACTION__TRANSFER, EngineMessage.VAR__TYPE__DISK); }
Source:
<code>private Checkpoint getActivationCheckpoint(PTOperator oper) { <START> if ((oper.recoveryCheckpoint == null || oper.recoveryCheckpoint == Checkpoint.INITIAL_CHECKPOINT) && oper.checkpoints.isEmpty()) { <END> Checkpoint activationCheckpoint = Checkpoint.INITIAL_CHECKPOINT; for (PTInput input : oper.inputs) { PTOperator sourceOper = input.source.source; if (sourceOper.checkpoints.isEmpty()) { return getActivationCheckpoint(sourceOper); } activationCheckpoint = Checkpoint.max(activationCheckpoint, sourceOper.recoveryCheckpoint); } return activationCheckpoint; } return oper.recoveryCheckpoint; }</code><technical_language>supposed noop for initialized operator. is recoveryCheckpoint assigned in case? is assumption in initPartitioning correct</technical_language>

Target:
private Checkpoint getActivationCheckpoint(PTOperator oper) { if (oper.recoveryCheckpoint == null && oper.checkpoints.isEmpty()) { Checkpoint activationCheckpoint = Checkpoint.INITIAL_CHECKPOINT; for (PTInput input : oper.inputs) { PTOperator sourceOper = input.source.source; Checkpoint checkpoint = sourceOper.recoveryCheckpoint; if (sourceOper.checkpoints.isEmpty()) { checkpoint = getActivationCheckpoint(sourceOper); } activationCheckpoint = Checkpoint.max(activationCheckpoint, checkpoint); } return activationCheckpoint; } return oper.recoveryCheckpoint; }