auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public OperationBuilder extensions(Map<String, Object> extensions) { <START> this.vendorExtensions = defaultIfAbsent(extensions, this.vendorExtensions); <END> return this; }</code><technical_language>I this a merge operation a replace operation. of situation multiple plugins contributing extensions. plugins updates override changes</technical_language>

Target:
public OperationBuilder extensions(Map<String, Object> extensions) { this.vendorExtensions.putAll(nullToEmptyMap(extensions)); return this; }
Source:
<code>public void fastEnqueue(final DeferredSerialization ds) { if (m_isSSLConfigured) { m_port.queueTask(new Runnable() { @Override public void run() { <START> Iterator<DeferredSerialization> dsIter = new SSLDeferredSerializationIterator(m_sslEngine, ds); <END> synchronized (NIOWriteStream.this) { updateLastPendingWriteTimeAndQueueBackpressure(); while (dsIter.hasNext()) { m_queuedWrites.offer(dsIter.next()); } m_port.setInterests( SelectionKey.OP_WRITE, 0); } } }); } else { m_port.queueTask(new Runnable() { @Override public void run() { synchronized (NIOWriteStream.this) { updateLastPendingWriteTimeAndQueueBackpressure(); try { final int serializedSize = ds.getSerializedSize(); if (!(serializedSize == DeferredSerialization.EMPTY_MESSAGE_LENGTH)) { m_queuedWrites.offer(new DeferredSerialization() { @Override public ByteBuffer serialize(ByteBuffer outbuf) throws IOException { if (outbuf.remaining() >= serializedSize) { ds.serialize(outbuf); return null; } else { ByteBuffer allocated = ByteBuffer.allocate(serializedSize); ds.serialize(allocated); allocated.flip(); return allocated; } } @Override public void cancel() { } @Override public int getSerializedSize() throws IOException { throw new UnsupportedOperationException("getSerializedSize not supported"); } }); } } catch(IOException e){ throw new RuntimeException("Failed to get serialized size for ds " + e.getMessage()); } m_port.setInterests( SelectionKey.OP_WRITE, 0); } } }); } }</code><technical_language>move this task opposed big if</technical_language>

Target:
public void fastEnqueue(final DeferredSerialization ds) { m_port.queueTask(new Runnable() { @Override public void run() { synchronized (NIOWriteStream.this) { updateLastPendingWriteTimeAndQueueBackpressure(); m_queuedWrites.offer(ds); m_port.setInterests( SelectionKey.OP_WRITE, 0); } } }); }
Source:
<code>private ProjectNode buildProjectedAggregation(PlanBuilder planBuilder, Predicate<Symbol> projectionFilter) { Symbol a = planBuilder.symbol("a"); Symbol b = planBuilder.symbol("b"); return planBuilder.project( Assignments.identity(ImmutableList.of(a, b).stream().filter(projectionFilter).collect(toImmutableSet())), planBuilder.aggregation(aggregationBuilder -> aggregationBuilder .source(planBuilder.values()) <START> .addGroupingSet() <END> .addAggregation(a, planBuilder.expression("count()"), ImmutableList.of()) .addAggregation(b, planBuilder.expression("count()"), ImmutableList.of()))); }</code><technical_language>add some grouping keys, preserved rewrite</technical_language>

Target:
private ProjectNode buildProjectedAggregation(PlanBuilder planBuilder, Predicate<Symbol> projectionFilter) { Symbol a = planBuilder.symbol("a"); Symbol b = planBuilder.symbol("b"); Symbol key = planBuilder.symbol("key"); return planBuilder.project( Assignments.identity(ImmutableList.of(a, b).stream().filter(projectionFilter).collect(toImmutableSet())), planBuilder.aggregation(aggregationBuilder -> aggregationBuilder .source(planBuilder.values(key)) .addGroupingSet(key) .addAggregation(a, planBuilder.expression("count()"), ImmutableList.of()) .addAggregation(b, planBuilder.expression("count()"), ImmutableList.of()))); }
Source:
<code>public void deleteValue(final String secretKey) { try { final KeyStore ks = getSecretsStore(); <START> ks.deleteEntry(secretKey); <END> saveSecretsStore(ks); flushCache(); } catch (KeyStoreException e) { Logger.warn(this.getClass(), "Unable to delete secret from " + SECRETS_STORE_FILE + ": " + e); throw new DotRuntimeException(e); } }</code><technical_language>need .toLowerCase()?, I thought keys saved lowercase in keystore</technical_language>

Target:
public void deleteValue(final String secretKey) { try { final KeyStore keyStore = getSecretsStore(); keyStore.deleteEntry(secretKey); saveSecretsStore(keyStore); flushCache(secretKey); } catch (KeyStoreException | DotCacheException e) { Logger.warn(this.getClass(), "Unable to delete secret from " + SECRETS_STORE_FILE + ": " + e); throw new DotRuntimeException(e); } }
Source:
<code>private void createCommonViewer(Composite container, IProject project) { commonViewer = new CommonViewer(navigatorId, container, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL); INavigatorContentService contentService = NavigatorContentServiceFactory.INSTANCE .createContentService(navigatorId, commonViewer); contentService.createCommonContentProvider(); contentService.createCommonLabelProvider(); INavigatorFilterService filterService = commonViewer.getNavigatorContentService().getFilterService(); ViewerFilter[] visibleFilters = filterService.getVisibleFilters(true); for (int i = 0; i < visibleFilters.length; i++) { commonViewer.addFilter(visibleFilters[i]); } commonViewer.setSorter(new CommonViewerSorter()); commonViewer.addFilter(new TypeListPatternFilter()); commonViewer.getControl().addMouseListener(new MouseListener() { @Override public void mouseUp(MouseEvent e) { } @Override public void mouseDown(MouseEvent e) { commonViewer.getControl().forceFocus(); } @Override public void mouseDoubleClick(MouseEvent e) { } }); if (project.getName().equals(TypeLibraryTags.TOOL_LIBRARY_PROJECT_NAME)) { commonViewer.setInput(TypeLibrary.getToolLibFolder()); } else { commonViewer.setInput(project); } <START> GridData fillBoth = new GridData(); fillBoth.horizontalAlignment = GridData.FILL; fillBoth.grabExcessHorizontalSpace = true; fillBoth.verticalAlignment = GridData.FILL; <END> fillBoth.grabExcessVerticalSpace = true; commonViewer.getControl().setLayoutData(fillBoth); }</code><technical_language>do this constructor</technical_language>

