auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>private void start() { for (InetAddress address : getAllInetAddresses()) { createJmDNSByAddress(address); } <START> for (ServiceDescription description : activeServices) { <END> try { registerService(description); } catch (IOException e) { } } }</code><technical_language>is weird here. place is added activeServices is registerService method, is called in this loop. assumption this set is empty get here, resp. registerServicemethod called for service in question. I missing</technical_language>

Target:
private void start() { for (InetAddress address : getAllInetAddresses()) { createJmDNSByAddress(address); } for (ServiceDescription description : activeServices) { try { registerServiceInternal(description); } catch (IOException e) { logger.warn("Exception while registering service {}", description, e); } } }
Source:
<code>public Set<GitObject> getTags() throws GitException, InterruptedException { ArgumentListBuilder args = new ArgumentListBuilder("show-ref", "--tags", "-d"); String result; try { result = launchCommandIn(args, workspace); } catch (GitException ge) { result = ""; } <START> String[] output = result.split("[\\n\\r]"); <END> if (output.length == 0 || (output.length == 1 && output[0].isEmpty())) { return new HashSet<>(); } Pattern pattern = Pattern.compile("(\\p{XDigit}{40})\\s+refs/tags/([^\\^]*)(\\^\\{\\})?"); Map<String, ObjectId> tagMap = new HashMap<>(); for (String line : output) { Matcher matcher = pattern.matcher(line); if (!matcher.find()) { String message = MessageFormat.format( "git show-ref --tags -d output not matched in line: {0}", line); listener.getLogger().println(message); continue; } String sha1String = matcher.group(1); String tagName = matcher.group(2); String trailingText = matcher.group(3); boolean isPeeledRef = false; if (trailingText != null && trailingText.equals("^{}")) { isPeeledRef = true; } if (isPeeledRef || !tagMap.containsKey(tagName)) { tagMap.put(tagName, ObjectId.fromString(sha1String)); } } Set<GitObject> tags = new HashSet<>(tagMap.size()); for (Map.Entry<String, ObjectId> entry : tagMap.entrySet()) { tags.add(new GitObject(entry.getKey(), entry.getValue())); } return tags; }</code><technical_language>If output CRLF, this result in "empty" lines warnings down, [\\n\\r]+ instead</technical_language>

Target:
public Set<GitObject> getTags() throws GitException, InterruptedException { ArgumentListBuilder args = new ArgumentListBuilder("show-ref", "--tags", "-d"); String result; try { result = launchCommandIn(args, workspace); } catch (GitException ge) { result = ""; } String[] output = result.split("[\\n\\r]+"); if (output.length == 0 || (output.length == 1 && output[0].isEmpty())) { return Collections.EMPTY_SET; } Pattern pattern = Pattern.compile("(\\p{XDigit}{40})\\s+refs/tags/([^^]+)(\\^\\{\\})?"); Map<String, ObjectId> tagMap = new HashMap<>(); for (String line : output) { Matcher matcher = pattern.matcher(line); if (!matcher.find()) { String message = MessageFormat.format( "git show-ref --tags -d output not matched in line: {0}", line); listener.getLogger().println(message); continue; } String sha1String = matcher.group(1); String tagName = matcher.group(2); String trailingText = matcher.group(3); boolean isPeeledRef = false; if (trailingText != null && trailingText.equals("^{}")) { isPeeledRef = true; } if (isPeeledRef || !tagMap.containsKey(tagName)) { tagMap.put(tagName, ObjectId.fromString(sha1String)); } } Set<GitObject> tags = new HashSet<>(tagMap.size()); for (Map.Entry<String, ObjectId> entry : tagMap.entrySet()) { tags.add(new GitObject(entry.getKey(), entry.getValue())); } return tags; }
Source:
<code><START> public boolean remove(Object o) { <END> if (! (o instanceof AbstractDomainObject)) { return false; } if (contains(o)) { remove(((T)o).getOid()); return true; } else { return false; } }</code><technical_language>I potential for error remove overloaded. try remove Object a Comparable? run remove(Comparable), is expecting a key, a remove. I if implement Set interface, previous remove renamed (suggestion removeKey). for BPlusTreeArray new collections</technical_language>

Target:
public boolean remove(Object o) { if (! (o instanceof AbstractDomainObject)) { return false; } if (contains(o)) { removeKey(((T)o).getOid()); return true; } else { return false; } }
Source:
<code>private boolean otherBranchCommit(Change change, PatchSet patchSet) throws RepositoryNotFoundException, IOException, PatchSetInfoNotAvailableException { Repository git = repoManager.openRepository(change.getProject()); String targetBranch = change.getDest().get(); try { RefDatabase refDb = git.getRefDatabase(); RevWalk rw = new RevWalk(git); RevCommit pushedCommit = rw.parseCommit(ObjectId.fromString(patchSet.getRevision().get())); RevCommit mergeBase; RevFilter oldRevFilter = rw.getRevFilter(); <START> try { rw.reset(); rw.setRevFilter(RevFilter.MERGE_BASE); rw.markStart(pushedCommit); Ref targetRef = refDb.getRef(targetBranch); RevCommit target = rw.parseCommit(targetRef.getObjectId()); rw.markStart(target); if (rw.next() != null) { mergeBase = rw.next(); } else { return true; } } finally { rw.reset(); rw.setRevFilter(oldRevFilter); } try { rw.markStart(pushedCommit); Collection<Ref> branches = refDb.getRefs(Constants.R_HEADS).values(); for (Ref branch : branches) { if (!branch.getObjectId().equals(mergeBase)) { rw.markUninteresting(rw.parseCommit(branch.getObjectId())); } } for (RevCommit n; (n = rw.next()) != null;) { if (n.equals(mergeBase)) { return false; } } return true; } finally { rw.release(); } } finally { git.close(); } <END> }</code><technical_language>catch blocks? return if exception in here</technical_language>

