auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void postProcessorsAreMergedDuringMockMvcPerform() throws Exception { RequestBuilder requestBuilder = formLogin() .user("my-user") .password("my-password") .loginProcessingUrl("/my-path"); RequestBuilder defaultRequestBuilder = MockMvcRequestBuilders.get("/"); if (defaultRequestBuilder instanceof ConfigurableSmartRequestBuilder) { ((ConfigurableSmartRequestBuilder) defaultRequestBuilder).with(new MockPostProcessor()); } if (defaultRequestBuilder != null && requestBuilder instanceof Mergeable ) { requestBuilder = (RequestBuilder) ((Mergeable) requestBuilder).merge(defaultRequestBuilder); } MockHttpServletRequest request = requestBuilder.buildRequest(this.servletContext); Assert.isInstanceOf(ConfigurableSmartRequestBuilder.class, requestBuilder); Assert.isTrue(request.equals(((SmartRequestBuilder) requestBuilder).postProcessRequest(request)), "Postprocessing failed."); }

Target:
public void postProcessorsAreMergedDuringMockMvcPerform() throws Exception { RequestPostProcessor postProcessor = mock(RequestPostProcessor.class); when(postProcessor.postProcessRequest(any())).thenAnswer(i -> i.getArgument(0)); MockMvc mockMvc = MockMvcBuilders.standaloneSetup(new Object()) .defaultRequest(MockMvcRequestBuilders.get("/").with(postProcessor)) .build(); MvcResult mvcResult = mockMvc.perform(formLogin()).andReturn(); assertThat(mvcResult.getRequest().getMethod()).isEqualTo(HttpMethod.POST.name()); assertThat(mvcResult.getRequest().getHeader("Accept")) .isEqualTo(MediaType.toString(Arrays.asList(MediaType.APPLICATION_FORM_URLENCODED))); assertThat(mvcResult.getRequest().getParameter("username")).isEqualTo("user"); assertThat(mvcResult.getRequest().getParameter("password")).isEqualTo("password"); assertThat(mvcResult.getRequest().getRequestURI()).isEqualTo("/login"); assertThat(mvcResult.getRequest().getParameter("_csrf")).isNotEmpty(); verify(postProcessor).postProcessRequest(any()); }
Source:
public Observable<ObservableConnection<I, O>> acquire() { if (isShutdownRequested.get()) { return Observable.error(new IllegalStateException("Connection pool is already shutdown.")); } return Observable.create(new Observable.OnSubscribe<ObservableConnection<I, O>>() { @Override public void call(final Subscriber<? super ObservableConnection<I, O>> subscriber) { Lock lock = shutdownLock.readLock(); boolean lockRetrieved = lock.tryLock(); try { if (!lockRetrieved || isShutdownRequested.get()) { subscriber.onError(new IllegalStateException("Connection pool is already shutdown.")); return; } performAquire(subscriber); } finally { lock.unlock(); } } }); }

Target:
public Observable<ObservableConnection<I, O>> acquire() { return Observable.create(new Observable.OnSubscribe<ObservableConnection<I, O>>() { @Override public void call(final Subscriber<? super ObservableConnection<I, O>> subscriber) { Lock lock = shutdownLock.readLock(); boolean lockRetrieved = lock.tryLock(); if (!lockRetrieved) { subscriber.onError(new IllegalStateException("Connection pool is already shutdown.")); return; } try { if (isShutdownRequested.get()) { subscriber.onError(new IllegalStateException("Connection pool is already shutdown.")); return; } performAquire(subscriber); } finally { lock.unlock(); } } }); }
Source:
private UsbControllerModel getUsbControllerModel(VmBase vmBase) { Supplier<Cluster> clusterSupplier = () -> getCluster(vmBase.getClusterId()); Version version = CompatibilityVersionUtils.getEffective(vmBase, clusterSupplier); BiosType biosType = BiosTypeUtils.getEffective(vmBase, clusterSupplier); return osRepository.getOsUsbControllerModel(vmBase.getOsId(), version, biosType.getChipsetType()); }

Target:
private UsbControllerModel getUsbControllerModel(VmBase vmBase) { MemoizingSupplier<Cluster> clusterSupplier = new MemoizingSupplier<>(() -> getCluster(vmBase.getClusterId())); Version version = CompatibilityVersionUtils.getEffective(vmBase, clusterSupplier); BiosType biosType = BiosTypeUtils.getEffective(vmBase, clusterSupplier); return osRepository.getOsUsbControllerModel(vmBase.getOsId(), version, biosType.getChipsetType()); }
Source:
private ISeries getSeries() { AbstractSegmentStoreDensityViewer densityViewer = fFuncDensityView.getDensityViewer(); assertNotNull(densityViewer); ISeries[] serieses = densityViewer.getControl().getSeriesSet().getSeries(); assertNotNull(serieses); assertTrue(serieses.length > 0); ISeries series = serieses[0]; assertNotNull(series); return series; }

Target:
private ISeries getSeries() { AbstractSegmentStoreDensityViewer densityViewer = fDensityViewer; assertNotNull(densityViewer); ISeries[] serieses = densityViewer.getControl().getSeriesSet().getSeries(); assertNotNull(serieses); assertTrue(serieses.length > 0); ISeries series = serieses[0]; assertNotNull(series); return series; }
Source:
public void testNoSelfSuppression() throws IOException { AsyncWriterPool pool = new AsyncWriterPool(4); File file = File.createTempFile("AsyncPoolWriterTest", ".tmp"); TestWriter writer = new TestWriter(file.toPath()); Writer<String> pooledWriter = pool.pool(writer, new LinkedBlockingQueue<>(), 1); writer.close(); try { pooledWriter.write("Exception"); pooledWriter.close(); Assert.fail("Expected exception"); } catch (Exception e) { } try { pooledWriter.write("Third Exception"); Assert.fail("Expected exception"); } catch (RuntimeIOException e) { } }