Target:
private void createCommonViewer(Composite container, IProject project) { commonViewer = new CommonViewer(navigatorId, container, SWT.SINGLE | SWT.H_SCROLL | SWT.V_SCROLL); INavigatorContentService contentService = NavigatorContentServiceFactory.INSTANCE .createContentService(navigatorId, commonViewer); contentService.createCommonContentProvider(); contentService.createCommonLabelProvider(); INavigatorFilterService filterService = commonViewer.getNavigatorContentService().getFilterService(); ViewerFilter[] visibleFilters = filterService.getVisibleFilters(true); for (int i = 0; i < visibleFilters.length; i++) { commonViewer.addFilter(visibleFilters[i]); } commonViewer.setSorter(new CommonViewerSorter()); commonViewer.addFilter(new TypeListPatternFilter()); commonViewer.getControl().addMouseListener(new MouseListener() { @Override public void mouseUp(MouseEvent e) { } @Override public void mouseDown(MouseEvent e) { commonViewer.getControl().forceFocus(); } @Override public void mouseDoubleClick(MouseEvent e) { } }); if (project.getName().equals(TypeLibraryTags.TOOL_LIBRARY_PROJECT_NAME)) { commonViewer.setInput(TypeLibrary.getToolLibFolder()); } else { commonViewer.setInput(project); } GridData fillBoth = new GridData(GridData.FILL, GridData.FILL, true, true); commonViewer.getControl().setLayoutData(fillBoth); }
Source:
<code>public Client map(ClientsRecord r) { Long lastSeen = r.getLastseen(); ApiDate dateLastSeen; if (lastSeen == null) { dateLastSeen = null; } else { dateLastSeen = new ApiDate(lastSeen); } <START> <END> return new Client( r.getId(), r.getName(), r.getDescription(), new ApiDate(r.getCreatedat()), r.getCreatedby(), new ApiDate(r.getUpdatedat()), r.getUpdatedby(), dateLastSeen, r.getEnabled(), r.getAutomationallowed() ); }</code><technical_language>do: ApiDate lastSeen = Optional.ofNullable(r.getLastseen()).map(ApiDate::new).orElse(null);</technical_language>

Target:
public Client map(ClientsRecord r) { ApiDate lastSeen = Optional.ofNullable(r.getLastseen()).map(ApiDate::new).orElse(null); return new Client( r.getId(), r.getName(), r.getDescription(), new ApiDate(r.getCreatedat()), r.getCreatedby(), new ApiDate(r.getUpdatedat()), r.getUpdatedby(), lastSeen, r.getEnabled(), r.getAutomationallowed() ); }
Source:
<code>public static List<ServiceRegistration> scanServiceInfo(ServiceInfo serviceInfo) { return Arrays.stream(serviceInfo.serviceInstance().getClass().getInterfaces()) .filter(serviceInterface -> serviceInterface.isAnnotationPresent(Service.class)) .map( serviceInterface -> { Map<String, String> userTags = serviceInfo.tags(); Map<String, String> apiTags = Reflect.serviceTags(serviceInterface); Map<String, String> buffer = new HashMap<>(apiTags); buffer.putAll(userTags); return new InterfaceInfo(serviceInterface, Collections.unmodifiableMap(buffer)); }) .map( interfaceInfo -> { Class<?> serviceInterface = interfaceInfo.serviceInterface; Map<String, String> serviceTags = interfaceInfo.tags; String namespace = Reflect.serviceName(serviceInterface); List<ServiceMethodDefinition> actions = Arrays.stream(serviceInterface.getMethods()) .filter(method -> method.isAnnotationPresent(ServiceMethod.class)) .map( method -> new ServiceMethodDefinition(Reflect.methodName(method)) <START> .setTags(Reflect.serviceMethodTags(method))) <END> .collect(Collectors.toList()); return new ServiceRegistration(namespace, serviceTags, actions); }) .collect(Collectors.toList()); }</code><technical_language>Remove method setTags (as setAction method) another constructor ServiceMethodDefinition(String action, Map<String, String> tags)</technical_language>

Target:
public static List<ServiceRegistration> scanServiceInfo(ServiceInfo serviceInfo) { return Arrays.stream(serviceInfo.serviceInstance().getClass().getInterfaces()) .filter(serviceInterface -> serviceInterface.isAnnotationPresent(Service.class)) .map( serviceInterface -> { Map<String, String> serviceInfoTags = serviceInfo.tags(); Map<String, String> apiTags = Reflect.serviceTags(serviceInterface); Map<String, String> buffer = new HashMap<>(apiTags); buffer.putAll(serviceInfoTags); return new InterfaceInfo(serviceInterface, Collections.unmodifiableMap(buffer)); }) .map( interfaceInfo -> { Class<?> serviceInterface = interfaceInfo.serviceInterface; Map<String, String> serviceTags = interfaceInfo.tags; String namespace = Reflect.serviceName(serviceInterface); List<ServiceMethodDefinition> actions = Arrays.stream(serviceInterface.getMethods()) .filter(method -> method.isAnnotationPresent(ServiceMethod.class)) .map( method -> new ServiceMethodDefinition( Reflect.methodName(method), Reflect.serviceMethodTags(method))) .collect(Collectors.toList()); return new ServiceRegistration(namespace, serviceTags, actions); }) .collect(Collectors.toList()); }
Source:
<code>public String generateURL( String scheme, String clusterName ) { String clusterURL = null; try { if ( !Const.isEmpty( clusterName ) && !Const.isEmpty( clusterName ) ) { NamedCluster namedCluster = read( clusterName, Spoon.getInstance().getMetaStore() ); String ncHostname = null, ncPort = null, ncUsername = null, ncPassword = null; if ( namedCluster != null ) { if ( scheme.equals( HadoopSpoonPlugin.HDFS_SCHEME ) ) { ncHostname = namedCluster.getHdfsHost() != null ? namedCluster.getHdfsHost() : ""; ncPort = namedCluster.getHdfsPort() != null ? namedCluster.getHdfsPort() : ""; ncUsername = namedCluster.getHdfsUsername() != null ? namedCluster.getHdfsUsername() : ""; ncPassword = namedCluster.getHdfsPassword() != null ? namedCluster.getHdfsPassword() : ""; } ncHostname = getVariableSpace().environmentSubstitute( ncHostname ); ncPort = getVariableSpace().environmentSubstitute( ncPort ); ncUsername = getVariableSpace().environmentSubstitute( ncUsername ); ncPassword = getVariableSpace().environmentSubstitute( ncPassword ); <START> StringBuffer urlString = new StringBuffer( scheme ); <END> urlString.append( "://" ); if ( ncUsername != null && !ncUsername.trim().equals( "" ) ) { urlString.append( ncUsername ); urlString.append( ":" ); urlString.append( ncPassword ); urlString.append( "@" ); } urlString.append( ncHostname ); if ( !Const.isEmpty( ncPort ) ) { urlString.append( ":" ); urlString.append( ncPort ); } clusterURL = urlString.toString(); } } } catch ( Exception e ) { clusterURL = null; } return clusterURL; }</code><technical_language>a StringBuffer, risk encoding issues usernames/password characters, refactor this code UrlFileName pass this info to, ask getURI() return a safer construction of URL</technical_language>

