auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public void testOpenFileUnauthorized() throws Exception { final AzureBlobFileSystem fs = this.getFileSystem(); <START> Path testFilePath = new Path( <END> TEST_WRITE_ONLY_FILE_PATH_PREFIX_0 + name.getMethodName()); fs.create(testFilePath).close(); intercept(AbfsAuthorizationException.class, () -> { fs.open(testFilePath).close(); }); }</code><technical_language>this is recurrent enough worth some method a prefix return a path getMethodName attached</technical_language>

Target:
public void testOpenFileUnauthorized() throws Exception { runTest(FileSystemOperations.Open, true); }
Source:
<code>public <RequestT> CallOptions create(MethodDescriptor<RequestT, ?> descriptor, RequestT request) { <START> Deadline contextDeadline = Context.current().getDeadline(); <END> if (contextDeadline != null) { return CallOptions.DEFAULT.withDeadline(contextDeadline); } else if (!config.isUseTimeout() || request == null) { return CallOptions.DEFAULT; } else { int timeout = isLongRequest(request) ? config.getLongRpcTimeoutMs() : config.getShortRpcTimeoutMs(); return CallOptions.DEFAULT.withDeadline(Deadline.after(timeout, TimeUnit.MILLISECONDS)); } }</code><technical_language>deadline in Context set user? harder track deadline is coming from</technical_language>

Target:
public <RequestT> CallOptions create(MethodDescriptor<RequestT, ?> descriptor, RequestT request) { Deadline contextDeadline = Context.current().getDeadline(); if (contextDeadline != null) { return CallOptions.DEFAULT.withDeadline(contextDeadline); } else if (config.isUseTimeout() && request != null) { int timeout = isLongRequest(request) ? config.getLongRpcTimeoutMs() : config.getShortRpcTimeoutMs(); return CallOptions.DEFAULT.withDeadline(Deadline.after(timeout, TimeUnit.MILLISECONDS)); } else { return CallOptions.DEFAULT; } }
Source:
<code>public void testInit_objectStore() throws Exception { String objectStore = "ObjectStore"; config.overrideKey("filenet.objectStore", objectStore); adaptor.init(context); Connection conn = getConfigOptions().getConnection(); <START> assertTrue(getConfigOptions().getObjectStore(conn) instanceof ObjectStore); <END> }</code><technical_language>This fail, getObjectStore returns ObjectStore. is this supposed testing</technical_language>

Target:
public void testInit_objectStore() throws Exception { String objectStore = "ObjectStore"; config.overrideKey("filenet.objectStore", objectStore); adaptor.init(context); Connection conn = getConfigOptions().getConnection(); assertNotNull(getConfigOptions().getObjectStore(conn)); }
Source:
<code>private AsyncCompletionWaitor updateBreakpoint(final IBreakpointDMContext breakpoint, final Map<String, Object> delta) throws InterruptedException <START> { <END> final AsyncCompletionWaitor waitor = new AsyncCompletionWaitor(); final RequestMonitor rm = new RequestMonitor(fBreakpointService.getExecutor(), null) { @Override protected void handleCompleted() { waitor.waitFinished(getStatus()); } }; fBreakpointService.getExecutor().submit(new Runnable() { @Override public void run() { fBreakpointService.updateBreakpoint(breakpoint, delta, rm); } }); waitor.waitUntilDone(TestsPlugin.massageTimeout(2000)); return waitor; }</code><technical_language>Query</technical_language>

Target:
private void updateBreakpoint(final IBreakpointDMContext breakpoint, final Map<String, Object> delta) throws InterruptedException, ExecutionException { Query<Void> query = new Query<Void>() { @Override protected void execute(DataRequestMonitor<Void> rm) { fBreakpointService.updateBreakpoint(breakpoint, delta, rm); } }; fBreakpointService.getExecutor().submit(query); query.get(); }
Source:
<code>public final void run() { if (logger.isDebugEnabled()) { logger.debug("Starting the AcquireTimeoutTask to clean for endpoint [{}].", this.pool.remoteAddress()); } long currentNanoTime = System.nanoTime(); while (true) { AcquireListener removedTask = this.pool.pendingAcquisitions.poll(); if (removedTask == null) { break; } long expiryTime = removedTask.getAcquisitionTimeoutInNanos(); <START> if (expiryTime - currentNanoTime < 0) { <END> this.onTimeout(removedTask); } else { if (!this.pool.pendingAcquisitions.offer(removedTask)) { logger.error("Unexpected failure when returning the removed task" + " to pending acquisition queue. current size [{}]", this.pool.pendingAcquisitions.size()); } break; } } }</code><technical_language>this <=</technical_language>

Target:
public final void run() { if (logger.isDebugEnabled()) { logger.debug("Starting the AcquireTimeoutTask to clean for endpoint [{}].", this.pool.remoteAddress()); } long currentNanoTime = System.nanoTime(); while (true) { AcquireListener removedTask = this.pool.pendingAcquisitions.poll(); if (removedTask == null) { break; } long expiryTime = removedTask.getAcquisitionTimeoutInNanos(); if (expiryTime - currentNanoTime <= 0) { this.onTimeout(removedTask); } else { if (!this.pool.pendingAcquisitions.offer(removedTask)) { logger.error("Unexpected failure when returning the removed task" + " to pending acquisition queue. current size [{}]", this.pool.pendingAcquisitions.size()); } break; } } }
Source:
<code>public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } PartitionMeta that = (PartitionMeta)o; return Objects.equals(cluster, that.cluster) && <START> Objects.equals(getTopicPartition(), that.getTopicPartition()); <END> }</code><technical_language>instead of comparing topicPartition object, compare topic partitionId</technical_language>

Target:
public boolean equals(Object o) { if (this == o) { return true; } if (o == null || getClass() != o.getClass()) { return false; } PartitionMeta that = (PartitionMeta)o; return Objects.equals(partitionId, that.partitionId) && Objects.equals(cluster, that.cluster) && Objects.equals(topic, that.topic); }
Source:
<code>private static <T extends Node> T simplifiedParse(ParseStart<T> context, Provider provider) { ParseResult<T> result = new JavaParser(staticConfiguration).parse(context, provider); if (result.isSuccessful()) { <START> considerInjectingSymbolResolver(result, staticConfiguration); <END> return result.getResult().get(); } throw new ParseProblemException(result.getProblems()); }</code><technical_language>This is done in other method</technical_language>