Target:
private boolean otherBranchCommit(Change change, PatchSet patchSet) throws RepositoryNotFoundException, IOException, PatchSetInfoNotAvailableException { Repository git = repoManager.openRepository(change.getProject()); String targetBranch = change.getDest().get(); try { RefDatabase refDb = git.getRefDatabase(); RevWalk rw = new RevWalk(git); RevCommit pushedCommit = rw.parseCommit(ObjectId.fromString(patchSet.getRevision().get())); RevCommit mergeBase; RevFilter oldRevFilter = rw.getRevFilter(); try { rw.reset(); rw.setRevFilter(RevFilter.MERGE_BASE); rw.markStart(pushedCommit); Ref targetRef = refDb.getRef(targetBranch); RevCommit target = rw.parseCommit(targetRef.getObjectId()); rw.markStart(target); if (rw.next() != null) { mergeBase = rw.next(); } else { return true; } } catch (IOException e) { throw new PatchSetInfoNotAvailableException(e); } finally { rw.reset(); rw.setRevFilter(oldRevFilter); } try { rw.markStart(pushedCommit); Collection<Ref> branches = refDb.getRefs(Constants.R_HEADS).values(); for (Ref branch : branches) { if (!branch.getObjectId().equals(mergeBase)) { rw.markUninteresting(rw.parseCommit(branch.getObjectId())); } } for (RevCommit n; (n = rw.next()) != null;) { if (n.equals(mergeBase)) { return false; } } return true; } catch (IOException e) { throw new PatchSetInfoNotAvailableException(e); } finally { rw.release(); } } catch (IOException e) { throw new PatchSetInfoNotAvailableException(e); } finally { git.close(); } }
Source:
<code>public void initialize(InputSplit genericSplit, TaskAttemptContext context) throws IOException, InterruptedException { String group = "LzoB64Lines of " + typeRef_.getRawClass().getName(); linesReadCounter = HadoopUtils.getCounter(context, group, "Lines Read"); recordsReadCounter = HadoopUtils.getCounter(context, group, "Records Read"); recordErrorsCounter = HadoopUtils.getCounter(context, group, "Errors"); emptyLinesCounter = HadoopUtils.getCounter(context, group, "Empty Lines"); truncatedLinesCounter = HadoopUtils.getCounter(context, group, "Truncated Lines"); <START> recordsSkippedCounter = HadoopUtils.getCounter(context, group, "Null Records Skipped"); <END> super.initialize(genericSplit, context); }</code><technical_language>"Records Skipped" (this for reason, e.g. dropped a push filter). "Records Skipped Converter"</technical_language>

Target:
public void initialize(InputSplit genericSplit, TaskAttemptContext context) throws IOException, InterruptedException { String group = "LzoB64Lines of " + typeRef_.getRawClass().getName(); linesReadCounter = HadoopUtils.getCounter(context, group, "Lines Read"); recordsReadCounter = HadoopUtils.getCounter(context, group, "Records Read"); recordErrorsCounter = HadoopUtils.getCounter(context, group, "Errors"); emptyLinesCounter = HadoopUtils.getCounter(context, group, "Empty Lines"); truncatedLinesCounter = HadoopUtils.getCounter(context, group, "Truncated Lines"); recordsSkippedCounter = HadoopUtils.getCounter(context, group, "Records Skipped by Converter"); super.initialize(genericSplit, context); }
Source:
<code>public Response exportBranches(BranchExportOptions options) { setUpHttpHeaders(); List<IOseeBranch> branches = getExportImportBranches(options.getBranchUuids()); PropertyStore exportOptions = new PropertyStore(); addOption(exportOptions, ExportOptions.MIN_TXS, options.getMinTx()); addOption(exportOptions, ExportOptions.MAX_TXS, options.getMaxTx()); addOption(exportOptions, ExportOptions.COMPRESS, options.isCompress()); Callable<URI> op = getBranchOps().exportBranch(branches, exportOptions, options.getFileName()); URI exportURI = executeCallable(op); UriInfo uriInfo = getUriInfo(); <START> URI location = getExchangeExportUri(uriInfo, exportURI, options.isCompress()); <END> activityLog.createEntry(BRANCH_OPERATION_TYPEID, ActivityLog.INITIAL_STATUS, String.format("Branch Operation Export Branches {branchUUID(s): %s accountId: %s serverId: %s, clientId: %s}", branches.toString(), accountId, serverId, clientId)); return Response.created(location).build(); }</code><technical_language>try/catch</technical_language>

Target:
public Response exportBranches(BranchExportOptions options) { List<IOseeBranch> branches = getExportImportBranches(options.getBranchUuids()); PropertyStore exportOptions = new PropertyStore(); addOption(exportOptions, ExportOptions.MIN_TXS, options.getMinTx()); addOption(exportOptions, ExportOptions.MAX_TXS, options.getMaxTx()); addOption(exportOptions, ExportOptions.COMPRESS, options.isCompress()); Callable<URI> op = getBranchOps().exportBranch(branches, exportOptions, options.getFileName()); URI exportURI = executeCallable(op); UriInfo uriInfo = getUriInfo(); URI location = getExchangeExportUri(uriInfo, exportURI, options.isCompress()); try { activityLog.createEntry(BRANCH_OPERATION_TYPEID, ActivityLog.INITIAL_STATUS, String.format( "Branch Operation Export Branches {branchUUID(s): %s accountId: %s serverId: %s, clientId: %s}", branches.toString(), RestUtil.getAccountId(httpHeaders), RestUtil.getServerId(httpHeaders), RestUtil.getClientId(httpHeaders))); } catch (OseeCoreException ex) { OseeLog.log(ActivityLog.class, OseeLevel.SEVERE_POPUP, ex); } return Response.created(location).build(); }
Source:
<code>private void extractDetailedAttributes(Map attr) { String lNum = attr.get("lineNumber").toString(); Integer lineNumber = Integer.parseInt(lNum); String line = lines.get(lineNumber); attributeMetadata.add(fCOMMENT); while (line.length() > 0) { <START> <END> setHeaders(attr,line); attributeMetadata.add(fCOMMENT + line); line = lines.get(lineNumber); lineNumber ++; setEndOfVariableBlock(lineNumber); } }</code><technical_language>Empty line - remove</technical_language>

Target:
private void extractDetailedAttributes(Map attr) { String lNum = attr.get("lineNumber").toString(); Integer lineNumber = Integer.parseInt(lNum); String line = lines.get(lineNumber); attributeMetadata.add(COMMENT); while (line.length() > 0) { setHeaders(attr,line); attributeMetadata.add(COMMENT + line); line = lines.get(lineNumber); lineNumber ++; setEndOfVariableBlock(lineNumber); } }
Source:
<code>public void elasticSearchQueryWithFilter(String indexName, String mappingName, String columnName ,String filterType, String value){ commonspec.getLogger().info("Executing query over " + indexName + "/" + mappingName + " over column " + columnName); try { commonspec.setElasticsearchResults( commonspec.getElasticSearchClient() .searchSimpleFilterElasticsearchQuery(indexName, mappingName, columnName, value, filterType) ); }catch(Exception e){ <START> commonspec.getLogger().error("Exception captured"); <END> commonspec.getLogger().error(e.toString()); commonspec.getExceptions().add(e); } }</code><technical_language>Exception logging for cassandra mongo is a info level</technical_language>