Target:
public String generateURL( String scheme, String clusterName ) { String clusterURL = null; try { if ( !Const.isEmpty( scheme ) && !Const.isEmpty( clusterName ) ) { NamedCluster namedCluster = read( clusterName, Spoon.getInstance().getMetaStore() ); String ncHostname = null, ncPort = null, ncUsername = null, ncPassword = null; if ( namedCluster != null ) { if ( scheme.equals( HadoopSpoonPlugin.HDFS_SCHEME ) ) { ncHostname = namedCluster.getHdfsHost() != null ? namedCluster.getHdfsHost() : ""; ncPort = namedCluster.getHdfsPort() != null ? namedCluster.getHdfsPort() : ""; ncUsername = namedCluster.getHdfsUsername() != null ? namedCluster.getHdfsUsername() : ""; ncPassword = namedCluster.getHdfsPassword() != null ? namedCluster.getHdfsPassword() : ""; } ncHostname = getVariableSpace().environmentSubstitute( ncHostname ); ncPort = getVariableSpace().environmentSubstitute( ncPort ); ncUsername = getVariableSpace().environmentSubstitute( ncUsername ); ncPassword = getVariableSpace().environmentSubstitute( ncPassword ); UrlFileName file = new UrlFileName( scheme, ncHostname, Integer.parseInt( ncPort ), -1, ncUsername, ncPassword, null, null, null ); clusterURL = file.getURI(); } } } catch ( Exception e ) { clusterURL = null; } return clusterURL; }
Source:
<code>protected void runCommands() { List<AttachNetworkToVdsGroupParameter> params = new ArrayList<>(); Set<Guid> networkIds = new HashSet<>(); for (CommandBase<?> command : getCommands()) { if (command.getReturnValue().getCanDoAction()) { AttachNetworkToVdsGroupParameter parameters = (AttachNetworkToVdsGroupParameter) command.getParameters(); params.add(parameters); Network network = DbFacade.getInstance().getNetworkDao().get(parameters.getNetworkCluster().getNetworkId()); if (NetworkUtils.isConfiguredByLabel(network)) { networkIds.add(network.getId()); } } } if (networkIds.size() <= 1) { super.runCommands(); } if (!params.isEmpty()) { <START> Backend.getInstance().runInternalAction(getActionType(), <END> new ClusterNetworksParameters(params.get(0).getVdsGroupId(), params)); } }</code><technical_language>Pretty meant send new command type here.</technical_language>

Target:
protected void runCommands() { List<AttachNetworkToVdsGroupParameter> params = new ArrayList<>(); Set<Guid> networkIds = new HashSet<>(); for (CommandBase<?> command : getCommands()) { if (command.getReturnValue().getCanDoAction()) { AttachNetworkToVdsGroupParameter parameters = (AttachNetworkToVdsGroupParameter) command.getParameters(); params.add(parameters); Network network = DbFacade.getInstance().getNetworkDao().get(parameters.getNetworkCluster().getNetworkId()); if (NetworkUtils.isConfiguredByLabel(network)) { networkIds.add(network.getId()); } } } if (networkIds.size() <= 1) { super.runCommands(); return; } if (!params.isEmpty()) { Backend.getInstance().runInternalAction(VdcActionType.AttachNetworksToCluster, new ClusterNetworksParameters(params.get(0).getVdsGroupId(), params)); } }
Source:
<code>private ListenableFuture<?> stashOrSubmitTask(RunnableWithES runnable, boolean callExecute) { if (!m_isActive) { <START> synchronized (m_executorLock) { <END> if (!m_isActive) { m_queuedActions.add(runnable); return Futures.immediateFuture(null); } } } setupExecutor(); runnable.setExecutorService(m_executor.get()); if (m_executor.get().isShutdown()) { return Futures.immediateFuture(null); } if (callExecute) { m_executor.get().execute(runnable); return Futures.immediateFuture(null); } else { return m_executor.get().submit(runnable); } }</code><technical_language>full proof though</technical_language>