Target:
public void testNoSelfSuppression() throws IOException { AsyncWriterPool pool = new AsyncWriterPool(4); File file = File.createTempFile("AsyncPoolWriterTest", ".tmp"); file.deleteOnExit(); TestWriter writer = new TestWriter(file.toPath()); Writer<String> pooledWriter = pool.pool(writer, new LinkedBlockingQueue<>(), 1); writer.close(); try { pooledWriter.write("Exception"); pooledWriter.close(); Assert.fail("Expected exception"); } catch (Exception e) { } try { pooledWriter.write("Third Exception"); Assert.fail("Expected exception"); } catch (RuntimeIOException e) { } }
Source:
MatchResults matchIndexEntry(ExpressionOrColumn indexEntry) { if (isDead() || isDone()) { return MatchResults.DONE_OR_DEAD; } else if ( ! m_partitionByExprs.isEmpty() ) { List<AbstractExpression> moreBindings = null; for (ExpressionOrColumn eorc : m_partitionByExprs) { moreBindings = ExpressionOrColumn.findBindingsForOneIndexedExpression(eorc, indexEntry); if (moreBindings != null) { m_orderedMatchingExpressions.add(eorc.m_expr); while (m_partitionByExprs.remove(eorc)) { ; } m_bindings.addAll(moreBindings); return MatchResults.MATCHED; } } markDead(); return MatchResults.DONE_OR_DEAD; } else { ExpressionOrColumn nextStatementEOC = m_unmatchedOrderByExprs.get(0); if (m_sortDirection == SortDirectionType.INVALID) { m_sortDirection = nextStatementEOC.sortDirection(); } if (nextStatementEOC.sortDirection() != m_sortDirection) { markDead(); return MatchResults.DONE_OR_DEAD; } final List<AbstractExpression> moreBindings = ExpressionOrColumn.findBindingsForOneIndexedExpression(nextStatementEOC, indexEntry); if (moreBindings != null) { m_orderedMatchingExpressions.add(nextStatementEOC.m_expr); m_bindings.addAll(moreBindings); while (m_unmatchedOrderByExprs.remove(nextStatementEOC)) { ; } return MatchResults.MATCHED; } else { assert 0 <= indexEntry.m_indexKeyComponentPosition; if (isWindowFunction()) { markDead(); return MatchResults.DONE_OR_DEAD; } else { return MatchResults.POSSIBLE_ORDER_SPOILER; } } } }

Target:
MatchResults matchIndexEntry(ExpressionOrColumn indexEntry) { if (isDead() || isDone()) { return MatchResults.DONE_OR_DEAD; } else if ( ! m_partitionByExprs.isEmpty()) { List<AbstractExpression> moreBindings = null; for (ExpressionOrColumn eorc : m_partitionByExprs) { moreBindings = ExpressionOrColumn.findBindingsForOneIndexedExpression(eorc, indexEntry); if (moreBindings != null) { m_orderedMatchingExpressions.add(eorc.m_expr); m_partitionByExprs.removeAll(Collections.singleton(eorc)); m_bindings.addAll(moreBindings); return MatchResults.MATCHED; } } markDead(); return MatchResults.DONE_OR_DEAD; } else { ExpressionOrColumn nextStatementEOC = m_unmatchedOrderByExprs.get(0); if (m_sortDirection == SortDirectionType.INVALID) { m_sortDirection = nextStatementEOC.sortDirection(); } if (nextStatementEOC.sortDirection() != m_sortDirection) { markDead(); return MatchResults.DONE_OR_DEAD; } final List<AbstractExpression> moreBindings = ExpressionOrColumn.findBindingsForOneIndexedExpression(nextStatementEOC, indexEntry); if (moreBindings != null) { m_orderedMatchingExpressions.add(nextStatementEOC.m_expr); m_bindings.addAll(moreBindings); m_unmatchedOrderByExprs.removeAll(Collections.singleton(nextStatementEOC)); return MatchResults.MATCHED; } else { assert 0 <= indexEntry.m_indexKeyComponentPosition; if (isWindowFunction()) { markDead(); return MatchResults.DONE_OR_DEAD; } else { return MatchResults.POSSIBLE_ORDER_SPOILER; } } } }
Source:
public XWikiAttachment setAttachment(XWikiAttachment attachment) { attachment.setDoc(this); XWikiAttachmentList list = getAttachmentList(); XWikiAttachment currentAttachment = list.getByFilename(attachment.getFilename()); list.set(attachment); return currentAttachment; }

Target:
public XWikiAttachment setAttachment(XWikiAttachment attachment) { return this.attachmentList.set(attachment); }
Source:
protected Class<?> getCommandType() { return IChangeReverseMethodHandler.class; }

Target:
protected Class<?> getCommandType() { return IReverseToggleHandler.class; }
Source:
public void start(Xid xid, int flags) throws XAException { log.infof("start xid: [%s], flags: %s", xid, flags); }

Target:
public void start(Xid xid, int flags) throws XAException { log.tracef("start xid: [%s], flags: %s", xid, flags); }
Source:
private void assertMapper(Optional<RowMapper<?>> mapper, Tuple expected) throws SQLException { assertTrue(mapper.isPresent()); assertThat(mapper.get(), isA(RowMapper.class)); assertThat(mapper.get().map(null, null), is(expected)); }

Target:
private void assertMapper(Optional<RowMapper<?>> mapper, Tuple expected) throws SQLException { assertThat(mapper.isPresent()); assertThat(mapper.get()).isInstanceOf(RowMapper.class); assertThat(mapper.get().map(null, null)).isEqualTo(expected); }
Source:
public final void configure(final MapperFactory mapperFactory) { mapperFactory.getConverterFactory().registerConverter(new AlarmRegisterConverter()); mapperFactory.getConverterFactory().registerConverter( this.applicationContext.getBean(ActualMeterReadsConverter.class)); mapperFactory.getConverterFactory().registerConverter( this.applicationContext.getBean(ActualMeterReadsGasConverter.class)); mapperFactory.getConverterFactory().registerConverter(new PeriodicMeterReadsRequestConverter()); mapperFactory.getConverterFactory().registerConverter( this.applicationContext.getBean(PeriodicMeterReadsResponseConverter.class)); mapperFactory.getConverterFactory().registerConverter( this.applicationContext.getBean(PeriodicMeterReadsGasResponseConverter.class)); mapperFactory.getConverterFactory().registerConverter(new AmrProfileStatusCodeConverter()); }

Target:
public final void configure(final MapperFactory mapperFactory) { mapperFactory.getConverterFactory().registerConverter( this.applicationContext.getBean(AlarmRegisterConverter.class)); mapperFactory.getConverterFactory().registerConverter( this.applicationContext.getBean(ActualMeterReadsConverter.class)); mapperFactory.getConverterFactory().registerConverter( this.applicationContext.getBean(ActualMeterReadsGasConverter.class)); mapperFactory.getConverterFactory().registerConverter( this.applicationContext.getBean(PeriodicMeterReadsRequestConverter.class)); mapperFactory.getConverterFactory().registerConverter( this.applicationContext.getBean(PeriodicMeterReadsResponseConverter.class)); mapperFactory.getConverterFactory().registerConverter( this.applicationContext.getBean(PeriodicMeterReadsGasResponseConverter.class)); mapperFactory.getConverterFactory().registerConverter( this.applicationContext.getBean(AmrProfileStatusCodeConverter.class)); }
Source:
public ZombieType getType() { return type; }