Target:
public void elasticSearchQueryWithFilter(String indexName, String mappingName, String columnName ,String filterType, String value){ commonspec.getLogger().info("Executing query over " + indexName + "/" + mappingName + " over column " + columnName); try { commonspec.setElasticsearchResults( commonspec.getElasticSearchClient() .searchSimpleFilterElasticsearchQuery(indexName, mappingName, columnName, value, filterType) ); }catch(Exception e){ commonspec.getLogger().info("Exception captured"); commonspec.getLogger().info(e.toString()); commonspec.getExceptions().add(e); } }
Source:
<code>public void testStreamTapSingleProcessor() { String data = UUID.randomUUID().toString(); stream("dataSender", <START> sources.http() + XD_DELIMETER + processors.transform().expression("payload.toUpperCase()") <END> + XD_DELIMETER + sinks.log(), WAIT_TIME); stream(sources.tap("dataSender").moduleName("transform") + XD_TAP_DELIMETER + sinks.file()); waitForXD(); sources.http().postData(data); assertValid(data.toUpperCase(), sinks.file()); }</code><technical_language>catching this now, is a typo - be: "delimiter"</technical_language>

Target:
public void testStreamTapSingleProcessor() { String data = UUID.randomUUID().toString(); stream("dataSender", sources.http() + XD_DELIMITER + processors.transform().expression("payload.toUpperCase()") + XD_DELIMITER + sinks.log(), WAIT_TIME); stream(sources.tap("dataSender").moduleName("transform") + XD_TAP_DELIMITER + sinks.file()); waitForXD(); sources.http().postData(data); assertValid(data.toUpperCase(), sinks.file()); }
Source:
<code>public int hashCode() { return Objects.hash( forceMigrationForNonMigratableVm, getVmId(), targetVdsGroupId ); <START> } <END></code><technical_language>is good - I add a field in VmOperationParameterBase need classes inherit add new field in hashCode</technical_language>

Target:
public int hashCode() { return Objects.hash( super.hashCode(), forceMigrationForNonMigratableVm, targetVdsGroupId ); }
Source:
<code>public void testRebaseShouldLeaveWorkspaceUntouchedWithUnstagedChangesConflict() throws Exception { writeTrashFile(FILE1, "initial file"); git.add().addFilepattern(FILE1).call(); RevCommit initial = git.commit().setMessage("initial commit").call(); createBranch(initial, "refs/heads/side"); writeTrashFile(FILE1, "updated file"); git.add().addFilepattern(FILE1).call(); git.commit().setMessage("updated FILE1 on master").call(); checkoutBranch("refs/heads/side"); writeTrashFile(FILE1, "side update"); git.add().addFilepattern(FILE1).call(); git.commit().setMessage("updated FILE1 on side").call(); File theFile = writeTrashFile(FILE1, "dirty the file"); RebaseResult rebaseResult = git.rebase() .setUpstream("refs/heads/master").call(); assertEquals(rebaseResult.getStatus(), Status.CONFLICTS); assertEquals(rebaseResult.getConflicts().size(), 1); assertEquals(rebaseResult.getConflicts().get(0), FILE1); <START> <END> checkFile(theFile, "dirty the file"); assertEquals(RepositoryState.SAFE, git.getRepository() .getRepositoryState()); }</code><technical_language>assertEquals(excpected, actual)</technical_language>

Target:
public void testRebaseShouldLeaveWorkspaceUntouchedWithUnstagedChangesConflict() throws Exception { writeTrashFile(FILE1, "initial file"); git.add().addFilepattern(FILE1).call(); RevCommit initial = git.commit().setMessage("initial commit").call(); createBranch(initial, "refs/heads/side"); writeTrashFile(FILE1, "updated file"); git.add().addFilepattern(FILE1).call(); git.commit().setMessage("updated FILE1 on master").call(); checkoutBranch("refs/heads/side"); writeTrashFile(FILE1, "side update"); git.add().addFilepattern(FILE1).call(); git.commit().setMessage("updated FILE1 on side").call(); File theFile = writeTrashFile(FILE1, "dirty the file"); RebaseResult rebaseResult = git.rebase() .setUpstream("refs/heads/master").call(); assertEquals(Status.CONFLICTS, rebaseResult.getStatus()); assertEquals(1, rebaseResult.getConflicts().size()); assertEquals(FILE1, rebaseResult.getConflicts().get(0)); checkFile(theFile, "dirty the file"); assertEquals(RepositoryState.SAFE, git.getRepository() .getRepositoryState()); }
Source:
<code>public int compareTo(ModuleMetadata other) { <START> return this.getName().compareTo(other.getName()); <END> }</code><technical_language>include other properties break ties</technical_language>

Target:
public int compareTo(ModuleMetadata other) { return this.getId().compareTo(other.getId()); }
Source:
<code>public void initialize() { <START> mean = ops().computer(Mean.class, new DoubleType(), in().getB()); <END> stdDeviation = ops().computer(StdDev.class, new DoubleType(), in().getB()); }</code><technical_language>able Double.class instead of new DoubleType() here</technical_language>

Target:
public void initialize() { mean = ops().computer(Mean.class, DoubleType.class, in().getB()); stdDeviation = ops().computer(StdDev.class, DoubleType.class, in().getB()); }
Source:
<code>private void closeWriterQuietly() { try { if (writer != null) { writer.close(); } <START> } catch (IOException e) { <END> LOG.error("Error closing writer. {}", e.getMessage(), e); } writer = null; }</code><technical_language>this catch (Throwable t)</technical_language>

Target:
private void closeWriterQuietly() { try { if (writer != null) { writer.close(); } } catch (Throwable t) { LOG.error("Error closing writer. {}", t.getMessage(), t); } writer = null; }
Source:
<code>public void setUp() throws Exception { port = PortAssignment.unique(); <START> localServerAddress = new InetSocketAddress("localhost", port); <END> System.setProperty(ServerCnxnFactory.ZOOKEEPER_SERVER_CNXN_FACTORY, "org.apache.zookeeper.server.NettyServerCnxnFactory"); System.setProperty(ZKClientConfig.ZOOKEEPER_CLIENT_CNXN_SOCKET, "org.apache.zookeeper.ClientCnxnSocketNetty"); System.setProperty(ZKClientConfig.SECURE_CLIENT, "true"); x509Util = new ClientX509Util(); x509TestContext.setSystemProperties(x509Util, KeyStoreFileType.JKS, KeyStoreFileType.JKS); }</code><technical_language>InetAddress.getLoopbackAddress()</technical_language>