Target:
private static <T extends Node> T simplifiedParse(ParseStart<T> context, Provider provider) { ParseResult<T> result = new JavaParser(staticConfiguration).parse(context, provider); if (result.isSuccessful()) { return result.getResult().get(); } throw new ParseProblemException(result.getProblems()); }
Source:
<code>public PlanNode visitAggregation(AggregationNode node, RewriteContext<Context> context) { context.get().variables.addAll(node.getGroupingKeys()); for (Map.Entry<VariableReferenceExpression, AggregationNode.Aggregation> entry : node.getAggregations().entrySet()) { VariableReferenceExpression variable = entry.getKey(); AggregationNode.Aggregation aggregation = entry.getValue(); QualifiedFunctionName aggregateName = metadata.getFunctionManager().getFunctionMetadata(aggregation.getCall().getFunctionHandle()).getName(); if (ARBITRARY_AGGREGATE_FUNCTION.equals(aggregateName)) { <START> checkArgument(aggregation.getArguments().get(0) instanceof VariableReferenceExpression); <END> context.get().addAssignment(variable, (VariableReferenceExpression) aggregation.getArguments().get(0)); } else { aggregation.getArguments().forEach(expression -> expression.accept(subfieldExtractor, context.get())); } aggregation.getFilter().ifPresent(expression -> expression.accept(subfieldExtractor, context.get())); aggregation.getOrderBy() .map(OrderingScheme::getOrderByVariables) .ifPresent(context.get().variables::addAll); aggregation.getMask().ifPresent(context.get().variables::add); } return context.defaultRewrite(node, context.get()); }</code><technical_language>checkState</technical_language>

Target:
public PlanNode visitAggregation(AggregationNode node, RewriteContext<Context> context) { context.get().variables.addAll(node.getGroupingKeys()); for (Map.Entry<VariableReferenceExpression, AggregationNode.Aggregation> entry : node.getAggregations().entrySet()) { VariableReferenceExpression variable = entry.getKey(); AggregationNode.Aggregation aggregation = entry.getValue(); QualifiedFunctionName aggregateName = metadata.getFunctionManager().getFunctionMetadata(aggregation.getCall().getFunctionHandle()).getName(); if (ARBITRARY_AGGREGATE_FUNCTION.equals(aggregateName)) { checkState(aggregation.getArguments().get(0) instanceof VariableReferenceExpression); context.get().addAssignment(variable, (VariableReferenceExpression) aggregation.getArguments().get(0)); } else { aggregation.getArguments().forEach(expression -> expression.accept(subfieldExtractor, context.get())); } aggregation.getFilter().ifPresent(expression -> expression.accept(subfieldExtractor, context.get())); aggregation.getOrderBy() .map(OrderingScheme::getOrderByVariables) .ifPresent(context.get().variables::addAll); aggregation.getMask().ifPresent(context.get().variables::add); } return context.defaultRewrite(node, context.get()); }
Source:
<code>protected void sharedPeriodic() { xScheduler.run(); this.updatePeriodicDataSources(); loopCycleCounter++; double timeSinceLastLog = Timer.getFPGATimestamp() - lastFreqCounterResetTime; <START> if(lastFreqCounterResetTime > 0 && timeSinceLastLog >= frequencyReportInterval.get()) { <END> double loopsPerSecond = loopCycleCounter / timeSinceLastLog; loopCycleCounter = 0; lastFreqCounterResetTime = Timer.getFPGATimestamp(); log.info("Robot loops per second: " + loopsPerSecond); } }</code><technical_language>I lastFreqCounterResetTime starts -1 is set larger this if execute</technical_language>

Target:
protected void sharedPeriodic() { xScheduler.run(); this.updatePeriodicDataSources(); loopCycleCounter++; double timeSinceLastLog = Timer.getFPGATimestamp() - lastFreqCounterResetTime; if(lastFreqCounterResetTime <= 0) { lastFreqCounterResetTime = Timer.getFPGATimestamp(); } else if(timeSinceLastLog >= frequencyReportInterval.get()) { double loopsPerSecond = loopCycleCounter / timeSinceLastLog; loopCycleCounter = 0; lastFreqCounterResetTime = Timer.getFPGATimestamp(); log.info("Robot loops per second: " + loopsPerSecond); } }
Source:
<code>public void startClient() throws JMSException, NamingException, IOException { if (null != connection && null != session && null != sender) { if (null != this.publisherConfig.getReadMessagesFromFilePath()) { this.getMessageContentFromFile(); } Thread subscriberThread = new Thread(this); subscriberThread.start(); } else { <START> throw new NullPointerException("The connection, session and message sender is not assigned."); <END> } }</code><technical_language>specific reason throw NPE ? if yes, added method signature</technical_language>

Target:
public void startClient() throws AndesClientException, IOException { if (null != connection && null != session && null != sender) { if (null != this.publisherConfig.getReadMessagesFromFilePath()) { this.getMessageContentFromFile(); } Thread subscriberThread = new Thread(this); subscriberThread.start(); } else { throw new AndesClientException("The connection, session and message sender is not assigned."); } }
Source:
<code>public static Payload buildPayload(long size) { ByteSource data = buildData(size); Payload payload = new ByteSourcePayload(data); <START> payload.getContentMetadata().setContentType("text/plain"); <END> payload.getContentMetadata().setContentLength(size); return payload; }</code><technical_language>MediaType.PLAIN_TEXT_UTF_8 instead</technical_language>