Target:
private ZombieType getType() { return this.type; }
Source:
private ClassName(List<String> names) { for (int i = 1; i < names.size(); i++) { checkArgument(SourceVersion.isName(names.get(i)), "part '%s' is keyword", names.get(i)); } this.names = Util.immutableList(names); this.canonicalName = (names.get(0) == null || names.get(0).isEmpty()) ? Util.join(".", names.subList(1, names.size())) : Util.join(".", names); }

Target:
private ClassName(List<String> names) { for (int i = 1; i < names.size(); i++) { checkArgument(SourceVersion.isName(names.get(i)), "part '%s' is keyword", names.get(i)); } this.names = Util.immutableList(names); this.canonicalName = names.get(0).isEmpty() ? Util.join(".", names.subList(1, names.size())) : Util.join(".", names); }
Source:
private void _preparePeriod() { Clock pc = getClock(Clock.ID_PERIOD); Clock jc = getClock(Clock.ID_JAM); requestBatchStart(); set(Value.CURRENT_PERIOD, getOrCreatePeriod(getCurrentPeriodNumber()+1)); if (getRulesets().getBoolean(Rule.JAM_NUMBER_PER_PERIOD)) { getUpcomingJam().set(IValue.NUMBER, 1, Flag.INTERNAL); scoreBoardChange(new ScoreBoardEvent(jc,Clock.Value.NUMBER, 0, jc.getNumber())); } pc.resetTime(); jc.resetTime(); restartPcAfterTimeout = false; for (ValueWithId t : getAll(Child.TEAM)) { ((Team)t).recountTimeouts(); } requestBatchEnd(); }

Target:
private void _preparePeriod() { Clock pc = getClock(Clock.ID_PERIOD); Clock jc = getClock(Clock.ID_JAM); requestBatchStart(); set(Value.CURRENT_PERIOD, getOrCreatePeriod(getCurrentPeriodNumber()+1)); if (getRulesets().getBoolean(Rule.JAM_NUMBER_PER_PERIOD)) { getUpcomingJam().set(IValue.NUMBER, 1, Flag.INTERNAL); scoreBoardChange(new ScoreBoardEvent(jc,Clock.Value.NUMBER, 0, jc.getNumber())); } pc.resetTime(); jc.resetTime(); restartPcAfterTimeout = false; requestBatchEnd(); }
Source:
private static List<String> list(String... values) { return new LinkedList<>(Arrays.asList(values)); }

Target:
private static List<String> list(String... values) { return Arrays.asList(values); }
Source:
private boolean shouldRefresh(EObject instance) { boolean shouldRefresh = instance != null && part.isActive() && part.resolveSemanticElement() instanceof DSemanticDecorator; DSemanticDecorator semanticDecorator = (DSemanticDecorator) part.resolveSemanticElement(); EObject target = semanticDecorator.getTarget(); boolean isConcerningEditPart = shouldRefresh && (instance.equals(target) || instance.equals(semanticDecorator)); boolean isConcerningDiagramEditPart = shouldRefresh && semanticDecorator instanceof DDiagramElement && target != null && instance.equals(((DDiagramElement) semanticDecorator).getParentDiagram()); return shouldRefresh && (isConcerningEditPart || isConcerningDiagramEditPart); }

Target:
private boolean shouldRefresh(EObject instance) { boolean shouldRefresh = instance != null && part.isActive() && part.resolveSemanticElement() instanceof DSemanticDecorator; if (shouldRefresh) { DSemanticDecorator semanticDecorator = (DSemanticDecorator) part.resolveSemanticElement(); EObject target = semanticDecorator.getTarget(); boolean isConcerningEditPart = instance.equals(target) || instance.equals(semanticDecorator); boolean isConcerningDiagramEditPart = semanticDecorator instanceof DDiagramElement && target != null && instance.equals(((DDiagramElement) semanticDecorator).getParentDiagram()); shouldRefresh = isConcerningEditPart || isConcerningDiagramEditPart; } return shouldRefresh; }
Source:
public void initialize() throws InitializationException { boqa = new BOQA(); boqa.setConsiderFrequenciesOnly(false); boqa.setPrecalculateScoreDistribution(false); boqa.setCacheScoreDistribution(false); boqa.setPrecalculateItemMaxs(false); boqa.setPrecalculateMaxICs(false); boqa.setMaxFrequencyTerms(2); boqa.setPrecalculateJaccard(false); GlobalPreferences.setProxyPort(888); GlobalPreferences.setProxyHost("realproxy.charite.de"); String annotationPath = null; String ontologyPath = null; try { annotationPath = stream2file(BOQA.class.getClassLoader().getResourceAsStream("new_phenotype.gz")).getPath(); ontologyPath = stream2file(BOQA.class.getClassLoader().getResourceAsStream("hp.obo.gz")).getPath(); } catch (IOException e) { throw new InitializationException(e.getMessage()); } Datafiles df = null; try { df = new Datafiles(ontologyPath, annotationPath); } catch (InterruptedException e) { throw new InitializationException(e.getMessage()); } catch (IOException e) { throw new InitializationException(e.getMessage()); } boqa.setup(df.graph, df.assoc); Set<Map.Entry<ByteString, Integer>> omimtonum = boqa.item2Index.entrySet(); this.omimMap = new HashMap<Integer, ByteString>(omimtonum.size()); for (Map.Entry<ByteString, Integer> item : omimtonum) { this.omimMap.put(item.getValue(), item.getKey()); } }

Target:
public void initialize() throws InitializationException { boqa = new BOQA(); boqa.setConsiderFrequenciesOnly(false); boqa.setPrecalculateScoreDistribution(false); boqa.setCacheScoreDistribution(false); boqa.setPrecalculateItemMaxs(false); boqa.setPrecalculateMaxICs(false); boqa.setMaxFrequencyTerms(2); boqa.setPrecalculateJaccard(false); String annotationPath = null; String ontologyPath = null; try { annotationPath = stream2file(BOQA.class.getClassLoader().getResourceAsStream("new_phenotype.gz")).getPath(); ontologyPath = stream2file(BOQA.class.getClassLoader().getResourceAsStream("hp.obo.gz")).getPath(); } catch (IOException e) { throw new InitializationException(e.getMessage()); } Datafiles df = null; try { df = new Datafiles(ontologyPath, annotationPath); } catch (InterruptedException e) { throw new InitializationException(e.getMessage()); } catch (IOException e) { throw new InitializationException(e.getMessage()); } boqa.setup(df.graph, df.assoc); Set<Map.Entry<ByteString, Integer>> omimtonum = boqa.item2Index.entrySet(); this.omimMap = new HashMap<Integer, ByteString>(omimtonum.size()); for (Map.Entry<ByteString, Integer> item : omimtonum) { this.omimMap.put(item.getValue(), item.getKey()); } }
Source:
protected void setCanceled(boolean canceled) { this.canceled = canceled; if (this.canceled) { setReregistrationHandle(null); } if (this.canceled && notificationListener != null) { endpoint.removeNotificationListener(notificationListener); } }