Target:
public void setUp() throws Exception { localServerAddress = new InetSocketAddress(InetAddress.getLoopbackAddress(), PortAssignment.unique()); x509Util = new ClientX509Util(); x509TestContext.setSystemProperties(x509Util, KeyStoreFileType.JKS, KeyStoreFileType.JKS); }
Source:
<code>public void testGetCursor() { final TestDao dao = getDao(); final Cursor cursor = dao.getCursor(Query.select(Root.class)); <START> assertThat(cursor.getColumnName(0), is("_id")); <END> assertThat(cursor.getColumnName(1), is("test")); }</code><technical_language>I change this test ensure default columns present, in a specific position. so, like: assertThat(cursor.getColumnIndex(COLUMN_ID), is(not(-1)))</technical_language>

Target:
public void testGetCursor() { final TestDao dao = getDao(); final Cursor cursor = dao.getCursor(Query.select(Root.class)); assertThat(cursor.getColumnIndex(RootTable.COLUMN_ID), is(not(-1))); assertThat(cursor.getColumnIndex(RootTable.COLUMN_TEST), is(not(-1))); }
Source:
<code>private TablePopulationRequirements getMVHandlerInfoMessage(MaterializedViewHandlerInfo mvh) { <START> TablePopulationRequirements retval; <END> if ( ! mvh.getIssafewithnonemptysources()) { String viewName = mvh.getDesttable().getTypeName(); String errorMessage = createViewDisallowedMessage(viewName, null); retval = new TablePopulationRequirements(viewName); retval.setErrorMessage(errorMessage); for (TableRef tref : mvh.getSourcetables()) { String tableName = tref.getTable().getTypeName(); if ( ! m_newTables.contains(tableName)) { retval.addTableName(tableName); } } return retval; } return null; }</code><technical_language>Merge declaration block-scoped initialization statement (first use)</technical_language>

Target:
private TablePopulationRequirements getMVHandlerInfoMessage(MaterializedViewHandlerInfo mvh) { TablePopulationRequirements retval; if ( ! mvh.getIssafewithnonemptysources()) { String viewName = mvh.getDesttable().getTypeName(); String errorMessage = createViewDisallowedMessage(viewName, null); retval = new TablePopulationRequirements(viewName); retval.setErrorMessage(errorMessage); for (TableRef tref : mvh.getSourcetables()) { String tableName = tref.getTable().getTypeName(); retval.addTableName(tableName); } return retval; } return null; }
Source:
<code>public void add(ConstrainedElement constrainedElement) { constraints.addAll( adaptConstraints( constrainedElement.getKind(), constrainedElement.getConstraints() ) ); constraints.addAll( adaptConstraints( constrainedElement.getKind(), new HashSet<>( constrainedElement.getTypeArgumentConstraints().values() ) ) ); isCascading = isCascading || constrainedElement.isCascading(); if ( unwrapMode == null || constrainedElement.getSource().getPriority() > unwrapModeSource.getPriority() ) { unwrapMode = constrainedElement.unwrapMode(); <START> unwrapModeSource = constrainedElement.getSource(); <END> } addGroupConversions( constrainedElement.getGroupConversions() ); }</code><technical_language>This is a bugfix, it? related patch</technical_language>

Target:
public void add(ConstrainedElement constrainedElement) { constraints.addAll( adaptConstraints( constrainedElement.getKind(), constrainedElement.getConstraints() ) ); constraints.addAll( adaptConstraints( constrainedElement.getKind(), constrainedElement.getTypeArgumentConstraints() ) ); isCascading = isCascading || constrainedElement.isCascading(); if ( unwrapMode == null || constrainedElement.getSource().getPriority() > unwrapModeSource.getPriority() ) { unwrapMode = constrainedElement.unwrapMode(); unwrapModeSource = constrainedElement.getSource(); } addGroupConversions( constrainedElement.getGroupConversions() ); }
Source:
<code>protected Object getFieldValue(ITmfEvent event, String field) { Object value = null; if (ITmfEvent.EVENT_FIELD_CONTENT.equals(field)) { value = event.getContent().toString(); } else if (ITmfEvent.EVENT_FIELD_TYPE.equals(field)) { value = event.getType().getName(); } else if (ITmfEvent.EVENT_FIELD_TIMESTAMP.equals(field)) { value = event.getTimestamp().toString(); } else if (ITmfEvent.EVENT_FIELD_SOURCE.equals(field)) { value = event.getSource(); } else if (ITmfEvent.EVENT_FIELD_REFERENCE.equals(field)) { value = event.getReference(); } else { ITmfEventField eventField; if (!(field.startsWith(SLASH_STRING))) { eventField = event.getContent().getField(field); } else { List<String> list = getPathList(field); ITmfEventField topField = event.getContent(); <START> eventField = getSubField(topField, list); <END> } if (eventField != null) { value = eventField.getValue(); } } return value; }</code><technical_language>is a method, ITmfEventField.getSubField(String...)</technical_language>

Target:
protected Object getFieldValue(ITmfEvent event, String field) { Object value = null; if (ITmfEvent.EVENT_FIELD_CONTENT.equals(field)) { value = event.getContent().toString(); } else if (ITmfEvent.EVENT_FIELD_TYPE.equals(field)) { value = event.getType().getName(); } else if (ITmfEvent.EVENT_FIELD_TIMESTAMP.equals(field)) { value = event.getTimestamp().toString(); } else if (ITmfEvent.EVENT_FIELD_SOURCE.equals(field)) { value = event.getSource(); } else if (ITmfEvent.EVENT_FIELD_REFERENCE.equals(field)) { value = event.getReference(); } else { if (field == null) { return null; } ITmfEventField eventField; if (field.equals(EMPTY_STRING) || field.charAt(0) != SLASH) { eventField = event.getContent().getField(field); } else { String[] array = getPathArray(field); eventField = event.getContent().getSubField(array); } if (eventField != null) { value = eventField.getValue(); } } return value; }
Source:
<code>private Optional< SymbolInfo > getSymbol( ParsingContext context, String name ) { <START> Optional< SymbolInfo > symbol = Helpers.firstNonNull( () -> { <END> if( !symbolTables.containsKey( currentURI ) || !symbolTables.get( currentURI ).symbol( name ).isPresent() ) { return null; } return symbolTables.get( currentURI ).symbol( name ).get(); }, () -> { if( !symbolTables.containsKey( context.source() ) || !symbolTables.get( context.source() ).symbol( name ).isPresent() ) { return null; } return symbolTables.get( context.source() ).symbol( name ).get(); } ); return symbol; }</code><technical_language>if( symbolTables.containsKey( currentURI ) && symbolTables.get( currentURI ).symbol( name ).isPresent() ) { return symbolTables.get( currentURI ).symbol( name ); } else if ( symbolTables.containsKey( context.source() ) && symbolTables.get( context.source() ).symbol( name ).isPresent() ) { return symbolTables.get( context.source() ).symbol( name ); } return Optional.empty();</technical_language>