Target:
public static Payload buildPayload(long size) { ByteSource data = buildData(size); Payload payload = new ByteSourcePayload(data); payload.getContentMetadata().setContentType(PLAIN_TEXT_UTF_8.toString()); payload.getContentMetadata().setContentLength(size); return payload; }
Source:
<code>public void releaseISOMount(java.io.File mountDir) { if (Sage.WINDOWS_OS) { java.io.File vcdMountExe = getVCDMountEXEPath(); if (vcdMountExe == null || !vcdMountExe.isFile()) { if (Sage.DBG) System.out.println("WARNING Cannot find VirtualCloneDrive EXE path so we can't unmount: " + mountDir); return; } if (Sage.DBG) System.out.println("Releasing VCDMount point at " + mountDir); synchronized (vcdLock) { IOUtils.exec(new String[] { vcdMountExe.getAbsolutePath(), "/l=" + mountDir.getAbsolutePath().charAt(0), "/u" }); } } else { if (Sage.EMBEDDED) { String loopDev = null; String mountDetails = IOUtils.exec(new String[] {"sh", "-c", "mount | grep " + mountDir.getName()}, true, true, true); if (mountDetails != null && mountDetails.length() > 0) { int idx = mountDetails.indexOf(' '); if (idx != -1) { loopDev = mountDetails.substring(0, idx).trim(); } } IOUtils.exec2(new String[] { "umount", mountDir.getAbsolutePath() }, false); if (loopDev != null) { try{Thread.sleep(200);}catch(Exception e){} if (Sage.DBG) System.out.println("Stopping loop device after ISO unmount: " + loopDev); if (IOUtils.exec2(new String[] { "losetup", "-d", loopDev }) != 0) { try{Thread.sleep(400);}catch(Exception e){} IOUtils.exec2(new String[] { "losetup", "-d", loopDev }); } } } else { if (Sage.LINUX_IS_ROOT) IOUtils.exec2(new String[]{"umount", mountDir.getAbsolutePath()}, false); else <START> IOUtils.exec2(new String[]{"sudo","umount", mountDir.getAbsolutePath()}, false); <END> } mountDir.delete(); } }</code><technical_language>This hang indefinitely waiting for a password if sudoers configuration is set require a password for this command</technical_language>

Target:
public void releaseISOMount(java.io.File mountDir) { if (Sage.WINDOWS_OS) { java.io.File vcdMountExe = getVCDMountEXEPath(); if (vcdMountExe == null || !vcdMountExe.isFile()) { if (Sage.DBG) System.out.println("WARNING Cannot find VirtualCloneDrive EXE path so we can't unmount: " + mountDir); return; } if (Sage.DBG) System.out.println("Releasing VCDMount point at " + mountDir); synchronized (vcdLock) { IOUtils.exec(new String[] { vcdMountExe.getAbsolutePath(), "/l=" + mountDir.getAbsolutePath().charAt(0), "/u" }); } } else { if (Sage.EMBEDDED) { String loopDev = null; String mountDetails = IOUtils.exec(new String[] {"sh", "-c", "mount | grep " + mountDir.getName()}, true, true, true); if (mountDetails != null && mountDetails.length() > 0) { int idx = mountDetails.indexOf(' '); if (idx != -1) { loopDev = mountDetails.substring(0, idx).trim(); } } IOUtils.exec2(new String[] { "umount", mountDir.getAbsolutePath() }, false); if (loopDev != null) { try{Thread.sleep(200);}catch(Exception e){} if (Sage.DBG) System.out.println("Stopping loop device after ISO unmount: " + loopDev); if (IOUtils.exec2(new String[] { "losetup", "-d", loopDev }) != 0) { try{Thread.sleep(400);}catch(Exception e){} IOUtils.exec2(new String[] { "losetup", "-d", loopDev }); } } } else { if (Sage.LINUX_IS_ROOT) IOUtils.exec2(new String[]{"umount", mountDir.getAbsolutePath()}, false); else IOUtils.exec2(new String[]{"sudo", "-n", "umount", mountDir.getAbsolutePath()}, false); } mountDir.delete(); } }
Source:
<code>public StreamInputPacketIndexEntry(DataInputStream dataIn, String target) throws IOException { fOffsetBytes = dataIn.readLong(); fOffsetBits = fOffsetBytes * Byte.SIZE; fPacketSizeBits = dataIn.readLong(); fContentSizeBits = dataIn.readLong(); fTimestampBegin = dataIn.readLong(); <START> System.out.println(fTimestampBegin); <END> fTimestampEnd = dataIn.readLong(); fLostEvents = dataIn.readLong(); fTargetID = dataIn.readLong(); fTarget = target; }</code><technical_language>Print-out Needs removed</technical_language>