Target:
protected void setCanceled(boolean canceled) { this.canceled = canceled; if (this.canceled) { setReregistrationHandle(null); if (notificationListener != null) { endpoint.removeNotificationListener(notificationListener); } } }
Source:
public void onMetricMsg(final String srcId, final MetricMsg metricMsg) { if (metricMsg.getTableToNumBlocks().isEmpty()) { return; } if (isServerMetrics(metricMsg)) { final String hostname = metricMsg.getHostname(); final ServerMetrics serverMetrics = ServerMetrics.newBuilder() .setNumModelBlocks(metricMsg.getTableToNumBlocks().getOrDefault(MODEL_TABLE_ID, 0)) .setHostname(hostname) .build(); metricManager.storeServerMetrics(srcId, serverMetrics); } else { processWorkerMetrics(srcId, metricMsg); } }

Target:
public void onMetricMsg(final String srcId, final MetricMsg metricMsg) { if (metricMsg.getTableToNumBlocks().isEmpty()) { return; } if (isServerMetrics(metricMsg)) { processServerMetrics(srcId, metricMsg); } else { processWorkerMetrics(srcId, metricMsg); } }
Source:
public static DocumentModel moveContentToColdStorage(CoreSession session, DocumentRef documentRef) { DocumentModel documentModel = session.getDocument(documentRef); Serializable mainContent = documentModel.getPropertyValue(FILE_CONTENT_PROPERTY); log.debug("Move to cold storage the main content of document: {}", documentModel); if (!session.getPrincipal().isAdministrator() && !session.hasPermission(documentRef, SecurityConstants.WRITE_COLD_STORAGE)) { throw new NuxeoException(String.format("The document cannot be moved to cold storage", documentRef), SC_FORBIDDEN); } else if (documentModel.hasFacet(FacetNames.COLD_STORAGE) && documentModel.getPropertyValue(COLD_STORAGE_CONTENT_PROPERTY) != null) { throw new NuxeoException( String.format("The main content for document: %s is already in cold storage.", documentModel), SC_CONFLICT); } else if (mainContent == null) { throw new NuxeoException(String.format("There is no main content for document: %s.", documentModel), SC_NOT_FOUND); } documentModel.addFacet(FacetNames.COLD_STORAGE); documentModel.setPropertyValue(COLD_STORAGE_CONTENT_PROPERTY, mainContent); documentModel.setPropertyValue(FILE_CONTENT_PROPERTY, null); return documentModel; }

Target:
public static DocumentModel moveContentToColdStorage(CoreSession session, DocumentRef documentRef) { DocumentModel documentModel = session.getDocument(documentRef); log.debug("Move to cold storage the main content of document: {}", documentModel); if (!session.hasPermission(documentRef, SecurityConstants.WRITE_COLD_STORAGE)) { log.debug("The user does not have the right permissions to move the content of document {}", session::getPrincipal, () -> documentModel); throw new NuxeoException(String.format("The document: %s cannot be moved to cold storage", documentRef), SC_FORBIDDEN); } if (documentModel.hasFacet(FacetNames.COLD_STORAGE) && documentModel.getPropertyValue(COLD_STORAGE_CONTENT_PROPERTY) != null) { throw new NuxeoException( String.format("The main content for document: %s is already in cold storage.", documentModel), SC_CONFLICT); } Serializable mainContent = documentModel.getPropertyValue(FILE_CONTENT_PROPERTY); if (mainContent == null) { throw new NuxeoException(String.format("There is no main content for document: %s.", documentModel), SC_NOT_FOUND); } documentModel.addFacet(FacetNames.COLD_STORAGE); documentModel.setPropertyValue(COLD_STORAGE_CONTENT_PROPERTY, mainContent); documentModel.setPropertyValue(FILE_CONTENT_PROPERTY, null); return documentModel; }
Source:
public boolean containsOperator(final CigarOperator operator) { for(final CigarElement cigarElement : this.cigarElements) { if( cigarElement.getOperator() == operator) return true; } return false; }

Target:
public boolean containsOperator(final CigarOperator operator) { return this.cigarElements.stream().anyMatch( element -> element.getOperator() == operator); }
Source:
static Expr parse(String in, ExprMacroTable macroTable, boolean withFlatten) { if (log.isDebugEnabled()) { log.debug("parse expression [" + in + "]"); } ExprLexer lexer = new ExprLexer(new ANTLRInputStream(in)); CommonTokenStream tokens = new CommonTokenStream(lexer); ExprParser parser = new ExprParser(tokens); parser.setBuildParseTree(true); ParseTree parseTree = parser.expr(); ParseTreeWalker walker = new ParseTreeWalker(); ExprListenerImpl listener = new ExprListenerImpl(parseTree, macroTable); walker.walk(listener, parseTree); return withFlatten ? flatten(listener.getAST()) : listener.getAST(); }

Target:
static Expr parse(String in, ExprMacroTable macroTable, boolean withFlatten) { ExprLexer lexer = new ExprLexer(new ANTLRInputStream(in)); CommonTokenStream tokens = new CommonTokenStream(lexer); ExprParser parser = new ExprParser(tokens); parser.setBuildParseTree(true); ParseTree parseTree = parser.expr(); ParseTreeWalker walker = new ParseTreeWalker(); ExprListenerImpl listener = new ExprListenerImpl(parseTree, macroTable); walker.walk(listener, parseTree); return withFlatten ? flatten(listener.getAST()) : listener.getAST(); }
Source:
private void createConstructorAndBuilder() { List<ExecutableElement> constructors = new ArrayList<>(); for (Element e : annotatedElement.getEnclosedElements()) { if (e.getKind() == CONSTRUCTOR) { constructors.add((ExecutableElement) e); } } for (ExecutableElement userConstructor : constructors) { JMethod copyConstructor = generatedClass.constructor(PUBLIC); JMethod staticHelper = generatedClass.method(PUBLIC | STATIC, generatedClass._extends(), "build"); codeModelHelper.generify(staticHelper, getAnnotatedElement()); JBlock body = copyConstructor.body(); JInvocation superCall = body.invoke("super"); AbstractJClass narrowedGeneratedClass = narrow(generatedClass); JInvocation newInvocation = JExpr._new(narrowedGeneratedClass); for (VariableElement param : userConstructor.getParameters()) { String paramName = param.getSimpleName().toString(); AbstractJClass paramType = codeModelHelper.typeMirrorToJClass(param.asType()); copyConstructor.param(paramType, paramName); staticHelper.param(paramType, paramName); superCall.arg(JExpr.ref(paramName)); newInvocation.arg(JExpr.ref(paramName)); } JVar newCall = staticHelper.body().decl(narrowedGeneratedClass, "instance", newInvocation); OnFinishInflateCallBlock callBlock = new OnFinishInflateCallBlock(staticHelper.body().blockSimple(), body.blockSimple(), newCall); staticHelper.body()._return(newCall); onFinishInflateCallBlock.add(callBlock); } }