Target:
private Optional< SymbolInfo > getSymbol( ParsingContext context, String name ) { if( symbolTables.containsKey( currentURI ) && symbolTables.get( currentURI ).getSymbol( name ).isPresent() ) { return symbolTables.get( currentURI ).getSymbol( name ); } else if( symbolTables.containsKey( context.source() ) && symbolTables.get( context.source() ).getSymbol( name ).isPresent() ) { return symbolTables.get( context.source() ).getSymbol( name ); } return Optional.empty(); }
Source:
<code>public void testDefaultTimestamp() throws InvalidParametersException, EntityAlreadyExistsException, EntityDoesNotExistException { ______TS("success : created"); StudentAttributes s = new StudentAttributes(); s.name = "a valid student"; s.lastName = "last name of student"; s.email = "valid-fresh-student@email.com"; s.team = "validTeamNameOfStudent"; s.section = "aValidSectionName"; s.comments = ""; s.googleId = "validGoogleIdForStudent"; s.course = "valid-course"; studentsDb.createEntity(s); StudentAttributes student = studentsDb.getStudentForGoogleId(s.course, s.googleId); assertNotNull(student); student.setCreated_NonProduction(null); student.setUpdatedAt_NonProduction(null); Date defaultStudentCreationTimeStamp = Const.TIME_REPRESENTS_DEFAULT_STUDENT_CREATION_TIMESTAMP; ______TS("success : created defaultTimeStamp"); assertEquals(defaultStudentCreationTimeStamp, student.getCreatedAt()); <START> ______TS("success : update defaultTimeStamp"); <END> assertEquals(defaultStudentCreationTimeStamp, student.getUpdatedAt()); }</code><technical_language>test case description is misleading here. Write "defaultTimeStamp for updatedAt date" instead. Similarly for createdAt date test case</technical_language>

Target:
public void testDefaultTimestamp() throws InvalidParametersException, EntityAlreadyExistsException, EntityDoesNotExistException { StudentAttributes s = new StudentAttributes(); s.name = "a valid student"; s.lastName = "last name of student"; s.email = "valid-fresh-student@email.com"; s.team = "validTeamNameOfStudent"; s.section = "aValidSectionName"; s.comments = ""; s.googleId = "validGoogleIdForStudent"; s.course = "valid-course"; studentsDb.createEntity(s); StudentAttributes student = studentsDb.getStudentForGoogleId(s.course, s.googleId); assertNotNull(student); student.setCreated_NonProduction(null); student.setUpdatedAt_NonProduction(null); Date defaultStudentCreationTimeStamp = Const.TIME_REPRESENTS_DEFAULT_TIMESTAMP; ______TS("success : defaultTimeStamp for createdAt date"); assertEquals(defaultStudentCreationTimeStamp, student.getCreatedAt()); ______TS("success : defaultTimeStamp for updatedAt date"); assertEquals(defaultStudentCreationTimeStamp, student.getUpdatedAt()); }
Source:
<code>public void testDelay() { final MySignal sig1 = new MySignal(sender, 0); final MySignal sig2 = new MySignal(sender, 0); final MySignal sig3 = new MySignal(sender, 0); sender.sendSignal(sig1); <START> sleep(250); <END> sender.sendSignal(sig2); sleep(250); sender.sendSignal(sig3); sleep(250); assertEquals(3, listener.nbReceived[0]); }</code><technical_language>increase 1000 safe</technical_language>

Target:
public void testDelay() { final MySignal sig1 = new MySignal(sender, 0); final MySignal sig2 = new MySignal(sender, 0); final MySignal sig3 = new MySignal(sender, 0); sender.sendSignal(sig1); sleep(1000); sender.sendSignal(sig2); sleep(1000); sender.sendSignal(sig3); sleep(1000); assertEquals(3, listener.nbReceived[0]); }
Source:
<code>private static String getText(EObject[] eObjects) { String text = ""; if (eObjects != null) { ComposedAdapterFactory adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE); for (int i = 0; i < eObjects.length - 1; i++) { EObject eObject = eObjects[i]; if (eObject != null) { IItemLabelProvider itemLabelProvider = (IItemLabelProvider) adapterFactory.adapt(eObject, IItemLabelProvider.class); if (itemLabelProvider != null) { text += itemLabelProvider.getText(eObject) + "(" + eObject + "), "; } } <START> } <END> EObject eObject = eObjects[eObjects.length - 1]; if (eObject != null) { IItemLabelProvider itemLabelProvider = (IItemLabelProvider) adapterFactory.adapt(eObject, IItemLabelProvider.class); if (itemLabelProvider != null) { text += itemLabelProvider.getText(eObject) + "(" + eObject + ")"; } } } return text; }</code><technical_language>Instead of duplicate this code for element, test end of table: if(i != eObjects.length-1) text+= ", ";</technical_language>