Target:
public StreamInputPacketIndexEntry(DataInputStream dataIn, String target) throws IOException { fOffsetBytes = dataIn.readLong(); fOffsetBits = fOffsetBytes * Byte.SIZE; fPacketSizeBits = dataIn.readLong(); fContentSizeBits = dataIn.readLong(); fTimestampBegin = dataIn.readLong(); fTimestampEnd = dataIn.readLong(); fLostEvents = dataIn.readLong(); fAttributes.put("stream_id", dataIn.readLong()); fTarget = target; long parsedTarget = -1; try{ parsedTarget = Long.parseLong(target); }catch(NumberFormatException e){ } fTargetID = parsedTarget; }
Source:
<code>public void testSetItems() { final boolean textItemEnabled = true; final String textItemText = "Inert rule above"; doReturn(textItemEnabled).when(textItem).isEnabled(); doReturn(textItemText).when(textItem).getText(); view.setItems(Arrays.asList(textItem, dividerItem)); verify(itemsContainer).appendChild(textElement); verify(itemsContainer).appendChild(dividerElement); verify(textItemView).setEnabled(eq(textItemEnabled)); verify(textItemView).setText(eq(textItemText)); final ArgumentCaptor<Command> commandCaptor = ArgumentCaptor.forClass(Command.class); verify(textItemView).addClickHandler(commandCaptor.capture()); commandCaptor.getValue().execute(); verify(presenter).onItemSelected(eq(textItem)); reset(presenter); doReturn(false).when(textItem).isEnabled(); commandCaptor.getValue().execute(); <START> verify(presenter, never()).onItemSelected(eq(textItem)); <END> }</code><technical_language>I prefer any(HasListSelectorControl.ListSelectorTextItem.class) checking for zero interactions (otherwise verifying interactions eq(textItem) (but others) - this is want check</technical_language>

Target:
public void testSetItems() { final boolean textItemEnabled = true; final String textItemText = "Inert rule above"; doReturn(textItemEnabled).when(textItem).isEnabled(); doReturn(textItemText).when(textItem).getText(); view.setItems(Arrays.asList(textItem, dividerItem)); verify(itemsContainer).appendChild(textElement); verify(itemsContainer).appendChild(dividerElement); verify(textItemView).setEnabled(eq(textItemEnabled)); verify(textItemView).setText(eq(textItemText)); final ArgumentCaptor<Command> commandCaptor = ArgumentCaptor.forClass(Command.class); verify(textItemView).addClickHandler(commandCaptor.capture()); commandCaptor.getValue().execute(); verify(presenter).onItemSelected(eq(textItem)); reset(presenter); doReturn(false).when(textItem).isEnabled(); commandCaptor.getValue().execute(); verify(presenter, never()).onItemSelected(any(HasListSelectorControl.ListSelectorTextItem.class)); }
Source:
<code>RedirectAuthoritativeDnsServerCache(AuthoritativeDnsServerCache authoritativeDnsServerCache) { if (authoritativeDnsServerCache instanceof RedirectAuthoritativeDnsServerCache) { this.wrapped = ((RedirectAuthoritativeDnsServerCache) authoritativeDnsServerCache).wrapped; } else { <START> this.wrapped = authoritativeDnsServerCache; <END> } }</code><technical_language>Consider approach: write a utility method wrap if instance of RedirectAuthoritativeDnsServerCache. avoid allocation of a new object wrapped</technical_language>

Target:
RedirectAuthoritativeDnsServerCache(AuthoritativeDnsServerCache authoritativeDnsServerCache) { this.wrapped = authoritativeDnsServerCache; }
Source:
<code>public List<String> getContent(final INode node) { final List<String> content = new ArrayList<String>(); for (LexicalUnit lexicalUnit : contentLexicalUnits) { switch (lexicalUnit.getLexicalUnitType()) { case LexicalUnit.SAC_STRING_VALUE: content.add(lexicalUnit.getStringValue()); break; case LexicalUnit.SAC_ATTR: final LexicalUnit currentLexicalUnit = lexicalUnit; node.accept(new BaseNodeVisitor() { @Override public void visit(final IElement element) { final String attributeValue = element.getAttributeValue(currentLexicalUnit.getStringValue()); if (attributeValue != null) { content.add(attributeValue); } } @Override public void visit(final IProcessingInstruction pi) { <START> if (currentLexicalUnit.getStringValue().equalsIgnoreCase("target")) { <END> content.add(pi.getTarget()); } } }); break; } lexicalUnit = lexicalUnit.getNextLexicalUnit(); } return content; }</code><technical_language>please a constant for "target"</technical_language>

Target:
public List<String> getContent(final INode node) { final List<String> content = new ArrayList<String>(); for (LexicalUnit lexicalUnit : contentLexicalUnits) { switch (lexicalUnit.getLexicalUnitType()) { case LexicalUnit.SAC_STRING_VALUE: content.add(lexicalUnit.getStringValue()); break; case LexicalUnit.SAC_ATTR: final LexicalUnit currentLexicalUnit = lexicalUnit; node.accept(new BaseNodeVisitor() { @Override public void visit(final IElement element) { final String attributeValue = element.getAttributeValue(currentLexicalUnit.getStringValue()); if (attributeValue != null) { content.add(attributeValue); } } @Override public void visit(final IProcessingInstruction pi) { if (currentLexicalUnit.getStringValue().equalsIgnoreCase(CSS.PSEUDO_TARGET)) { content.add(pi.getTarget()); } } }); break; } lexicalUnit = lexicalUnit.getNextLexicalUnit(); } return content; }
Source:
<code>private List<Integer[]> retrieveBranchAndGammaIds(OseeConnection connection, Collection<? extends IAttributeType> types) throws OseeCoreException { List<Integer[]> gammasAndBranchIds = new ArrayList<Integer[]>(50000); IOseeStatement chStmt = getDatabaseService().getStatement(connection); try { for (IAttributeType type : types) { chStmt.runPreparedQuery(RETRIEVE_GAMMAS_WITH_BRANCH_IDS, identityService.getLocalId(type)); while (chStmt.next()) { <START> gammasAndBranchIds.add(new Integer[] {chStmt.getInt("gamma_id"), chStmt.getInt("branch_id")}); <END> } } } finally { chStmt.close(); } return gammasAndBranchIds; }</code><technical_language>join query well. this method a lot above, find a combine for some code reuse</technical_language>

Target:
private List<Integer[]> retrieveBranchAndGammaIds(OseeConnection connection, Collection<? extends IAttributeType> types) throws OseeCoreException { List<Integer[]> gammasAndBranchIds = new LinkedList<Integer[]>(); IOseeStatement chStmt = getDatabaseService().getStatement(connection); IdJoinQuery joinQuery = JoinUtility.createIdJoinQuery(); try { if (types.size() == 1) { chStmt.runPreparedQuery(RETRIEVE_GAMMAS_WITH_BRANCH_IDS, identityService.getLocalId(types.iterator().next())); } else { for (IAttributeType type : types) { joinQuery.add(identityService.getLocalId(type)); } chStmt.runPreparedQuery(RETRIEVE_GAMMAS_WITH_BRANCH_IDS_MULT_TYPES, joinQuery.getQueryId()); } while (chStmt.next()) { gammasAndBranchIds.add(new Integer[] {chStmt.getInt("gamma_id"), chStmt.getInt("branch_id")}); } } finally { chStmt.close(); } return gammasAndBranchIds; }
Source:
<code>private void visitEnumType(String symbolName, EnumType type) { <START> String unqualifiedName = getUnqualifiedName( symbolName ); <END> visitTypeAlias(type.getElementsType().getPrimitiveType(), unqualifiedName); emit("var"); emit(unqualifiedName); emit(": {"); emitBreak(); indent(); for (String elem : sorted(type.getElements())) { emit(elem); emit(":"); visitType(type.getElementsType()); emit(","); emitBreak(); } unindent(); emit("};"); emitBreak(); }</code><technical_language>funky whitespace</technical_language>

Target:
private void visitEnumType(String symbolName, EnumType type) { String unqualifiedName = getUnqualifiedName(symbolName); visitTypeAlias(type.getElementsType().getPrimitiveType(), unqualifiedName); emit("var"); emit(unqualifiedName); emit(": {"); emitBreak(); indent(); for (String elem : sorted(type.getElements())) { emit(elem); emit(":"); emit(unqualifiedName); emit(","); emitBreak(); } unindent(); emit("};"); emitBreak(); }
Source:
<code>public boolean filter(Object context, Descriptor descriptor) { <START> boolean result = false; try { if (descriptor instanceof GlobalConfiguration) { return Functions.hasPermission(((GlobalConfiguration) descriptor).getPermission()); } else { return true; } } catch (AccessDeniedException e) { return false; } catch (ServletException | IOException e) { e.printStackTrace(); return true; } <END> }</code><technical_language>simplified (I think) following: java if (descriptor instanceof GlobalConfiguration) { return Jenkins.get().hasPermission(((GlobalConfiguration) descriptor).getPermission()); } return true;</technical_language>

Target:
public boolean filter(Object context, Descriptor descriptor) { if (descriptor instanceof GlobalConfiguration) { return Jenkins.get().hasPermission(((GlobalConfiguration) descriptor).getPermission()); } return true; }
Source:
<code>public String run(String[] args) throws Exception { JCommander jc = new JCommander(this); jc.setProgramName(this.getClass().getSimpleName()); try { jc.parse(args); } catch (Exception e) { jc.usage(); throw e; } prepare(); AlluxioConfiguration conf = new InstancedConfiguration(ConfigurationUtils.defaults()); String className = this.getClass().getCanonicalName(); if (mBaseParameters.mCluster) { List<String> commandArgs = Arrays.stream(args).filter((s) -> !BaseParameters.CLUSTER_FLAG.equals(s)) .filter((s) -> !s.isEmpty()).collect(Collectors.toList()); commandArgs.addAll(mBaseParameters.mJavaOpts); JobInfo jobInfo = JobGrpcClientUtils.run(new StressBenchConfig(className, commandArgs), 0, conf); return jobInfo.getResult().toString(); } if (mBaseParameters.mInProcess) { T result = runLocal(); if (mBaseParameters.mDistributed) { return result.toJson(); } return result.aggregator().aggregate(Collections.singletonList(result)).toJson(); } else { List<String> command = new ArrayList<>(); command.add(conf.get(PropertyKey.HOME) + "/bin/alluxio"); command.add("runClass"); command.add(className); command.addAll(Arrays.asList(args)); command.add(BaseParameters.IN_PROCESS_FLAG); command.addAll(mBaseParameters.mJavaOpts); LOG.info("running command: " + String.join(" ", command)); return ShellUtils.execCommand(command.toArray(new String[0])); } <START> } <END></code><technical_language>throw exception if mInProcess mCluster is true</technical_language>

Target:
public String run(String[] args) throws Exception { JCommander jc = new JCommander(this); jc.setProgramName(this.getClass().getSimpleName()); try { jc.parse(args); } catch (Exception e) { jc.usage(); throw e; } prepare(); AlluxioConfiguration conf = new InstancedConfiguration(ConfigurationUtils.defaults()); String className = this.getClass().getCanonicalName(); if (mBaseParameters.mCluster) { List<String> commandArgs = Arrays.stream(args).filter((s) -> !BaseParameters.CLUSTER_FLAG.equals(s)) .filter((s) -> !s.isEmpty()).collect(Collectors.toList()); commandArgs.addAll(mBaseParameters.mJavaOpts); long jobId = JobGrpcClientUtils.run(new StressBenchConfig(className, commandArgs, 5000), 0, conf); JobInfo jobInfo = JobGrpcClientUtils.getJobStatus(jobId, conf, true); return jobInfo.getResult().toString(); } if (mBaseParameters.mInProcess) { T result = runLocal(); if (mBaseParameters.mDistributed) { return result.toJson(); } return result.aggregator().aggregate(Collections.singletonList(result)).toJson(); } else { List<String> command = new ArrayList<>(); command.add(conf.get(PropertyKey.HOME) + "/bin/alluxio"); command.add("runClass"); command.add(className); command.addAll(Arrays.asList(args)); command.add(BaseParameters.IN_PROCESS_FLAG); command.addAll(mBaseParameters.mJavaOpts); LOG.info("running command: " + String.join(" ", command)); return ShellUtils.execCommand(command.toArray(new String[0])); } }
Source:
<code>private SingleStreamSpiller getSpiller() { <START> return spiller.orElseThrow(() -> new IllegalStateException("Spiller not loaded")); <END> }</code><technical_language>"created"</technical_language>

Target:
private SingleStreamSpiller getSpiller() { return spiller.orElseThrow(() -> new IllegalStateException("Spiller not created")); }
Source:
<code>private void collectWifiInfo (final DataInputProtos.batched_periodic_data batchedPeriodicData) { final String connectedSSID = batchedPeriodicData.hasConnectedSsid() ? batchedPeriodicData.getConnectedSsid() : "unknown_ssid"; final String senseId = batchedPeriodicData.getDeviceId(); for (final DataInputProtos.batched_periodic_data.wifi_access_point wifiAccessPoint : batchedPeriodicData.getScanList()) { final String scannedSSID = wifiAccessPoint.getSsid(); if (!connectedSSID.equals(scannedSSID)) { continue; } if (wifiInfoHistory.containsKey(senseId) && wifiInfoHistory.get(senseId).ssid.equals(connectedSSID)) { if (hasPersistSignificantWifiRssiChangeEnabled(senseId)) { if (!hasSignificantRssiChange(wifiInfoHistory, senseId, wifiAccessPoint.getRssi())) { LOGGER.trace("Skip writing because there is no significant wifi info change for {}'s network {}", senseId, connectedSSID); continue; } } <START> else { <END> LOGGER.trace("Skip writing because of {}'s unchanged network {}", senseId, connectedSSID); continue; } } final WifiInfo wifiInfo = WifiInfo.create(senseId, connectedSSID, wifiAccessPoint.getRssi(), new DateTime(batchedPeriodicData.getData(0).getUnixTime() * 1000L, DateTimeZone.UTC)); wifiInfoPerBatch.put(senseId, wifiInfo); wifiInfoHistory.put(senseId, wifiInfo); } }</code><technical_language>need else</technical_language>

Target:
private void collectWifiInfo (final DataInputProtos.batched_periodic_data batchedPeriodicData) { final String connectedSSID = batchedPeriodicData.hasConnectedSsid() ? batchedPeriodicData.getConnectedSsid() : "unknown_ssid"; final String senseId = batchedPeriodicData.getDeviceId(); for (final DataInputProtos.batched_periodic_data.wifi_access_point wifiAccessPoint : batchedPeriodicData.getScanList()) { final String scannedSSID = wifiAccessPoint.getSsid(); if (!connectedSSID.equals(scannedSSID)) { continue; } if (wifiInfoHistory.containsKey(senseId) && wifiInfoHistory.get(senseId).ssid.equals(connectedSSID)) { if (!hasPersistSignificantWifiRssiChangeEnabled(senseId)) { LOGGER.trace("Skip writing because of {}'s unchanged network {}", senseId, connectedSSID); continue; } if (!hasSignificantRssiChange(wifiInfoHistory, senseId, wifiAccessPoint.getRssi())) { LOGGER.trace("Skip writing because there is no significant wifi info change for {}'s network {}", senseId, connectedSSID); continue; } } final WifiInfo wifiInfo = WifiInfo.create(senseId, connectedSSID, wifiAccessPoint.getRssi(), new DateTime(batchedPeriodicData.getData(0).getUnixTime() * 1000L, DateTimeZone.UTC)); wifiInfoPerBatch.put(senseId, wifiInfo); wifiInfoHistory.put(senseId, wifiInfo); } }
Source:
<code>public boolean isActive(ITimeGraphEntry element) { if (element instanceof ControlFlowEntry) { ControlFlowEntry cfe = (ControlFlowEntry) element; TmfTraceManager traceManager = TmfTraceManager.getInstance(); TmfTraceContext traceContext = traceManager.getCurrentTraceContext(); TmfTimeRange winRange = traceContext.getWindowRange(); TmfTimeRange selRange = traceContext.getSelectionRange(); long beginTS = selRange.getStartTime().getValue(); long endTS = selRange.getEndTime().getValue(); if (beginTS == endTS) { beginTS = winRange.getStartTime().getValue(); endTS = winRange.getEndTime().getValue(); } <START> for (ITmfTrace trace : traceManager.getActiveTraceSet()) { <END> if (trace == null) { continue; } ITmfStateSystem ssq = TmfStateSystemAnalysisModule.getStateSystem(trace, KernelAnalysis.ID); if (ssq == null) { continue; } try { int statusQuark = ssq.getQuarkAbsolute(Attributes.THREADS, Integer.toString(cfe.getThreadId()), Attributes.STATUS); List<ITmfStateInterval> ivals = StateSystemUtils.queryHistoryRange(ssq, statusQuark, beginTS, endTS); for (ITmfStateInterval state : ivals) { int value = state.getStateValue().unboxInt(); if (value == StateValues.PROCESS_STATUS_RUN_USERMODE || value == StateValues.PROCESS_STATUS_RUN_SYSCALL || value == StateValues.PROCESS_STATUS_INTERRUPTED) { return true; } } } catch (AttributeNotFoundException | StateSystemDisposedException e) { } } } return false; }</code><technical_language>avoid loop cfe.getTrace() directly</technical_language>

Target:
public boolean isActive(ITimeGraphEntry element) { if (element instanceof ControlFlowEntry) { ControlFlowEntry cfe = (ControlFlowEntry) element; TmfTraceManager traceManager = TmfTraceManager.getInstance(); TmfTraceContext traceContext = traceManager.getCurrentTraceContext(); TmfTimeRange winRange = traceContext.getWindowRange(); TmfTimeRange selRange = traceContext.getSelectionRange(); long beginTS = selRange.getStartTime().getValue(); long endTS = selRange.getEndTime().getValue(); if (beginTS == endTS) { beginTS = winRange.getStartTime().getValue(); endTS = winRange.getEndTime().getValue(); } ITmfTrace trace = cfe.getTrace(); ITmfStateSystem ssq = TmfStateSystemAnalysisModule.getStateSystem(trace, KernelAnalysis.ID); if (ssq != null) { try { int statusQuark = ssq.getQuarkRelative(cfe.getThreadQuark(), Attributes.STATUS); long ssqEndTS = ssq.getCurrentEndTime(); long ssqBeginTS = ssq.getStartTime(); if (beginTS < ssqBeginTS) { beginTS = ssqBeginTS; } if (endTS > ssqEndTS) { endTS = ssqEndTS; } ITmfStateInterval currentInterval = ssq.querySingleState(beginTS, statusQuark); if (isIntervalInStateActive(currentInterval)) { return true; } long ts = currentInterval.getEndTime(); while (ts != -1 && ts < endTS) { ts++; currentInterval = ssq.querySingleState(ts, statusQuark); if (isIntervalInStateActive(currentInterval)) { return true; } ts = currentInterval.getEndTime(); } } catch (AttributeNotFoundException | StateSystemDisposedException e) { } } } return false; }
Source:
<code>public List<SSLContext> getConfiguredSSLContexts() { return this.configuredSSLContexts; <START> } <END></code><technical_language>of a dynamic SSL context for outbound connection server side, authentication-client configuration need SSL contexts match-host match-port rules. mentioned in description for EAP7-1121 possibly able a dynamic SSL context for JVM wide default SSL context. this configuration server side</technical_language>

Target:
public List<SSLContext> getConfiguredSSLContexts() throws DynamicSSLContextException { if (this.configuredSSLContexts != null) { return this.configuredSSLContexts; } try { return AUTH_CONTEXT_CLIENT.getConfiguredSSLContexts(AuthenticationContext.captureCurrent()); } catch (GeneralSecurityException e) { throw ElytronMessages.log.cannotObtainConfiguredSSLContexts(e); } }
Source:
<code>protected Object readResolve() { JiraSite jiraSite; if (credentialsId == null && userName != null && password != null) { jiraSite = new JiraSite(url, alternativeUrl, userName, password.getPlainText(), supportsWikiStyleComment, recordScmChanges, userPattern, updateJiraIssueForAllStatus, groupVisibility, roleVisibility, useHTTPAuth); } else { jiraSite = new JiraSite( url, alternativeUrl, credentialsId, supportsWikiStyleComment, recordScmChanges, userPattern, updateJiraIssueForAllStatus, groupVisibility, roleVisibility, useHTTPAuth, timeout, readTimeout, threadExecutorNumber ); } jiraSite.setAppendChangeTimestamp( appendChangeTimestamp ); jiraSite.setDisableChangelogAnnotations( disableChangelogAnnotations ); jiraSite.setDateTimePattern( dateTimePattern ); <START> jiraSite.setSendAssigneeAsName(sendAssigneeAsName); <END> return jiraSite; }</code><technical_language>Apply this change in tests</technical_language>

Target:
protected Object readResolve() { JiraSite jiraSite; if (credentialsId == null && userName != null && password != null) { jiraSite = new JiraSite(url, alternativeUrl, userName, password.getPlainText(), supportsWikiStyleComment, recordScmChanges, userPattern, updateJiraIssueForAllStatus, groupVisibility, roleVisibility, useHTTPAuth); } else { jiraSite = new JiraSite( url, alternativeUrl, credentialsId, supportsWikiStyleComment, recordScmChanges, userPattern, updateJiraIssueForAllStatus, groupVisibility, roleVisibility, useHTTPAuth, timeout, readTimeout, threadExecutorNumber ); } jiraSite.setAppendChangeTimestamp( appendChangeTimestamp ); jiraSite.setDisableChangelogAnnotations( disableChangelogAnnotations ); jiraSite.setDateTimePattern( dateTimePattern ); return jiraSite; }
Source:
<code>public void systemConditionChanged() { <START> checkConditionsAndDisplayFirstIAMQueued(); <END> }</code><technical_language>Rename attemptToQueueAndShowInAppMessages() if IAM is showing this fires</technical_language>

Target:
public void systemConditionChanged() { attemptToShowInAppMessage(); }
Source:
<code>private ThreadWrapper createObjects(int objectsCount, boolean asyncTransaction) { if (asyncTransaction) { return createTaskInHandlerThread((realm, success) -> { <START> RealmLog.error("Creating objects (async): " + Thread.currentThread().getName()); <END> realm.executeTransactionAsync(bgRealm -> populateTestRealm(bgRealm, objectsCount), success::countDown); }); } else { return createTaskInThread((realm) -> { RealmLog.error("Creating objects: " + Thread.currentThread().getName()); populateTestRealm(realm, objectsCount); }); } }</code><technical_language>reserve error for actual errors</technical_language>

Target:
private Runnable createObjects(int objectsCount, boolean asyncTransaction) { if (asyncTransaction) { return createTaskInHandlerThread((realm, success) -> { RealmLog.info("Creating objects (async): " + Thread.currentThread().getName()); realm.executeTransactionAsync(bgRealm -> populateTestRealm(bgRealm, objectsCount), success::countDown); }); } else { return createTaskInThread((realm) -> { RealmLog.info("Creating objects: " + Thread.currentThread().getName()); populateTestRealm(realm, objectsCount); }); } }
Source:
<code>public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View root = super.onCreateViewHelper(inflater, container, savedInstanceState, R.layout.all_episodes_fragment); ItemTouchHelper.SimpleCallback simpleItemTouchCallback = new ItemTouchHelper.SimpleCallback(0, ItemTouchHelper.LEFT | ItemTouchHelper.RIGHT) { @Override public boolean onMove(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, RecyclerView.ViewHolder target) { return false; } @Override public void onSwiped(RecyclerView.ViewHolder viewHolder, int swipeDir) { AllEpisodesRecycleAdapter.Holder holder = (AllEpisodesRecycleAdapter.Holder)viewHolder; Log.d(TAG, "remove(" + holder.getItemId() + ")"); if (subscription != null) { subscription.unsubscribe(); } FeedItem item = holder.getFeedItem(); if (item != null) { DBWriter.removeFavoriteItem(item); Snackbar snackbar = Snackbar.make(root, getString(R.string.removed_item), Snackbar.LENGTH_LONG); snackbar.setAction(getString(R.string.undo), v -> { <START> DBWriter.addFavoriteItem(item); <END> }); snackbar.show(); } } }; ItemTouchHelper itemTouchHelper = new ItemTouchHelper(simpleItemTouchCallback); itemTouchHelper.attachToRecyclerView(listView); return root; }</code><technical_language>hm, create Pair<FeedItem,Integer> holds position submit snackbar for undo</technical_language>