Target:
private ListenableFuture<?> stashOrSubmitTask(RunnableWithES runnable, boolean callExecute) { if (m_executor==null) { synchronized (m_executorLock) { if (m_executor==null) { if (m_queuedActions.size() > 50) { exportLog.error("Queue for export source for generation " + m_generation + " is going beyond 50. Not queueing anymore events"); return Futures.immediateFuture(null); } m_queuedActions.add(runnable); return Futures.immediateFuture(null); } } } runnable.setExecutorService(m_executor); if (m_executor.isShutdown()) { return Futures.immediateFuture(null); } if (callExecute) { m_executor.execute(runnable); return Futures.immediateFuture(null); } else { return m_executor.submit(runnable); } }
Source:
<code>public void dsnBounceShouldAddPrefixToSubjectWhenPrefixIsConfigured() throws Exception { FakeMailetConfig mailetConfig = FakeMailetConfig.builder() .mailetName(MAILET_NAME) .mailetContext(fakeMailContext) .setProperty("prefix", "pre") .build(); dsnBounce.init(mailetConfig); FakeMail mail = FakeMail.builder() .name(MAILET_NAME) .sender(MailAddressFixture.ANY_AT_JAMES) .mimeMessage(MimeMessageBuilder.mimeMessageBuilder() .setSubject("My subject")) .build(); dsnBounce.service(mail); List<SentMail> sentMails = fakeMailContext.getSentMails(); assertThat(sentMails).hasSize(1); SentMail sentMail = sentMails.get(0); <START> assertThat(sentMail.getSubject().orElse(null)).isEqualTo("pre My subject"); <END> }</code><technical_language>rely list + optional asserts: assertThat(fakeMailContext.getSentMails()) .hasSize(1) .allSatisfies(mail -> assertThat(mail.getSubject()).contains("...));</technical_language>

Target:
public void dsnBounceShouldAddPrefixToSubjectWhenPrefixIsConfigured() throws Exception { FakeMailetConfig mailetConfig = FakeMailetConfig.builder() .mailetName(MAILET_NAME) .mailetContext(fakeMailContext) .setProperty("prefix", "pre") .build(); dsnBounce.init(mailetConfig); FakeMail mail = FakeMail.builder() .name(MAILET_NAME) .sender(MailAddressFixture.ANY_AT_JAMES) .mimeMessage(MimeMessageBuilder.mimeMessageBuilder() .setSubject("My subject")) .build(); dsnBounce.service(mail); assertThat(fakeMailContext.getSentMails()).hasSize(1).allSatisfy( sentMail -> assertThat(sentMail.getSubject()).contains("pre My subject")); }
Source:
<code>private static void validateSelectionClause(Map<Identifier, Expression> aliasMap, PinotQuery pinotQuery) throws SqlCompilationException { Set<String> aliasKeys = new HashSet<>(); for (Identifier identifier : aliasMap.keySet()) { String aliasName = identifier.getName().toLowerCase(); <START> if (aliasKeys.contains(aliasName)) { throw new SqlCompilationException("Duplicated alias name found."); } aliasKeys.add(aliasName); <END> } for (Expression selectExpr : pinotQuery.getSelectList()) { matchIdentifierInAliasMap(selectExpr, aliasKeys); } }</code><technical_language>(nit) suggestion if (!aliasKeys.add(aliasName)) { throw new SqlCompilationException("Duplicated alias name found."); }</technical_language>

Target:
private static void validateSelectionClause(Map<Identifier, Expression> aliasMap, PinotQuery pinotQuery) throws SqlCompilationException { Set<String> aliasKeys = new HashSet<>(); for (Identifier identifier : aliasMap.keySet()) { String aliasName = identifier.getName().toLowerCase(); if (!aliasKeys.add(aliasName)) { throw new SqlCompilationException("Duplicated alias name found."); } } for (Expression selectExpr : pinotQuery.getSelectList()) { matchIdentifierInAliasMap(selectExpr, aliasKeys); } }
Source:
<code>static List<Class<? extends RequirementFulfiller>> collectFulfillers(List<Class<? extends RequirementFulfiller>> builtinFulfillers, Class<? extends Annotation> filterAnnotation) { Set<Class<? extends RequirementFulfiller>> userFulfillers = getAnnotatedSubTypesOf(RequirementFulfiller.class, filterAnnotation); List<Class<? extends RequirementFulfiller>> allFulfillers = new ArrayList<>(builtinFulfillers); allFulfillers.addAll(userFulfillers); return ImmutableList.copyOf( allFulfillers.stream() .sorted(new RequirementFulfillerByPriorityComparator()) <START> .collect(toList()) <END> ); }</code><technical_language>nice toImmutableList collector. Airlift/Presto one. If some time copy :)</technical_language>

Target:
static List<Class<? extends RequirementFulfiller>> collectFulfillers(List<Class<? extends RequirementFulfiller>> builtinFulfillers, Class<? extends Annotation> filterAnnotation) { List<Class<? extends RequirementFulfiller>> allFulfillers = scanForFulfillersAndSort(filterAnnotation); allFulfillers.addAll(getBuiltInFulfillerPosition(allFulfillers), builtinFulfillers); return ImmutableList.copyOf(allFulfillers); }
Source:
<code>public void delete(long fileId, long pageIndex) throws IOException { <START> Files.delete(getFilePath(fileId, pageIndex)); <END> }</code><technical_language>do delete file parent dirs? a lot of empty dirs left running this a while</technical_language>

Target:
public void delete(long fileId, long pageIndex) throws IOException, PageNotFoundException { Path p = getFilePath(fileId, pageIndex); if (!Files.exists(p)) { throw new PageNotFoundException(p.toString()); } Files.delete(p); mSize.decrementAndGet(); if (!Files.newDirectoryStream(p.getParent()).iterator().hasNext()) { Files.delete(p.getParent()); } }
Source:
<code>public long maxWorkflowTasks() { <START> return systemConfig.get("executor.task_max_run", long.class, MAX_WORKFLOW_TASKS); <END> }</code><technical_language>[minor] ~~How memoization of this in terms of performance?~~ Do need memoize this in terms of performance</technical_language>

Target:
public long maxWorkflowTasks() { return numOfMaxWorkflowTasks; }
Source:
<code>private static RelationalSymbolicValue binaryRelationToSymbolicValue(BinaryRelation binaryRelation) { switch (binaryRelation.kind) { case EQUAL: case METHOD_EQUALS: case LESS_THAN: return new RelationalSymbolicValue(binaryRelation.kind, binaryRelation.leftOp, binaryRelation.rightOp); case NOT_EQUAL: <START> return new RelationalSymbolicValue(Kind.NOT_EQUAL, binaryRelation.leftOp, binaryRelation.rightOp); <END> case GREATER_THAN: return new RelationalSymbolicValue(Kind.LESS_THAN, binaryRelation.rightOp, binaryRelation.leftOp); case GREATER_THAN_OR_EQUAL: return new RelationalSymbolicValue(Kind.GREATER_THAN_OR_EQUAL, binaryRelation.leftOp, binaryRelation.rightOp); case LESS_THAN_OR_EQUAL: return new RelationalSymbolicValue(Kind.GREATER_THAN_OR_EQUAL, binaryRelation.rightOp, binaryRelation.leftOp); case NOT_METHOD_EQUALS: return new RelationalSymbolicValue(Kind.NOT_METHOD_EQUALS, binaryRelation.rightOp, binaryRelation.leftOp); default: throw new IllegalStateException("Unable to convert to relational SV " + binaryRelation); } }</code><technical_language>This merged previous one</technical_language>

Target:
private static RelationalSymbolicValue binaryRelationToSymbolicValue(BinaryRelation binaryRelation) { switch (binaryRelation.kind) { case EQUAL: case METHOD_EQUALS: case NOT_EQUAL: case NOT_METHOD_EQUALS: case LESS_THAN: case GREATER_THAN_OR_EQUAL: return new RelationalSymbolicValue(binaryRelation.kind, binaryRelation.leftOp, binaryRelation.rightOp); case GREATER_THAN: case LESS_THAN_OR_EQUAL: return new RelationalSymbolicValue(binaryRelation.kind.symmetric(), binaryRelation.rightOp, binaryRelation.leftOp); default: throw new IllegalStateException("Unable to convert to relational SV " + binaryRelation); } }
Source:
<code>public Component getContent(Project project, ExtensionUtil util) { Layout layout = new CssLayout(); layout.addStyleName(STYLE_SCRUM_INFOBOX); layout.setSizeFull(); boolean rendered = false; ScrumProjectExt scrumExt = project.getExtension(ScrumProjectExt.class); if (scrumExt != null) { if (CollectionUtils.isNotBlank(scrumExt.getProductOwners())) { createLabel(layout, "Product Owner", STYLE_TEAMLABEL); Component peopleComponent = PeopleComponent.getPeopleListComponentForMember(scrumExt.getProductOwners()); layout.addComponent(peopleComponent); rendered = true; } if (CollectionUtils.isNotBlank(scrumExt.getScrumMasters())) { createLabel(layout, "Scrum Master", STYLE_TEAMLABEL); Component peopleComponent = PeopleComponent.getPeopleListComponentForMember(scrumExt.getScrumMasters()); layout.addComponent(peopleComponent); rendered = true; } if (StringUtils.isNotBlank(scrumExt.getBacklogUrl())) { createLink(layout, "Scrum Backlog", scrumExt.getBacklogUrl(), DEFAULT_TARGET, STYLE_SCRUM_LOG); rendered = true; } addLastModifiedInfo(layout, scrumExt); } if (!rendered) { createLabel(layout, "SCRUM extension added but no data maintained.", STYLE_LABEL); } <START> addLastModifiedInfo(layout, scrumExt); <END> return layout; }</code><technical_language>this renders timestamp</technical_language>

Target:
public Component getContent(Project project, ExtensionUtil util) { Layout layout = new CssLayout(); layout.addStyleName(STYLE_SCRUM_INFOBOX); layout.setSizeFull(); boolean rendered = false; ScrumProjectExt scrumExt = project.getExtension(ScrumProjectExt.class); if (scrumExt != null) { if (CollectionUtils.isNotBlank(scrumExt.getProductOwners())) { createLabel(layout, "Product Owner", STYLE_TEAMLABEL); Component peopleComponent = PeopleComponent.getPeopleListComponentForMember(scrumExt.getProductOwners()); layout.addComponent(peopleComponent); rendered = true; } if (CollectionUtils.isNotBlank(scrumExt.getScrumMasters())) { createLabel(layout, "Scrum Master", STYLE_TEAMLABEL); Component peopleComponent = PeopleComponent.getPeopleListComponentForMember(scrumExt.getScrumMasters()); layout.addComponent(peopleComponent); rendered = true; } if (StringUtils.isNotBlank(scrumExt.getBacklogUrl())) { createLink(layout, "Scrum Backlog", scrumExt.getBacklogUrl(), DEFAULT_TARGET, STYLE_SCRUM_LOG); rendered = true; } } if (!rendered) { createLabel(layout, "SCRUM extension added but no data maintained.", STYLE_LABEL); } return layout; }
Source:
<code>public AggregationBuilder groupingSets(List<List<Symbol>> groupingSets) { <START> this.groupingSets.clear(); <END> this.groupingSets.addAll(groupingSets); return this; }</code><technical_language>Instead check this.groupingSets.isEmpty()</technical_language>

Target:
public AggregationBuilder groupingSets(List<List<Symbol>> groupingSets) { checkState(this.groupingSets.isEmpty(), "groupingSets already defined"); this.groupingSets.addAll(groupingSets); return this; }
Source:
<code>public ImageView getProfileView() { final View profileView = findViewById(R.id.toolbar_profile_image); if (profileView != null && profileView instanceof ImageView) { <START> profileView.setVisibility(View.VISIBLE); <END> return (ImageView) profileView; } return null; }</code><technical_language>there. ProfileView shown in onActivityCreated of relevant activities in appear</technical_language>

Target:
public ImageView getProfileView() { final View profileView = findViewById(R.id.toolbar_profile_image); if (profileView != null && profileView instanceof ImageView) { return (ImageView) profileView; } return null; }
Source:
<code>public void testGetAllLoadBalancers() { List<LoadBalancer> loadBalancers = api.loadBalancerApi().getAllLoadBalancers(); <START> assertNotNull(loadBalancers); <END> assertFalse(loadBalancers.isEmpty()); }</code><technical_language>API return null lists. Remove this. Also, this executed creating load balancer</technical_language>

Target:
public void testGetAllLoadBalancers() { List<LoadBalancer> loadBalancers = api.loadBalancerApi().getAllLoadBalancers(); assertFalse(loadBalancers.isEmpty()); }
Source:
<code>public static HostAndPortRange parse(String addrStr, int dfltPortFrom, int dfltPortTo, String errMsgPrefix) throws IgniteCheckedException { assert dfltPortFrom <= dfltPortTo; String host; String portStr; int portFrom; int portTo; if (F.isEmpty(addrStr)) throw createParseError(addrStr, errMsgPrefix, "Address is empty"); <START> if (addrStr.contains("[")) { END> int hostEndIdx = addrStr.indexOf(']'); if (hostEndIdx == -1) { throw createParseError(addrStr, errMsgPrefix, "IPv6 host is incorrect"); } host = addrStr.substring(1, hostEndIdx); if (hostEndIdx == addrStr.length() - 1) { portFrom = dfltPortFrom; portTo = dfltPortTo; } else { portStr = addrStr.substring(hostEndIdx + 2); int[] ports = verifyPortStr(addrStr, errMsgPrefix, portStr); portFrom = ports[0]; portTo = ports[1]; } } else { final int colIdx = addrStr.indexOf(':'); if (colIdx > 0) { host = addrStr.substring(0, colIdx); portStr = addrStr.substring(colIdx + 1); int[] ports = verifyPortStr(addrStr, errMsgPrefix, portStr); portFrom = ports[0]; portTo = ports[1]; } else if (colIdx == 0) { throw createParseError(addrStr, errMsgPrefix, "Host name is empty"); } else { host = addrStr; portFrom = dfltPortFrom; portTo = dfltPortTo; } } return new HostAndPortRange(host, portFrom, portTo); }</code><technical_language>[ ] needed is a port, IPv6 address those</technical_language>

Target:
public static HostAndPortRange parse(String addrStr, int dfltPortFrom, int dfltPortTo, String errMsgPrefix) throws IgniteCheckedException { assert dfltPortFrom <= dfltPortTo; String host; String portStr; int portFrom; int portTo; if (F.isEmpty(addrStr)) throw createParseError(addrStr, errMsgPrefix, "Address is empty"); if (addrStr.charAt(0) == '[') { int hostEndIdx = addrStr.indexOf(']'); if (hostEndIdx == -1) throw createParseError(addrStr, errMsgPrefix, "Failed to parse IPv6 address, missing ']'"); host = addrStr.substring(1, hostEndIdx); if (hostEndIdx == addrStr.length() - 1) { portFrom = dfltPortFrom; portTo = dfltPortTo; } else { portStr = addrStr.substring(hostEndIdx + 2); int[] ports = verifyPortStr(addrStr, errMsgPrefix, portStr); portFrom = ports[0]; portTo = ports[1]; } } else { final int colIdx = addrStr.lastIndexOf(':'); if (colIdx > 0) { if (addrStr.lastIndexOf(':', colIdx - 1) != -1) { try { Inet6Address.getByName(addrStr); host = addrStr; portFrom = dfltPortFrom; portTo = dfltPortTo; } catch (UnknownHostException e) { throw createParseError(addrStr, errMsgPrefix, "IPv6 is incorrect", e); } } else { host = addrStr.substring(0, colIdx); portStr = addrStr.substring(colIdx + 1); int[] ports = verifyPortStr(addrStr, errMsgPrefix, portStr); portFrom = ports[0]; portTo = ports[1]; } } else if (colIdx == 0) throw createParseError(addrStr, errMsgPrefix, "Host name is empty"); else { host = addrStr; portFrom = dfltPortFrom; portTo = dfltPortTo; } } return new HostAndPortRange(host, portFrom, portTo); }
Source:
<code>public GenericRecord parse(ByteBuffer bytes) { <START> int schemaId = bytes.getInt(); <END> Schema schemaObj = schemaObjs.get(schemaId); if (schemaObj == null) { throw new IAE("Failed to find schema for id [%s]", schemaId); } DatumReader<GenericRecord> reader = new GenericDatumReader<GenericRecord>(schemaObj); ByteBufferInputStream inputStream = new ByteBufferInputStream(Collections.singletonList(bytes)); try { return reader.read(null, DecoderFactory.get().binaryDecoder(inputStream, null)); } catch (Exception e) { throw new ParseException(e, "Fail to decode avro message with schemaId [%s].", schemaId); } }</code><technical_language>If a record is properly formed, for example if ByteBuffer is empty, is throw a parse exception</technical_language>

Target:
public GenericRecord parse(ByteBuffer bytes) { if (bytes.remaining() < 5) { throw new ParseException("record must have at least 5 bytes carrying version and schemaId"); } byte version = bytes.get(); if (version != V1) { throw new ParseException("found record of arbitrary version [%s]", version); } int schemaId = bytes.getInt(); Schema schemaObj = schemaObjs.get(schemaId); if (schemaObj == null) { throw new ParseException("Failed to find schema for id [%s]", schemaId); } try { DatumReader<GenericRecord> reader = new GenericDatumReader<GenericRecord>(schemaObj); ByteBufferInputStream inputStream = new ByteBufferInputStream(Collections.singletonList(bytes)); return reader.read(null, DecoderFactory.get().binaryDecoder(inputStream, null)); } catch (Exception e) { throw new ParseException(e, "Fail to decode avro message with schemaId [%s].", schemaId); } }
Source:
<code>public void createPartControl(@Nullable Composite parent) { runAnalysis(); final LatencyDataStore data = getData(); SashForm sf = new SashForm(parent, SWT.NONE); <START> TableViewer tableViewer = new TableViewer(sf, SWT.FULL_SELECTION | SWT.VIRTUAL); <END> fTableViewer = new LatencyTableViewer(tableViewer, data); }</code><technical_language>I notice some display issues bottom visible rows blank scrolling down. bugs in TableViewer's virtual implementation, sure</technical_language>

Target:
public void createPartControl(@Nullable Composite parent) { SashForm sf = new SashForm(parent, SWT.NONE); TableViewer tableViewer = new TableViewer(sf, SWT.FULL_SELECTION | SWT.VIRTUAL); fTableViewer = new LatencyTableViewer(tableViewer); setInitialData(); }
Source:
<code>private void doGitActions() { DISPLAY.asyncExec(() -> { if (!scriptGeneratorViewModel.remoteAvailable()) { MessageDialog.openInformation(DISPLAY.getActiveShell(), "Git error", <START> "Could not connect to remote git repository"); <END> } if (scriptGeneratorViewModel.updatesAvailable()) { int performMerge = MessageDialog.open(MessageDialog.CONFIRM, DISPLAY.getActiveShell(), "Error pulling repository", scriptGeneratorViewModel.getPromptMessage(), 0, "Keep local changes", "Discard local changes and update"); if (performMerge == 1) { scriptGeneratorViewModel.mergeOrigin(); } } Optional<String> gitErrors = scriptGeneratorViewModel.getGitLoadErrors(); if (gitErrors.isPresent()) { MessageDialog.openInformation(DISPLAY.getActiveShell(), "Git errors occurred", gitErrors.get()); } }); scriptGeneratorViewModel.reloadScriptDefinitions(); scriptGeneratorViewModel.setRepoPath(); }</code><technical_language>I this error a bit more user-friendly. like: > update script definitions, remote git repository reached. continue existing script definitions, out of date. a user get error "could connect git", implications of obvious enough. give other errors a similar treatment</technical_language>

Target:
private void doGitActions() { DISPLAY.asyncExec(() -> { if (!scriptGeneratorViewModel.remoteAvailable()) { MessageDialog.openInformation(DISPLAY.getActiveShell(), "Git error", "Could not update script definitions, because the remote git repository could not be reached. " + "You can still continue to use the existing script definitions, but they may be out of date."); } if (scriptGeneratorViewModel.updatesAvailable()) { int performMerge = MessageDialog.open(MessageDialog.CONFIRM, DISPLAY.getActiveShell(), "Error pulling repository", scriptGeneratorViewModel.getPromptMessage(), 0, "Keep local changes", "Discard local changes and update"); if (performMerge == 1) { scriptGeneratorViewModel.mergeOrigin(); } } Optional<String> gitErrors = scriptGeneratorViewModel.getGitLoadErrors(); if (gitErrors.isPresent()) { MessageDialog.openInformation(DISPLAY.getActiveShell(), "Git errors occurred", gitErrors.get()); } }); scriptGeneratorViewModel.reloadScriptDefinitions(); scriptGeneratorViewModel.setRepoPath(); }
Source:
<code>public static File getUniqueFile(String fileName) { File tempFile = null; int i = 0; try { do { tempFile = new File(TMP_DIR + DIR_SEPARATOR + fileName + "-" + i + "." + KEY_FILENAME_EXT); i++; } while (tempFile.exists()); } catch (Exception e) { <START> System.err.println("Error: " + e.getMessage()); <END> } return tempFile; }</code><technical_language>dont catch, fail</technical_language>

Target:
public static File getUniqueFile(String fileName) { File tempFile = null; int i = 0; do { tempFile = new File(TMP_DIR + DIR_SEPARATOR + fileName + "-" + i + "." + KEY_FILENAME_EXT); i++; } while (tempFile.exists()); return tempFile; }
Source:
<code><START> protected static Long getLastOffset(String workId) { <END> String stringOffset = getKeyValueStore().getString(getOffsetKey(workId)); return stringOffset == null ? Long.valueOf(-1) : Long.parseLong(stringOffset); }</code><technical_language>long</technical_language>

Target:
protected static long getLastOffset(String workId) { String stringOffset = getKeyValueStore().getString(getOffsetKey(workId)); return stringOffset == null ? -1 : Long.parseLong(stringOffset); }
Source:
<code>public JSONObject listSequencePartitionContainersDataTable(HttpSession session, JSONObject json) { try { JSONObject j = new JSONObject(); JSONArray jsonArray = new JSONArray(); for (SequencerPartitionContainer<SequencerPoolPartition> spc : requestManager.listAllSequencerPartitionContainers()) { String run = ""; String sequencer = ""; if (spc.getRun() != null) { run = TableHelper.hyperLinkify("/miso/run/" + spc.getRun().getId(), spc.getRun().getAlias()); if (spc.getRun().getSequencerReference() != null) { sequencer = TableHelper.hyperLinkify("/miso/sequencer/" + spc.getRun().getSequencerReference().getId(), spc.getRun().getSequencerReference().getPlatform().getNameAndModel()); } } JSONArray inner = new JSONArray(); inner.add(isStringEmptyOrNull(spc.getIdentificationBarcode()) ? TableHelper.hyperLinkify("/miso/container/" + spc.getId(), spc.getIdentificationBarcode()) : ""); <START> inner.add(spc.getPlatform() != null && spc.getPlatform().getPlatformType() != null ? spc.getPlatform().getPlatformType().getKey() : ""); <END> inner.add(run); inner.add(sequencer); jsonArray.add(inner); } j.put("array", jsonArray); return j; } catch (IOException e) { log.error("Failed", e); return JSONUtils.SimpleJSONError("Failed: " + e.getMessage()); } }</code><technical_language>IdentificationBarcode is shown present. List unknown/"no barcode" missing</technical_language>

Target:
public JSONObject listSequencePartitionContainersDataTable(HttpSession session, JSONObject json) { try { JSONObject j = new JSONObject(); JSONArray jsonArray = new JSONArray(); for (SequencerPartitionContainer<SequencerPoolPartition> spc : requestManager.listAllSequencerPartitionContainers()) { String run = ""; String sequencer = ""; if (spc.getRun() != null) { run = TableHelper.hyperLinkify("/miso/run/" + spc.getRun().getId(), spc.getRun().getAlias()); if (spc.getRun().getSequencerReference() != null) { sequencer = TableHelper.hyperLinkify("/miso/sequencer/" + spc.getRun().getSequencerReference().getId(), spc.getRun().getSequencerReference().getPlatform().getNameAndModel()); } } String identificationBarcode = (isStringEmptyOrNull(spc.getIdentificationBarcode()) ? "Unknown Barcode" : spc.getIdentificationBarcode()); JSONArray inner = new JSONArray(); inner.add(TableHelper.hyperLinkify("/miso/container/" + spc.getId(),identificationBarcode)); inner.add(spc.getPlatform() != null && spc.getPlatform().getPlatformType() != null ? spc.getPlatform().getPlatformType().getKey() : ""); inner.add(run); inner.add(sequencer); jsonArray.add(inner); } j.put("array", jsonArray); return j; } catch (IOException e) { log.error("Failed", e); return JSONUtils.SimpleJSONError("Failed: " + e.getMessage()); } }
Source:
<code>public QueryResponse process(QueryResponse queryResponse) throws PluginExecutionException { if (queryResponse == null) { throw new PluginExecutionException("Cannot process null queryResponse"); } if (!queryResponse.getResults().isEmpty()) { String queryId = (String) queryResponse.getRequest().getProperties().get("id"); if (queryId != null) { Metacard metacard = getWorkspaceMetacard(queryId); <START> WorkspaceMetacardImpl workspaceMetacard = WorkspaceMetacardImpl.from(metacard); <END> if (WorkspaceMetacardImpl.isWorkspaceMetacard(workspaceMetacard)) { String queryIssuerEmail = subjectIdentity.getUniqueIdentifier(SecurityUtils.getSubject()); String workspaceOwnerEmail = AccessControlUtil.getOwner(workspaceMetacard); if (workspaceOwnerEmail.equals(queryIssuerEmail)) { emailNotifierService.sendEmailsForWorkspace(workspaceMetacard, 1L); } } } } return queryResponse; }</code><technical_language>want StringUtils.isEmpty check for blank strings</technical_language>

Target:
public QueryResponse process(QueryResponse queryResponse) throws PluginExecutionException { if (queryResponse == null) { throw new PluginExecutionException("Cannot process null queryResponse"); } if (queryResponse.getResults().isEmpty()) { return queryResponse; } String queryId = (String) queryResponse.getRequest().getProperties().get("id"); if (!StringUtils.isEmpty(queryId)) { Metacard metacard = getWorkspaceMetacard(queryId); if (metacard == null) { LOGGER.debug("Could not retrieve workspace metacard."); return queryResponse; } WorkspaceMetacardImpl workspaceMetacard = WorkspaceMetacardImpl.from(metacard); String queryIssuerEmail = subjectIdentity.getUniqueIdentifier(SecurityUtils.getSubject()); String workspaceOwnerEmail = AccessControlUtil.getOwner(workspaceMetacard); if (!queryIssuerEmail.equals(workspaceOwnerEmail)) { LOGGER.debug("Query was not issued by the owner of the workspace."); return queryResponse; } emailNotifierService.sendEmailsForWorkspace(workspaceMetacard, queryResponse.getHits()); } return queryResponse; }
Source:
<code>private void initialize() { if (properties == null) { logger.debug("Retrieve properties from the license properties file"); properties = LicenseConfiguration.getConfiguration().getProperties(); logger.debug("Initializing LicenseSynchronization"); licenseSynchronization = new LicenseSynchronization(); Enumeration propertyNames = properties.propertyNames(); while (propertyNames.hasMoreElements()) { String software = (String) propertyNames.nextElement(); <START> int nbTokens = Integer.parseInt(properties.getProperty(software)); <END> if (nbTokens > 0) { licenseSynchronization.addSoftware(software, nbTokens); } else { licenseSynchronization.addSoftware(software, -1); } } licenseSynchronization.persist(); } }</code><technical_language>please catch eventual exception add a logger error message in case of wrong format</technical_language>

Target:
private void initialize() { if (properties == null) { logger.debug("Retrieve properties from the license properties file"); properties = LicenseConfiguration.getConfiguration().getProperties(); logger.debug("Initializing LicenseSynchronization"); licenseSynchronization = new LicenseSynchronization(); Enumeration propertyNames = properties.propertyNames(); while (propertyNames.hasMoreElements()) { String software = (String) propertyNames.nextElement(); int nbTokens; try { nbTokens = Integer.parseInt(properties.getProperty(software)); } catch (NumberFormatException e) { logger.debug("Fatal error, cannot parse token number from the license properties file"); throw e; } if (nbTokens > 0) { licenseSynchronization.addSoftware(software, nbTokens); } else { licenseSynchronization.addSoftware(software, -1); } } licenseSynchronization.persist(); } }
Source:
<code>public int countItems(Context context, EPerson submitter, boolean includeArchived, boolean includeWithdrawn) throws SQLException { Query query = createQuery(context, "SELECT count(*) FROM Item i join i.submitter submitter WHERE i" + <START> ".inArchive=:in_archive AND i.withdrawn=:withdrawn AND submitter = :submitter"); <END> query.setParameter("submitter", submitter); query.setParameter("in_archive", includeArchived); query.setParameter("withdrawn", includeWithdrawn); return count(query); }</code><technical_language>A minor thing, this is awkward line break. i.inArchive line (to this query easier read), instead of splitting lines</technical_language>

Target:
public int countItems(Context context, EPerson submitter, boolean includeArchived, boolean includeWithdrawn) throws SQLException { Query query = createQuery(context, "SELECT count(*) FROM Item i join i.submitter submitter " + "WHERE i.inArchive=:in_archive AND i.withdrawn=:withdrawn AND submitter = :submitter"); query.setParameter("submitter", submitter); query.setParameter("in_archive", includeArchived); query.setParameter("withdrawn", includeWithdrawn); return count(query); }
Source:
<code>public void shouldDebugCliPhpScriptFromFirstLine() { menu.runCommand( TestMenuCommandsConstants.Run.RUN_MENU, TestMenuCommandsConstants.Run.EDIT_DEBUG_CONFIGURATION); debugConfig.createConfig(PROJECT); menu.runCommandByXpath( TestMenuCommandsConstants.Run.RUN_MENU, TestMenuCommandsConstants.Run.DEBUG, getXpathForDebugConfigurationMenuItem()); notificationPopup.waitExpectedMessageOnProgressPanelAndClosed("Remote debugger connected"); projectExplorer.openItemByPath(PATH_TO_LIB_PHP); <START> editor.setBreakpoint(14); <END> editor.closeAllTabs(); projectExplorer.openItemByPath(PATH_TO_INDEX_PHP); projectExplorer.invokeCommandWithContextMenu( ProjectExplorer.CommandsGoal.COMMON, PROJECT, DEBUG_PHP_SCRIPT_COMMAND_NAME); debugPanel.openDebugPanel(); debugPanel.waitDebugHighlightedText("<?php include 'lib.php';?>"); debugPanel.waitTextInVariablesPanel("$_GET=array [0]"); debugPanel.clickOnButton(DebugPanel.DebuggerButtonsPanel.RESUME_BTN_ID); editor.waitTabFileWithSavedStatus("lib.php"); debugPanel.waitDebugHighlightedText("return \"Hello, $name\""); debugPanel.waitTextInVariablesPanel("$name=\"man\""); debugPanel.clickOnButton(DebugPanel.DebuggerButtonsPanel.STEP_OUT); editor.waitTabFileWithSavedStatus("index.php"); debugPanel.waitDebugHighlightedText("echo sayHello(\"man\");"); debugPanel.waitTextInVariablesPanel("$_GET=array [0]"); }</code><technical_language>important part of test ensure breakpoint active in some time</technical_language>

Target:
public void shouldDebugCliPhpScriptFromFirstLine() { menu.runCommand( TestMenuCommandsConstants.Run.RUN_MENU, TestMenuCommandsConstants.Run.EDIT_DEBUG_CONFIGURATION); debugConfig.createConfig(PROJECT); menu.runCommandByXpath( TestMenuCommandsConstants.Run.RUN_MENU, TestMenuCommandsConstants.Run.DEBUG, getXpathForDebugConfigurationMenuItem()); notificationPopup.waitExpectedMessageOnProgressPanelAndClosed("Remote debugger connected"); projectExplorer.openItemByPath(PATH_TO_LIB_PHP); editor.setBreakpoint(14); editor.closeAllTabs(); projectExplorer.openItemByPath(PATH_TO_INDEX_PHP); projectExplorer.invokeCommandWithContextMenu( ProjectExplorer.CommandsGoal.COMMON, PROJECT, DEBUG_PHP_SCRIPT_COMMAND_NAME); debugPanel.openDebugPanel(); debugPanel.waitDebugHighlightedText("<?php include 'lib.php';?>"); debugPanel.waitTextInVariablesPanel("$_GET=array [0]"); debugPanel.clickOnButton(DebugPanel.DebuggerButtonsPanel.RESUME_BTN_ID); editor.waitTabFileWithSavedStatus("lib.php"); editor.waitAcitveBreakpoint(14); debugPanel.waitDebugHighlightedText("return \"Hello, $name\""); debugPanel.waitTextInVariablesPanel("$name=\"man\""); debugPanel.clickOnButton(DebugPanel.DebuggerButtonsPanel.STEP_OUT); editor.waitTabFileWithSavedStatus("index.php"); debugPanel.waitDebugHighlightedText("echo sayHello(\"man\");"); debugPanel.waitTextInVariablesPanel("$_GET=array [0]"); }
Source:
<code>public MongoSendTask(Context pContext) { context = pContext; PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE); <START> wakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "WifiReader"); <END> wakeLock.acquire(); lockCounter++; Log.e(TAG,"MongosendTask - wakelock acquired " + lockCounter); }</code><technical_language>I guess this "WifiReader"</technical_language>

Target:
public MongoSendTask(Context pContext) { context = pContext; PowerManager pm = (PowerManager) context.getSystemService(Context.POWER_SERVICE); wakeLock = pm.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "MongoSendTask"); wakeLock.acquire(); lockCounter++; Log.e(TAG,"MongosendTask - wakelock acquired " + lockCounter); }