Target:
private static String getText(EObject[] eObjects) { String text = ""; if (eObjects != null) { ComposedAdapterFactory adapterFactory = new ComposedAdapterFactory(ComposedAdapterFactory.Descriptor.Registry.INSTANCE); for (int i = 0; i < eObjects.length; i++) { EObject eObject = eObjects[i]; if (eObject != null) { IItemLabelProvider itemLabelProvider = (IItemLabelProvider) adapterFactory.adapt(eObject, IItemLabelProvider.class); if (itemLabelProvider != null) { text += itemLabelProvider.getText(eObject) + " (" + eObject + ")"; if (i != eObjects.length - 1) { text += ", "; } } } } } return text; }
Source:
<code>private void apiConnectionLogic(HttpServletRequest request, HttpServletResponse response) throws IOException { PrintWriter out = response.getWriter(); String isStubTesting = appExtPropertiesFile.getProperty(SectionUtilityToolFilter.PROPERTY_TEST_STUB); M_log.debug("isStubTesting: " + isStubTesting); if(Boolean.valueOf(isStubTesting)){ <START> Utils.openFile(request, response, out); <END> } else{ if(request.getPathInfo().equalsIgnoreCase(MPATHWAYS_PATH_INFO)){ mpathwaysCall(request, response, out); } else{ getCanvasResponse(request, response, out); } } }</code><technical_language>returning right needing else cause</technical_language>

Target:
private void apiConnectionLogic(HttpServletRequest request, HttpServletResponse response) throws IOException { PrintWriter out = response.getWriter(); String isStubTesting = appExtPropertiesFile.getProperty(SectionUtilityToolFilter.PROPERTY_TEST_STUB); M_log.debug("isStubTesting: " + isStubTesting); if(Boolean.valueOf(isStubTesting)){ Utils.openFile(request, response, out); return; } if(request.getPathInfo().equalsIgnoreCase(MPATHWAYS_PATH_INFO)){ mpathwaysCall(request, response, out); } else{ getCanvasResponse(request, response, out); } }
Source:
<code>private ProteinVariantAnnotation getProteinAnnotation(Variant variant, ConsequenceType consequenceType) { ProteinVariantAnnotation proteinVariantAnnotation = null; if (consequenceType.getProteinVariantAnnotation() != null) { String transcriptId = consequenceType.getTranscriptId(); if (transcriptId != null && transcriptId.contains("\\.")) { transcriptId = transcriptId.split("\\.")[0]; } CellBaseDataResult<ProteinVariantAnnotation> results = proteinManager.getVariantAnnotation( transcriptId, consequenceType.getProteinVariantAnnotation().getPosition(), consequenceType.getProteinVariantAnnotation().getReference(), consequenceType.getProteinVariantAnnotation().getAlternate(), new QueryOptions()); if (results.getNumResults() > 0) { proteinVariantAnnotation = results.getResults().get(0); } <START> CellBaseDataResult<MissenseVariantFunctionalScore> revelResults = proteinManager.getRevelScores(variant.getChromosome(), <END> variant.getStart(), variant.getReference(), variant.getAlternate()); String aaReference = VariantAnnotationUtils.TO_ABBREVIATED_AA.get(consequenceType.getProteinVariantAnnotation().getReference()); String aaAlternate = VariantAnnotationUtils.TO_ABBREVIATED_AA.get(consequenceType.getProteinVariantAnnotation().getAlternate()); if (revelResults.getNumResults() > 0) { List<MissenseVariantFunctionalScore> scores = revelResults.getResults(); for (MissenseVariantFunctionalScore score : scores) { for (TranscriptMissenseVariantFunctionalScore transcriptScore : score.getScores()) { if (transcriptScore.getAaReference().equalsIgnoreCase(aaReference) && transcriptScore.getAaAlternate().equalsIgnoreCase(aaAlternate)) { proteinVariantAnnotation.getSubstitutionScores().add(new Score(transcriptScore.getScore(), "revel", "")); } } } } } return proteinVariantAnnotation; }</code><technical_language>this block (~ 1077-1100) part of getVariantAnnotation method above</technical_language>

Target:
private ProteinVariantAnnotation getProteinAnnotation(Variant variant, ConsequenceType consequenceType) { ProteinVariantAnnotation proteinVariantAnnotation = null; if (consequenceType.getProteinVariantAnnotation() != null) { String transcriptId = consequenceType.getTranscriptId(); if (transcriptId != null && transcriptId.contains("\\.")) { transcriptId = transcriptId.split("\\.")[0]; } CellBaseDataResult<ProteinVariantAnnotation> results = proteinManager.getVariantAnnotation(variant, transcriptId, consequenceType.getProteinVariantAnnotation().getPosition(), consequenceType.getProteinVariantAnnotation().getReference(), consequenceType.getProteinVariantAnnotation().getAlternate(), new QueryOptions()); if (results.getNumResults() > 0) { proteinVariantAnnotation = results.getResults().get(0); } } return proteinVariantAnnotation; }
Source:
<code>@Test public void shouldReturnEqualForSameInstance() throws Exception { <START> GitModelCacheTree left = crateCacheTree(getTreeLocation()); <END> boolean actual = left.equals(left); assertTrue(actual); }</code><technical_language>typo in method name s/cateCacheTree/createCacheTree/</technical_language>

Target:
@Test public void shouldReturnEqualForSameInstance() throws Exception { GitModelCacheTree left = createCacheTree(getTreeLocation()); boolean actual = left.equals(left); assertTrue(actual); }
Source:
<code>protected void addSearchTerm(ResourceTable theEntity, Set<ResourceIndexedSearchParamString> retVal, String resourceName, String searchTerm) { if (isBlank(searchTerm)) { return; } <START> if (searchTerm.length() > ResourceIndexedSearchParamString.MAX_LENGTH) { <END> searchTerm = searchTerm.substring(0, ResourceIndexedSearchParamString.MAX_LENGTH); } String normalizedString = StringNormalizer.normalizeString(searchTerm); if (normalizedString.length() > ResourceIndexedSearchParamString.MAX_LENGTH) { normalizedString = normalizedString.substring(0, ResourceIndexedSearchParamString.MAX_LENGTH); } ResourceIndexedSearchParamString nextEntity = new ResourceIndexedSearchParamString(getModelConfig(), resourceName, normalizedString, searchTerm); nextEntity.setResource(theEntity); retVal.add(nextEntity); }</code><technical_language>this logic (trim, normalize, trim again) is duplicated in method below. refactored out a single method is called both</technical_language>

Target:
protected void addSearchTerm(ResourceTable theEntity, Set<ResourceIndexedSearchParamString> retVal, String resourceName, String searchTerm) { if (isBlank(searchTerm)) { return; } retVal.add(createResourceIndexedSearchParamString(theEntity, resourceName, searchTerm)); }
Source:
<code>public void removeAllUserFacilityAttributes(PerunSession sess, User user) throws InternalErrorException { try { if (0 < jdbc.update("DELETE FROM user_facility_attr_values WHERE user_id=?", user.getId())) { <START> log.debug("All attributes s values were removed from user on all facilities.", user); <END> } } catch (RuntimeException ex) { throw new InternalErrorException(ex); } }</code><technical_language>attributes s values -> attributes values</technical_language>