Target:
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View root = super.onCreateViewHelper(inflater, container, savedInstanceState, R.layout.all_episodes_fragment); ItemTouchHelper.SimpleCallback simpleItemTouchCallback = new ItemTouchHelper.SimpleCallback(0, ItemTouchHelper.LEFT | ItemTouchHelper.RIGHT) { @Override public boolean onMove(RecyclerView recyclerView, RecyclerView.ViewHolder viewHolder, RecyclerView.ViewHolder target) { return false; } @Override public void onSwiped(RecyclerView.ViewHolder viewHolder, int swipeDir) { AllEpisodesRecycleAdapter.Holder holder = (AllEpisodesRecycleAdapter.Holder)viewHolder; Log.d(TAG, "remove(" + holder.getItemId() + ")"); if (subscription != null) { subscription.unsubscribe(); } FeedItem item = holder.getFeedItem(); if (item != null) { DBWriter.removeFavoriteItem(item); Snackbar snackbar = Snackbar.make(root, getString(R.string.removed_item), Snackbar.LENGTH_LONG); snackbar.setAction(getString(R.string.undo), v -> { DBWriter.addFavoriteItem(item); }); snackbar.show(); } } }; ItemTouchHelper itemTouchHelper = new ItemTouchHelper(simpleItemTouchCallback); itemTouchHelper.attachToRecyclerView(recyclerView); return root; }
Source:
<code>public ShowEmptyRowsAction() { super(org.eclipse.tracecompass.internal.tmf.ui.views.timegraph.Messages.AbstractTimeGraphView_ShowRowsActionName, IAction.AS_PUSH_BUTTON); setToolTipText(org.eclipse.tracecompass.internal.tmf.ui.views.timegraph.Messages.AbstractTimeGraphView_ShowRowsActionTooltip); setImageDescriptor(SHOW_EMPTY_ROWS); <START> setChecked(true); <END> }</code><technical_language>replace fIsHideRowsFilterActive = Store.getPreference store preference</technical_language>