Target:
private void createConstructorAndBuilder() { List<ExecutableElement> constructors = new ArrayList<>(); for (Element e : annotatedElement.getEnclosedElements()) { if (e.getKind() == CONSTRUCTOR) { constructors.add((ExecutableElement) e); } } for (ExecutableElement userConstructor : constructors) { JMethod copyConstructor = generatedClass.constructor(PUBLIC); JMethod staticHelper = generatedClass.method(PUBLIC | STATIC, generatedClass._extends(), "build"); codeModelHelper.generify(staticHelper, getAnnotatedElement()); JBlock body = copyConstructor.body(); JInvocation superCall = body.invoke("super"); AbstractJClass narrowedGeneratedClass = narrow(generatedClass); JInvocation newInvocation = JExpr._new(narrowedGeneratedClass); for (VariableElement param : userConstructor.getParameters()) { String paramName = param.getSimpleName().toString(); AbstractJClass paramType = codeModelHelper.typeMirrorToJClass(param.asType()); copyConstructor.param(paramType, paramName); staticHelper.param(paramType, paramName); superCall.arg(JExpr.ref(paramName)); newInvocation.arg(JExpr.ref(paramName)); } JVar newCall = staticHelper.body().decl(narrowedGeneratedClass, "instance", newInvocation); OnFinishInflateCallBlock callBlock = new OnFinishInflateCallBlock(staticHelper.body().blockVirtual(), newCall); onFinishInflateCallBlocks.add(callBlock); staticHelper.body()._return(newCall); body.invoke(getInit()); } }
Source:
protected void onHandleIntent(Intent intent) { SharedPreferences prefs; boolean bg_missed_alerts; Context context; int bg_missed_minutes; context = getApplicationContext(); prefs = PreferenceManager.getDefaultSharedPreferences(context); bg_missed_alerts = prefs.getBoolean("bg_missed_alerts", false); bg_missed_minutes = Integer.parseInt(prefs.getString("bg_missed_minutes", "30")); otherAlertSnooze = Integer.parseInt(prefs.getString("other_alerts_snooze", "20")); long now = new Date().getTime(); if (!bg_missed_alerts) { Log.d(TAG, "Setting timer to 5 minutes from now" ); checkBackAfterMissedTime(now + 5 * 60 *1000); return; } if (BgReading.getTimeSinceLastReading() >= (bg_missed_minutes * 1000 * 60) && prefs.getLong("alerts_disabled_until", 0) <= now) { Notifications.bgMissedAlert(context); checkBackAfterSnoozeTime(); } else { long disabletime = prefs.getLong("alerts_disabled_until", 0) - now; long missedTime = Long.parseLong(prefs.getString("bg_missed_minutes", "30"))* 1000 * 60 - BgReading.getTimeSinceLastReading(); long alarmIn = Math.max(disabletime, missedTime); Log.d(TAG, "Setting timer to " + alarmIn / 60000 + " minutes from now" ); checkBackAfterMissedTime(alarmIn); } }

Target:
protected void onHandleIntent(Intent intent) { SharedPreferences prefs; boolean bg_missed_alerts; Context context; int bg_missed_minutes; context = getApplicationContext(); prefs = PreferenceManager.getDefaultSharedPreferences(context); bg_missed_alerts = prefs.getBoolean("bg_missed_alerts", false); bg_missed_minutes = Integer.parseInt(prefs.getString("bg_missed_minutes", "30")); otherAlertSnooze = Integer.parseInt(prefs.getString("other_alerts_snooze", "20")); long now = new Date().getTime(); Log.d(TAG, "MissedReadingService onHandleIntent"); if (!bg_missed_alerts) { return; } if (BgReading.getTimeSinceLastReading() >= (bg_missed_minutes * 1000 * 60) && prefs.getLong("alerts_disabled_until", 0) <= now) { Notifications.bgMissedAlert(context); checkBackAfterSnoozeTime(now); } else { long disabletime = prefs.getLong("alerts_disabled_until", 0) - now; long missedTime = bg_missed_minutes* 1000 * 60 - BgReading.getTimeSinceLastReading(); long alarmIn = Math.max(disabletime, missedTime); checkBackAfterMissedTime(alarmIn); } }
Source:
public void shouldClearLocations() throws Exception { double[] loc1 = { 1.0, 2.0 }; double[] loc2 = { 3.0, 4.0 }; double[] loc3 = { 5.0, 6.0 }; Router router = Router.getRouter() .setLocation(loc1) .setLocation(loc2); router.clearLocations(); router.setLocation(loc2); router.setLocation(loc3); URL url = router.getRouteUrl(); assertThat(url.toString()).doesNotContain("1.0,2.0"); assertThat(url.toString()).contains("3.0,4.0"); }

Target:
public void shouldClearLocations() throws Exception { double[] loc1 = { 1.0, 2.0 }; double[] loc2 = { 3.0, 4.0 }; double[] loc3 = { 5.0, 6.0 }; Router router = Router.getRouter() .setLocation(loc1) .setLocation(loc2); router.clearLocations(); router.setLocation(loc2); router.setLocation(loc3); URL url = router.getRouteUrl(); assertThat(url.toString()).doesNotContain("1.0,2.0"); assertThat(url.toString()).contains("3.0,4.0"); assertThat(url.toString()).contains("5.0,6.0"); }
Source:
public boolean checkSpriteReplaceInBackpack(List<Sprite> currentSpriteList) { boolean spritesAlreadyInBackpack; for (Sprite sprite : currentSpriteList) { spritesAlreadyInBackpack = checkSpriteReplaceInBackpack(sprite); if (spritesAlreadyInBackpack) { return true; } } return false; }