Target:
public void removeAllUserFacilityAttributes(PerunSession sess, User user) throws InternalErrorException { try { if (0 < jdbc.update("DELETE FROM user_facility_attr_values WHERE user_id=?", user.getId())) { log.debug("All attributes values were removed from user on all facilities.", user); } } catch (RuntimeException ex) { throw new InternalErrorException(ex); } }
Source:
<code>public static int computeTruncatedLength(Slice slice, int offset, int length, int maxCodePointCount, boolean isCharType) { int truncatedLength = length; if (isCharType) { <START> truncatedLength = byteCountWithoutTrailingSpace(slice, offset, length, maxCodePointCount); <END> } else if (maxCodePointCount >= 0 && length > maxCodePointCount) { truncatedLength = byteCount(slice, offset, length, maxCodePointCount); } return truncatedLength; }</code><technical_language>return here... else redundant (and return next block)</technical_language>

Target:
public static int computeTruncatedLength(Slice slice, int offset, int length, int maxCodePointCount, boolean isCharType) { if (isCharType) { return byteCountWithoutTrailingSpace(slice, offset, length, maxCodePointCount); } if (maxCodePointCount >= 0 && length > maxCodePointCount) { return byteCount(slice, offset, length, maxCodePointCount); } return length; }
Source:
<code>public void cancel(InterpreterContext context) { LOGGER.info("Cancel paragraph:" + context.getParagraphId()); PigScriptListener listener = listenerMap.get(context.getParagraphId()); if (listener != null) { Set<String> jobIds = listener.getJobIds(); if (jobIds.isEmpty()) { LOGGER.info("No job is started, so can not cancel paragraph:" + context.getParagraphId()); } for (String jobId : jobIds) { LOGGER.info("Kill jobId:" + jobId); HExecutionEngine engine = (HExecutionEngine) getPigServer().getPigContext().getExecutionEngine(); try { Field launcherField = HExecutionEngine.class.getDeclaredField("launcher"); launcherField.setAccessible(true); Launcher launcher = (Launcher) launcherField.get(engine); launcher.killJob(jobId, new Configuration()); <START> } catch (NoSuchFieldException e) { <END> LOGGER.error("", e); } catch (BackendException e) { LOGGER.error("", e); } catch (IllegalAccessException e) { LOGGER.error("", e); } } } else { LOGGER.warn("No PigScriptListener found, can not cancel paragraph:" + context.getParagraphId()); } }</code><technical_language>Add message string merge this? catch (NoSuchFieldException | BackendException | IllegalAccessException e)</technical_language>

Target:
public void cancel(InterpreterContext context) { LOGGER.info("Cancel paragraph:" + context.getParagraphId()); PigScriptListener listener = listenerMap.get(context.getParagraphId()); if (listener != null) { Set<String> jobIds = listener.getJobIds(); if (jobIds.isEmpty()) { LOGGER.info("No job is started, so can not cancel paragraph:" + context.getParagraphId()); } for (String jobId : jobIds) { LOGGER.info("Kill jobId:" + jobId); HExecutionEngine engine = (HExecutionEngine) getPigServer().getPigContext().getExecutionEngine(); try { Field launcherField = HExecutionEngine.class.getDeclaredField("launcher"); launcherField.setAccessible(true); Launcher launcher = (Launcher) launcherField.get(engine); launcher.killJob(jobId, new Configuration()); } catch (NoSuchFieldException | BackendException | IllegalAccessException e) { LOGGER.error("Fail to cancel paragraph:" + context.getParagraphId(), e); } } } else { LOGGER.warn("No PigScriptListener found, can not cancel paragraph:" + context.getParagraphId()); } }
Source:
<code>public Object doTransform(Message<?> message) { <START> Object source = (this.extractPayload) ? message.getPayload() : message; <END> Object transformedPayload = null; Result result = this.resultFactory.createResult(source); if (result == null) { throw new MessagingException( "Unable to marshal payload, ResultFactory returned null."); } try { this.marshaller.marshal(source, result); transformedPayload = result; } catch (IOException e) { throw new MessagingException("Failed to marshal payload", e); } if (this.resultTransformer != null) { transformedPayload = this.resultTransformer.transformResult(result); } return transformedPayload; }</code><technical_language>Format code, please</technical_language>

Target:
public Object doTransform(Message<?> message) { Object source = (this.extractPayload) ? message.getPayload() : message; Object transformedPayload = null; Result result = this.getResultFactory().createResult(source); if (result == null) { throw new MessagingException( "Unable to marshal payload, ResultFactory returned null."); } try { this.marshaller.marshal(source, result); transformedPayload = result; } catch (IOException e) { throw new MessagingException("Failed to marshal payload", e); } if (this.resultTransformer != null) { transformedPayload = this.resultTransformer.transformResult(result); } return transformedPayload; }
Source:
<code>public void testImportSequeneFile_fromGcsWithDeleteMarker() throws Exception { final byte[] r1 = Bytes.toBytes("r1"); final byte[] r2 = Bytes.toBytes("r2"); final byte[] cf1 = Bytes.toBytes("cf1"); final byte[] cf2 = Bytes.toBytes("cf2"); final byte[] c1 = Bytes.toBytes("c1"); final byte[] c2 = Bytes.toBytes("c2"); final byte[] val = Bytes.toBytes("1"); <START> Set<? extends Cell> expected = Sets.newHashSet( <END> new KeyValue(r1, cf1, c1, 1050, val), new KeyValue(r1, cf1, c1, 1030, val), new KeyValue(r1, cf1, c1, 1020, val), new KeyValue(r1, cf1, c1, 1010, val), new KeyValue(r1, cf1, c2, 100, val), new KeyValue(r1, cf2, c1, 1050, val), new KeyValue(r1, cf2, c1, 1040, val), new KeyValue(r1, cf2, c1, 1030, val), new KeyValue(r1, cf2, c1, 1020, val), new KeyValue(r1, cf2, c1, 1010, val), new KeyValue(r1, cf2, c2, 1050, val), new KeyValue(r1, cf2, c2, 1040, val), new KeyValue(r1, cf2, c2, 1030, val), new KeyValue(r1, cf2, c2, 1020, val), new KeyValue(r1, cf2, c2, 1010, val), new KeyValue(r2, cf1, c1, 1000, val)); runImportFileTestFromGcs(CloudTestDataType.DELETE_MARKER, expected); }</code><technical_language>Hard testing if expected values. I understand test data generation logic yet. describe input data here</technical_language>