Target:
public ShowEmptyRowsAction() { super(org.eclipse.tracecompass.internal.tmf.ui.views.timegraph.Messages.AbstractTimeGraphView_ShowRowsActionName, IAction.AS_CHECK_BOX); setToolTipText(org.eclipse.tracecompass.internal.tmf.ui.views.timegraph.Messages.AbstractTimeGraphView_ShowRowsActionTooltip); setImageDescriptor(Activator.getDefault().getImageDescripterFromPath(ITmfImageConstants.IMG_UI_SHOW_ROWS_BUTTON)); setChecked(true); }
Source:
<code>public ItemStack decrStackSize(int i, int j) { try { ItemStack stack = (ItemStack) getItem.invoke(this.tile); if(stack.stackSize > this.hide) { stack.stackSize -= 1; setItem.invoke(this.tile, stack); ItemStack ret = stack.copy(); ret.stackSize = 1; return ret; } } catch (Exception e) <START> <END> return null; }</code><technical_language>catch Exception, some exceptions handled code understands implications of exception. Eg: InterruptException OutOfMemory. This is place hand of those</technical_language>

Target:
public ItemStack decrStackSize(int i, int j) { try { ItemStack stack = (ItemStack) getItem.invoke(this.tile); if(stack.stackSize > this.hide) { stack.stackSize -= 1; setItem.invoke(this.tile, stack.stackSize <= 0 ? null : stack); ItemStack ret = stack.copy(); ret.stackSize = 1; return ret; } } catch (IllegalAccessException e){} catch (IllegalArgumentException e){} catch (InvocationTargetException e){} return null; }
Source:
<code>private void reverse(final LEdge lEdge, final LGraph lGraph) { lEdge.reverse(lGraph, true); <START> lEdge.setProperty(LayeredOptions.PRIORITY_DIRECTION, PARTITION_CONSTRAINT_EDGE_PRIORITY); <END> }</code><technical_language>check if a non-default priority is set, and, if so, add constant. a user manually "fix" issue nodes partitions present</technical_language>