Target:
public boolean checkSpriteReplaceInBackpack(List<Sprite> currentSpriteList) { for (Sprite sprite : currentSpriteList) { if (checkSpriteReplaceInBackpack(sprite)) { return true; } } return false; }
Source:
protected void appendFieldStart(StringBuffer buffer, String fieldName) { if (fieldName == null) { throw new UnsupportedOperationException("FieldName cannot be null"); } super.appendFieldStart(buffer, FIELD_NAME_PREFIX + fieldName + FIELD_NAME_PREFIX); }

Target:
protected void appendFieldStart(StringBuffer buffer, String fieldName) { if (fieldName == null) { throw new UnsupportedOperationException( "Field names are mandatory when using JsonToStringStyle"); } super.appendFieldStart(buffer, FIELD_NAME_PREFIX + fieldName + FIELD_NAME_PREFIX); }
Source:
public void notAddChildren() throws Exception { JenkinsRule.WebClient client = r.createWebClient(); SampleComputedFolder s = r.jenkins.createProject(SampleComputedFolder.class, "s"); assertThat(client.getPage(s).getByXPath(" s.kids.add("A"); s.recompute(Result.SUCCESS); assertThat(client.getPage(s).getByXPath(" }

Target:
public void notAddChildren() throws Exception { JenkinsRule.WebClient client = r.createWebClient(); SampleComputedFolder s = r.jenkins.createProject(SampleComputedFolder.class, "s"); assertEquals(client.getPage(s).getByXPath(" s.kids.add("A"); s.recompute(Result.SUCCESS); assertEquals(client.getPage(s).getByXPath(" }
Source:
public void process(CAS cas) { double[] result = mCategorizer.categorize(WhitespaceTokenizer.INSTANCE.tokenize(cas.getDocumentText())); String bestCategory = mCategorizer.getBestCategory(result); setBestCategory(cas, bestCategory); }

Target:
public void process(CAS cas) { FSIterator<AnnotationFS> tokenAnnotations = cas.getAnnotationIndex(mTokenType).iterator(); List<String> tokensList = new ArrayList<>(); while (tokenAnnotations.hasNext()) { tokensList.add(tokenAnnotations.next().getCoveredText()); } double[] result = mCategorizer.categorize(tokensList.toArray(new String[tokensList.size()])); String bestCategory = mCategorizer.getBestCategory(result); setBestCategory(cas, bestCategory); }
Source:
public void setQueueNames(String... queueName) { Assert.noNullElements(queueName, "Queue name(s) cannot be null"); setQueues(Arrays.stream(queueName) .map(n -> new Queue(n)) .collect(Collectors.toList()) .toArray(new Queue[0])); }

Target:
public void setQueueNames(String... queueName) { Assert.noNullElements(queueName, "Queue name(s) cannot be null"); setQueues(Arrays.stream(queueName) .map(n -> new Queue(n)) .toArray(Queue[]::new)); }
Source:
public ResponseEntity<Object> getResponseForException(OpenClinicaSystemException e, String studyOid, String siteOid) { String errorMsg = e.getErrorCode(); HashMap<String, String> map = new HashMap<>(); map.put("studyOid", studyOid); map.put("siteOid", siteOid); org.akaza.openclinica.service.rest.errors.ParameterizedErrorVM responseDTO = new ParameterizedErrorVM(errorMsg, map); return new ResponseEntity(responseDTO, HttpStatus.BAD_REQUEST); }

Target:
public ParameterizedErrorVM getResponseForException(OpenClinicaSystemException e, String studyOid, String siteOid) { String errorMsg = e.getErrorCode(); HashMap<String, String> map = new HashMap<>(); map.put("studyOid", studyOid); map.put("siteOid", siteOid); return new ParameterizedErrorVM(errorMsg, map); }
Source:
public void sendRedirect(String urlStr) { try { getContext().getResponse().sendRedirect(encodeUrlToUtf8(urlStr)); } catch (IOException exp) { LOGGER.error("Failed to redirect to url [" + urlStr + "]", exp); } }

Target:
public void sendRedirect(String urlStr) { getCelementsWebService().sendRedirect(urlStr); }
Source:
public JWTBuilderImpl() { builder = JWT.create(); builder.withIssuer(NUXEO_ISSUER); String subject = NuxeoPrincipal.getCurrent().getActingUser(); if (subject == null) { throw new NuxeoException("No currently logged-in user"); } builder.withSubject(subject); withTTL(0); String token = JWT.create() .withIssuer("nuxeo") .withSubject("NUXEO_USERNAME") .withExpiresAt(new Date(System.currentTimeMillis() + 24 * 60 * 60 * 1000)) .sign(Algorithm.HMAC512("NUXEO_JWT_SECRET")); }

Target:
public JWTBuilderImpl() { builder = JWT.create(); builder.withIssuer(NUXEO_ISSUER); String subject = NuxeoPrincipal.getCurrent().getActingUser(); if (subject == null) { throw new NuxeoException("No currently logged-in user"); } builder.withSubject(subject); withTTL(0); }
Source:
public Predicate<String> provideServerDeletedPredicate(final DimensionDataCloudControlApi api, final ComputeServiceConstants.Timeouts timeouts, final ComputeServiceConstants.PollPeriod pollPeriod) { return retry(new ServerState(api.getServerApi(), State.DELETED), timeouts.imageAvailable, pollPeriod.pollInitialPeriod, pollPeriod.pollMaxPeriod); }

Target:
public Predicate<String> provideServerDeletedPredicate(final DimensionDataCloudControlApi api, final ComputeServiceConstants.Timeouts timeouts, final ComputeServiceConstants.PollPeriod pollPeriod) { return retry(new ServerState(api.getServerApi(), State.DELETED), timeouts.nodeTerminated, pollPeriod.pollInitialPeriod, pollPeriod.pollMaxPeriod); }
Source:
public void waitCloseProjectConfigForm() { new WebDriverWait(seleniumWebDriver, LOADER_TIMEOUT_SEC) .until(ExpectedConditions.invisibilityOfElementLocated(By.id(Locators.MAIN_FORM_ID))); }

Target:
public void waitCloseProjectConfigForm() { seleniumWebDriverHelper.waitInvisibility(By.id(Locators.MAIN_FORM_ID), LOADER_TIMEOUT_SEC); }
Source:
protected void scriptConsoleInitialized(ScriptConsole console){ console.getCommand().addInputStreamListener(new ChartStreamDaemon2(console, dataSet, parser)); try { IWorkbenchPage p = PlatformUI.getWorkbench().showPerspective(GraphingPerspective.ID, PlatformUI.getWorkbench().getActiveWorkbenchWindow()); IViewPart ivp = p.showView(GraphSelectorView.ID); String name = console.getName(); ((GraphSelectorView)ivp).createScriptSet(name.substring(name.lastIndexOf('/')+1), dataSet); } catch(WorkbenchException we) { MessageDialog.openError(Display.getCurrent().getActiveShell(), Messages.RunScriptChartAction_couldNotSwitchToGraphicPerspective, Messages.RunScriptChartAction_couldNotSwitchToGraphicPerspective + ": " + we.getMessage()); } }

Target:
protected void scriptConsoleInitialized(ScriptConsole console){ console.getCommand().addInputStreamListener(new ChartStreamDaemon2(console, dataSet, parser)); try { IWorkbenchPage p = PlatformUI.getWorkbench().showPerspective(GraphingPerspective.ID, PlatformUI.getWorkbench().getActiveWorkbenchWindow()); IViewPart ivp = p.showView(GraphSelectorView.ID); String name = console.getName(); ((GraphSelectorView)ivp).createScriptSet(name.substring(name.lastIndexOf('/')+1), dataSet); } catch(WorkbenchException we) { IStatus status = new Status(IStatus.ERROR, GraphicalRunPlugin.ID, 1, Messages.RunScriptChartAction_couldNotSwitchToGraphicPerspective , we); ErrorDialog.openError(Display.getCurrent().getActiveShell(), Messages.RunScriptChartAction_couldNotSwitchToGraphicPerspective, null, status); } }
Source:
void fireCheckChangeEvent(CheckChangeEvent evt) { Object[] listeners = listenerList.getListenerList(); for (int i = 0; i < listeners.length; i++) { if (listeners[i] == CheckChangeEventListener.class) { ((CheckChangeEventListener) listeners[i]).checkStateChanged(evt); } } }

Target:
void fireCheckChangeEvent(CheckChangeEvent evt) { Object[] listeners = listenerList.getListenerList(); for (int i = 0; i < listeners.length-1; i += 2) { if (listeners[i] == CheckChangeEventListener.class) { ((CheckChangeEventListener) listeners[i+1]).checkStateChanged(evt); } } }
Source:
public void onTraversalStart() { Set<VCFHeaderLine> defaultToolHeaderLines = getDefaultToolVCFHeaderLines(); for (final ConcordanceState state : ConcordanceState.values()) { snpCounts.put(state, new MutableLong(0)); indelCounts.put(state, new MutableLong(0)); } if (truePositivesAndFalseNegativesVcf != null) { truePositivesAndFalseNegativesVcfWriter = createVCFWriter(truePositivesAndFalseNegativesVcf); final VCFHeader truthHeader = getTruthHeader(); truthHeader.addMetaDataLine(TRUTH_STATUS_HEADER_LINE); defaultToolHeaderLines.forEach(truthHeader::addMetaDataLine); truePositivesAndFalseNegativesVcfWriter.writeHeader(truthHeader); } if (truePositivesAndFalsePositivesVcf != null) { truePositivesAndFalsePositivesVcfWriter = createVCFWriter(truePositivesAndFalsePositivesVcf); final VCFHeader evalHeader = getEvalHeader(); defaultToolHeaderLines.stream().forEach(evalHeader::addMetaDataLine); evalHeader.addMetaDataLine(TRUTH_STATUS_HEADER_LINE); truePositivesAndFalsePositivesVcfWriter.writeHeader(evalHeader); } if (filteredTrueNegativesAndFalseNegativesVcf != null) { filteredTrueNegativesAndFalseNegativesVcfWriter = createVCFWriter(filteredTrueNegativesAndFalseNegativesVcf); final VCFHeader evalHeader = getEvalHeader(); evalHeader.addMetaDataLine(TRUTH_STATUS_HEADER_LINE); defaultToolHeaderLines.stream().forEach(evalHeader::addMetaDataLine); filteredTrueNegativesAndFalseNegativesVcfWriter.writeHeader(evalHeader); } }

Target:
public void onTraversalStart() { Set<VCFHeaderLine> defaultToolHeaderLines = getDefaultToolVCFHeaderLines(); for (final ConcordanceState state : ConcordanceState.values()) { snpCounts.put(state, new MutableLong(0)); indelCounts.put(state, new MutableLong(0)); } if (truePositivesAndFalseNegativesVcf != null) { truePositivesAndFalseNegativesVcfWriter = createVCFWriter(truePositivesAndFalseNegativesVcf); final VCFHeader truthHeader = getTruthHeader(); truthHeader.addMetaDataLine(TRUTH_STATUS_HEADER_LINE); defaultToolHeaderLines.forEach(truthHeader::addMetaDataLine); truePositivesAndFalseNegativesVcfWriter.writeHeader(truthHeader); } if (truePositivesAndFalsePositivesVcf != null) { truePositivesAndFalsePositivesVcfWriter = createVCFWriter(truePositivesAndFalsePositivesVcf); final VCFHeader evalHeader = getEvalHeader(); defaultToolHeaderLines.forEach(evalHeader::addMetaDataLine); evalHeader.addMetaDataLine(TRUTH_STATUS_HEADER_LINE); truePositivesAndFalsePositivesVcfWriter.writeHeader(evalHeader); } if (filteredTrueNegativesAndFalseNegativesVcf != null) { filteredTrueNegativesAndFalseNegativesVcfWriter = createVCFWriter(filteredTrueNegativesAndFalseNegativesVcf); final VCFHeader evalHeader = getEvalHeader(); evalHeader.addMetaDataLine(TRUTH_STATUS_HEADER_LINE); defaultToolHeaderLines.forEach(evalHeader::addMetaDataLine); filteredTrueNegativesAndFalseNegativesVcfWriter.writeHeader(evalHeader); } }
Source:
public int getTotalAliveNodesNumber() { int count = 0; for (RMNode node : allNodes.values()) { if (!node.isDown()) count++; } return count; }

Target:
public int getTotalAliveNodesNumber() { return listAliveNodeUrls().size(); }
Source:
public int getMetricsCategory() { return 0; }

Target:
public int getMetricsCategory() { return SettingsEnums.ADB_WIRELESS_DEVICE_DETAILS; }
Source:
public void start() { String networkAlias = getNetworkAliases().get(0); proxy = new SocatContainer() .withNetwork(getNetwork()) .withTarget(9093, networkAlias) .withTarget(2181, networkAlias); proxy.start(); withEnv("KAFKA_ADVERTISED_LISTENERS", "BROKER://" + networkAlias + ":9093,PLAINTEXT://" + proxy.getContainerIpAddress() + ":" + proxy.getFirstMappedPort()); if (externalZookeeperConnect != null) { withEnv("KAFKA_ZOOKEEPER_CONNECT", externalZookeeperConnect); } else { addExposedPort(ZOOKEEPER_PORT); withEnv("KAFKA_ZOOKEEPER_CONNECT", "localhost:2181"); withClasspathResourceMapping("tc-zookeeper.properties", "/zookeeper.properties", BindMode.READ_ONLY); withCommand("sh", "-c", "zookeeper-server-start /zookeeper.properties & /etc/confluent/docker/run"); } super.start(); }

Target:
public void start() { String networkAlias = getNetworkAliases().get(0); proxy = new SocatContainer() .withNetwork(getNetwork()) .withTarget(KAFKA_PORT, networkAlias) .withTarget(ZOOKEEPER_PORT, networkAlias); proxy.start(); withEnv("KAFKA_ADVERTISED_LISTENERS", "BROKER://" + networkAlias + ":" + KAFKA_PORT +",PLAINTEXT://" + proxy.getContainerIpAddress() + ":" + proxy.getFirstMappedPort()); if (externalZookeeperConnect != null) { withEnv("KAFKA_ZOOKEEPER_CONNECT", externalZookeeperConnect); } else { addExposedPort(ZOOKEEPER_PORT); withEnv("KAFKA_ZOOKEEPER_CONNECT", "localhost:2181"); withClasspathResourceMapping("tc-zookeeper.properties", "/zookeeper.properties", BindMode.READ_ONLY); withCommand("sh", "-c", "zookeeper-server-start /zookeeper.properties & /etc/confluent/docker/run"); } super.start(); }
Source:
public void stop(ConfigBag parameters) { doStop(parameters, new Callable<StopMachineDetails<Integer>>() { public StopMachineDetails<Integer> call() { return stopAnyProvisionedMachines(); } }); }

Target:
public void stop(ConfigBag parameters) { doStop(parameters, new StopAnyProvisionedMachinesTask()); }
Source:
@Test public void noCacheAndKnownContentLengthDispatchToStats() { responses.add(responseOf(ResponseBody.create(null, new byte[10]))); Action action = TestUtils.mockAction(URI_KEY_1, URI_1); networkHandler.load(action.getRequest(), 0, new Callback() { @Override public void onSuccess(Result result) { verify(stats).dispatchDownloadFinished(10); } @Override public void onError(Throwable t) { fail(t.getMessage()); } }); }

Target:
@Test public void noCacheAndKnownContentLengthDispatchToStats() { responses.add(responseOf(ResponseBody.create(null, new byte[10]))); Action action = TestUtils.mockAction(URI_KEY_1, URI_1); networkHandler.load(action.getRequest(), 0, new RequestHandler.Callback() { @Override public void onSuccess(Result result) { verify(stats).dispatchDownloadFinished(10); } @Override public void onError(Throwable t) { fail(t.getMessage()); } }); }
Source:
protected void addArgs(final ArgumentParser parser) { httpArg = parser.addArgument("--http") .setDefault("<LINK_0>") .help("http endpoint"); adminArg = parser.addArgument("--admin") .setDefault("<LINK_1>") .help("admin http port"); zkAclAgentDigest = parser.addArgument("--zk-acl-agent-digest") .type(String.class); zkAclMasterPassword = parser.addArgument("--zk-acl-master-password") .type(String.class) .help("ZooKeeper master password (for ZooKeeper ACLs). If the " + ZK_MASTER_PASSWORD_ENVVAR + " environment variable is present this argument is ignored."); agentReapingTimeout = parser.addArgument("--agent-reaping-timeout") .type(Long.class) .setDefault(TimeUnit.DAYS.toHours(14)) .help("In hours. Agents will be automatically de-registered if they are DOWN for more " + "than the specified timeout. To disable reaping, set to 0."); jobRetention = parser.addArgument("--job-retention") .type(Long.class) .setDefault(-1L) .help("In days. Jobs not deployed anywhere and with a job history showing they were last " + "used before the specified retention time will be removed. " + "This is disabled by default by setting it to a sentinel value of -1."); whitelistedCapabilities = parser.addArgument("--whitelisted-capability") .action(append()) .setDefault(new ArrayList<>()) .help("The Linux capabilities containers on this agent are allowed to add. " + "Defaults to allowing nothing."); }

Target:
protected void addArgs(final ArgumentParser parser) { httpArg = parser.addArgument("--http") .setDefault("<LINK_0>") .help("http endpoint"); adminArg = parser.addArgument("--admin") .setDefault("<LINK_1>") .help("admin http port"); zkAclAgentDigest = parser.addArgument("--zk-acl-agent-digest") .type(String.class); zkAclMasterPassword = parser.addArgument("--zk-acl-master-password") .type(String.class) .help("ZooKeeper master password (for ZooKeeper ACLs). If the " + ZK_MASTER_PASSWORD_ENVVAR + " environment variable is present this argument is ignored."); agentReapingTimeout = parser.addArgument("--agent-reaping-timeout") .type(Long.class) .setDefault(TimeUnit.DAYS.toHours(14)) .help("In hours. Agents will be automatically de-registered if they are DOWN for more " + "than the specified timeout. To disable reaping, set to 0."); jobRetention = parser.addArgument("--job-retention") .type(Long.class) .setDefault(-1L) .help("In days. Jobs not deployed anywhere and with a job history showing they were last " + "used before the specified retention time will be removed. " + "This is disabled by default by setting it to a sentinel value of -1."); whitelistedCapabilities = parser.addArgument("--whitelisted-capability") .action(append()) .setDefault(new ArrayList<>()) .help("The Linux capabilities Helios jobs are allowed to add to their Docker containers. " + "Defaults to allowing nothing."); }
Source:
public void connectorDefinitionEmptyDir() throws IOException { processRuntime.start(ProcessPayloadBuilder.start() .withProcessDefinitionKey(CATEGORIZE_PROCESS) .withVariable("expectedKey", true) .build()); }

Target:
public void connectorDefinitionEmptyDir() { processRuntime.start(ProcessPayloadBuilder.start() .withProcessDefinitionKey(CATEGORIZE_PROCESS) .withVariable("expectedKey", true) .build()); }
Source:
public String getDescription() { return "Dropping an Association to generate a ClearAssociationAction"; }

Target:
public String getDescription() { return Messages.AssociationToClearAssociationActionDropStrategy_Description; }