Target:
public void testImportSequeneFile_fromGcsWithDeleteMarker() throws Exception { final byte[] r1 = Bytes.toBytes("r1"); final byte[] r2 = Bytes.toBytes("r2"); final byte[] cf1 = Bytes.toBytes("cf1"); final byte[] cf2 = Bytes.toBytes("cf2"); final byte[] c1 = Bytes.toBytes("c1"); final byte[] c2 = Bytes.toBytes("c2"); final byte[] val = Bytes.toBytes("1"); Set<? extends Cell> expected = Sets.newHashSet( new KeyValue(r1, cf1, c1, 1050, val), new KeyValue(r1, cf1, c1, 1030, val), new KeyValue(r1, cf1, c1, 1020, val), new KeyValue(r1, cf1, c1, 1010, val), new KeyValue(r1, cf1, c2, 100, val), new KeyValue(r1, cf2, c1, 1050, val), new KeyValue(r1, cf2, c1, 1040, val), new KeyValue(r1, cf2, c1, 1030, val), new KeyValue(r1, cf2, c1, 1020, val), new KeyValue(r1, cf2, c1, 1010, val), new KeyValue(r1, cf2, c2, 1050, val), new KeyValue(r1, cf2, c2, 1040, val), new KeyValue(r1, cf2, c2, 1030, val), new KeyValue(r1, cf2, c2, 1020, val), new KeyValue(r1, cf2, c2, 1010, val), new KeyValue(r2, cf1, c1, 1000, val)); runImportFileTestFromGcs(CloudTestDataType.CURRENT_FORMAT_WITH_DELETE_MARKER, expected); }
Source:
<code>private static CompositeContinuationToken tryParseAsCompositeContinuationToken( final String providedContinuation) { try { final ObjectMapper mapper = Utils.getSimpleObjectMapper(); if (providedContinuation.trim().startsWith("[")) { final List<CompositeContinuationToken> compositeContinuationTokens = Arrays .asList(mapper.readValue(providedContinuation, CompositeContinuationToken[].class)); if (compositeContinuationTokens.size() > 0) { return compositeContinuationTokens.get(0); } return null; } else if (providedContinuation.trim().startsWith("{")) { return mapper.readValue(providedContinuation, CompositeContinuationToken.class); } return null; } catch (final IOException ioError) { <START> return null; <END> } }</code><technical_language>log exception for debugging purposes</technical_language>

Target:
private static CompositeContinuationToken tryParseAsCompositeContinuationToken( final String providedContinuation) { try { final ObjectMapper mapper = Utils.getSimpleObjectMapper(); if (providedContinuation.trim().startsWith("[")) { final List<CompositeContinuationToken> compositeContinuationTokens = Arrays .asList(mapper.readValue(providedContinuation, CompositeContinuationToken[].class)); if (compositeContinuationTokens.size() > 0) { return compositeContinuationTokens.get(0); } return null; } else if (providedContinuation.trim().startsWith("{")) { return mapper.readValue(providedContinuation, CompositeContinuationToken.class); } return null; } catch (final IOException ioError) { LOGGER.debug( "Failed to parse as composite continuation token JSON ", providedContinuation, ioError); return null; } }
Source:
<code>private Summary ensureSummary(ProceedingJoinPoint pjp, String key) throws IllegalStateException { PrometheusTimeMethod annot; try { annot = getAnnotation(pjp); } catch (NoSuchMethodException e) { throw new IllegalStateException("Annotation could not be found for pjp \"" + pjp.toShortString() +"\"", e); } catch (NullPointerException e) { throw new IllegalStateException("Annotation could not be found for pjp \"" + pjp.toShortString() +"\"", e); } assert(annot != null); Summary summary; final Lock writeLock = summaryLock.writeLock(); writeLock.lock(); try { summary = summaries.get(key); if (summary != null) { return summary; } summary = Summary.build() .name(annot.name()) .help(annot.help()) <START> .register();f <END> summaries.put(key, summary); return summary; } finally { writeLock.unlock(); } }</code><technical_language>f</technical_language>

Target:
private Summary ensureSummary(ProceedingJoinPoint pjp, String key) throws IllegalStateException { PrometheusTimeMethod annot; try { annot = getAnnotation(pjp); } catch (NoSuchMethodException e) { throw new IllegalStateException("Annotation could not be found for pjp \"" + pjp.toShortString() +"\"", e); } catch (NullPointerException e) { throw new IllegalStateException("Annotation could not be found for pjp \"" + pjp.toShortString() +"\"", e); } assert(annot != null); Summary summary; final Lock writeLock = summaryLock.writeLock(); writeLock.lock(); try { summary = summaries.get(key); if (summary != null) { return summary; } summary = Summary.build() .name(annot.name()) .help(annot.help()) .register(); summaries.put(key, summary); return summary; } finally { writeLock.unlock(); } }
Source:
<code>public String createUniqueArticle() { <START> String uniqueText = String.format("%s%s", PageContent.ARTICLE_NAME_PREFIX, new Date().getTime()); <END> push(uniqueText, uniqueText); return uniqueText; }</code><technical_language>I new Date libs, LocalDateTime.now()</technical_language>

Target:
public String createUniqueArticle() { String uniqueText = String.format("%s%s", PageContent.ARTICLE_NAME_PREFIX, LocalDateTime.now()); push(uniqueText, uniqueText); return uniqueText; }
Source:
<code>public void executed(FrontendActionAsyncResult result) { VdcReturnValueBase returnValue = result.getReturnValue(); if (returnValue != null && returnValue.getSucceeded()) { doNetworkOperation(returnValue, (List<NicWithLogicalNetworks>) unitVmModel.getNicWithLogicalNetworks().getItems() ); } else { <START> networkCreatingManager.getCallback().queryFaild(result.getState()); <END> } }</code><technical_language>s/Faild/Failed</technical_language>

Target:
public void executed(FrontendActionAsyncResult result) { VdcReturnValueBase returnValue = result.getReturnValue(); if (returnValue != null && returnValue.getSucceeded()) { doNetworkOperation(returnValue, (List<NicWithLogicalNetworks>) unitVmModel.getNicWithLogicalNetworks().getItems() ); } else { networkCreatingManager.getCallback().queryFailed(result.getState()); } }