Target:
private void reverse(final LEdge lEdge, final LGraph lGraph) { lEdge.reverse(lGraph, true); if (!lEdge.hasProperty(LayeredOptions.PRIORITY_DIRECTION)) { lEdge.setProperty(LayeredOptions.PRIORITY_DIRECTION, PARTITION_CONSTRAINT_EDGE_PRIORITY); } }
Source:
<code>public String loadColumn(String columnName) { int pos = 1; int chunk = 256*1024; <START> String buf = ""; <END> while (true) { Cursor cursor = null; try { cursor = mDb.getDatabase().rawQuery( "SELECT substr(" + columnName + ", ?, ?) FROM col", new String[]{Integer.toString(pos), Integer.toString(chunk)}); if (!cursor.moveToFirst()) { return buf; } String res = cursor.getString(0); if (res.length() == 0) { break; } buf += res; if (res.length() < chunk) { break; } pos += chunk; } finally { if (cursor != null) { cursor.close(); } } } return buf; }</code><technical_language>This a StringBuffer / StringBuilder for efficiency. a String copied time append</technical_language>

Target:
public String loadColumn(String columnName) { int pos = 1; int chunk = 256*1024; StringBuffer buf = new StringBuffer(""); while (true) { Cursor cursor = null; try { cursor = mDb.getDatabase().rawQuery( "SELECT substr(" + columnName + ", ?, ?) FROM col", new String[]{Integer.toString(pos), Integer.toString(chunk)}); if (!cursor.moveToFirst()) { return buf.toString(); } String res = cursor.getString(0); if (res.length() == 0) { break; } buf.append(res); if (res.length() < chunk) { break; } pos += chunk; } finally { if (cursor != null) { cursor.close(); } } } return buf.toString(); }
Source:
<code>public boolean equals(Object obj) { <START> WorkspaceListItem itemForCompare = (WorkspaceListItem) obj; <END> return this.ownerName.equals(itemForCompare.ownerName) && this.workspaceName.equals(itemForCompare.workspaceName) && this.ramAmount == itemForCompare.ramAmount && this.projectsAmount == itemForCompare.projectsAmount; }</code><technical_language>Generic more preferable in this case</technical_language>

Target:
public boolean equals(Object obj) { if (obj instanceof WorkspaceListItem) { WorkspaceListItem itemForCompare = (WorkspaceListItem) obj; return this.ownerName.equals(itemForCompare.ownerName) && this.workspaceName.equals(itemForCompare.workspaceName) && this.ramAmount == itemForCompare.ramAmount && this.projectsAmount == itemForCompare.projectsAmount; } return false; }
Source:
<code>public void creatingUserConsentsToAllRequiredConsents() { Study study = TestUtils.getValidStudy(UserAdminServiceMockTest.class); StudyParticipant participant = new StudyParticipant.Builder().withEmail("email@email.com").withPassword("password").build(); service.createUser(study, participant, null, true, true); verify(participantService).createParticipant(study, Sets.newHashSet(Roles.ADMIN), participant, false); verify(authenticationService).signIn(eq(study), contextCaptor.capture(), signInCaptor.capture()); CriteriaContext context = contextCaptor.getValue(); assertEquals(study.getStudyIdentifier(), context.getStudyIdentifier()); SignIn signIn = signInCaptor.getValue(); assertEquals(participant.getEmail(), signIn.getEmail()); assertEquals(participant.getPassword(), signIn.getPassword()); <START> <END> verify(consentService).getConsentStatuses(context); }</code><technical_language>remove this test? creating a user consentUser longer function</technical_language>

Target:
public void creatingUserConsentsToAllRequiredConsents() { Study study = TestUtils.getValidStudy(UserAdminServiceMockTest.class); StudyParticipant participant = new StudyParticipant.Builder().withEmail("email@email.com").withPassword("password").build(); Map<SubpopulationGuid,ConsentStatus> statuses = Maps.newHashMap(); statuses.put(SubpopulationGuid.create("foo1"), TestConstants.REQUIRED_SIGNED_CURRENT); statuses.put(SubpopulationGuid.create("foo2"), TestConstants.REQUIRED_SIGNED_OBSOLETE); when(consentService.getConsentStatuses(any())).thenReturn(statuses); service.createUser(study, participant, null, true, true); verify(participantService).createParticipant(study, Sets.newHashSet(Roles.ADMIN), participant, false); verify(authenticationService).signIn(eq(study), contextCaptor.capture(), signInCaptor.capture()); CriteriaContext context = contextCaptor.getValue(); assertEquals(study.getStudyIdentifier(), context.getStudyIdentifier()); verify(consentService).consentToResearch(eq(study), eq(SubpopulationGuid.create("foo1")), any(StudyParticipant.class), any(), eq(SharingScope.NO_SHARING), eq(false)); verify(consentService).consentToResearch(eq(study), eq(SubpopulationGuid.create("foo2")), any(StudyParticipant.class), any(), eq(SharingScope.NO_SHARING), eq(false)); SignIn signIn = signInCaptor.getValue(); assertEquals(participant.getEmail(), signIn.getEmail()); assertEquals(participant.getPassword(), signIn.getPassword()); verify(consentService).getConsentStatuses(context); }
Source:
<code>public static String getAttributeValueFromString(String string) { <START> String content = string; <END> if (content.length() > 0) { return content; } return null; }</code><technical_language>this variable is needed here. be: java public static String getAttributeValueFromString(String string) { if (string.length() > 0) { return string; } return null; } This functions fail if string == null. this: java if (string == null || string.length() > 0) { return null; }</technical_language>

Target:
public static String getAttributeValueFromString(String string) { if (string != null && string.length() > 0) { return string; } return null; }