auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
private Network getNetworkByName(List<Network> networks) { return LinqUtils.firstOrNull(networks, new Predicate<Network>() { @Override public boolean eval(Network network) { return network.getname().equals(getNetworkName()); } }); }

Target:
private Network getNetworkByName(List<Network> networks) { return LinqUtils.firstOrNull(networks, new Predicate<Network>() { @Override public boolean eval(Network network) { return network.getName().equals(getNetworkName()); } }); }
Source:
public static VmInitNetwork map(NicConfiguration model, VmInitNetwork template) { VmInitNetwork entity = template != null ? template : new VmInitNetwork(); if (model.isSetName()) { entity.setName(model.getName()); } if (model.isOnBoot()) { entity.setStartOnBoot(model.isOnBoot()); } if (model.isSetBootProtocol()) { entity.setBootProtocol(Ipv4BootProtocolMapper.map(model.getBootProtocol())); } if (model.isSetIp()) { if (model.getIp().isSetAddress()) { entity.setIp(model.getIp().getAddress()); } if (model.getIp().isSetNetmask()) { entity.setNetmask(model.getIp().getNetmask()); } if (model.getIp().isSetGateway()) { entity.setGateway(model.getIp().getGateway()); } } if (model.isSetIpv6BootProtocol()) { entity.setIpv6BootProtocol(Ipv6BootProtocolMapper.map(model.getIpv6BootProtocol())); } if (model.isSetIpv6()) { if (model.getIpv6().isSetAddress()) { entity.setIpv6Address(model.getIpv6().getAddress()); } if (model.getIpv6().isSetNetmask()) { entity.setIpv6Prefix((int) IntegerParser.parseUnsignedInt(model.getIpv6().getNetmask())); } if (model.getIpv6().isSetGateway()) { entity.setIpv6Gateway(model.getIpv6().getGateway()); } } return entity; }

Target:
public static VmInitNetwork map(NicConfiguration model, VmInitNetwork template) { VmInitNetwork entity = template != null ? template : new VmInitNetwork(); if (model.isSetName()) { entity.setName(model.getName()); } if (model.isOnBoot()) { entity.setStartOnBoot(model.isOnBoot()); } if (model.isSetBootProtocol()) { entity.setBootProtocol(Ipv4BootProtocolMapper.map(model.getBootProtocol())); } if (model.isSetIp()) { if (model.getIp().isSetAddress()) { entity.setIp(model.getIp().getAddress()); } if (model.getIp().isSetNetmask()) { entity.setNetmask(model.getIp().getNetmask()); } if (model.getIp().isSetGateway()) { entity.setGateway(model.getIp().getGateway()); } } if (model.isSetIpv6BootProtocol()) { entity.setIpv6BootProtocol(Ipv6BootProtocolMapper.map(model.getBootProtocol())); } if (model.isSetIpv6()) { if (model.getIpv6().isSetAddress()) { entity.setIpv6Address(model.getIpv6().getAddress()); } if (model.getIpv6().isSetNetmask()) { entity.setIpv6Prefix((int) IntegerParser.parseUnsignedInt(model.getIpv6().getNetmask())); } if (model.getIpv6().isSetGateway()) { entity.setIpv6Gateway(model.getIpv6().getGateway()); } } return entity; }
Source:
private void schedule(Command command) { if (scheduler != null) { scheduler.schedule(command); } else { throw new IllegalStateException( "Scheduled commands are not supported by this command bus (scheduler is not set)."); } }

Target:
private void schedule(Command command) { if (scheduler != null) { scheduler.schedule(command); } else { throw new IllegalStateException( "Scheduled commands are not supported by this command bus: scheduler is not set."); } }
Source:
public static JSONObject deleteRepeatToJson(FormEntryController controller, FormEntryModel model, String formIndexString) { JSONObject ret = new JSONObject(); FormIndex formIndex = indexFromString(formIndexString, model.getForm()); controller.deleteRepeat(formIndex); ret.put(ApiConstants.QUESTION_TREE_KEY, walkToJSON(model, controller)); return ret; }

Target:
public static JSONObject deleteRepeatToJson(FormEntryController controller, FormEntryModel model, String formIndexString) { FormIndex formIndex = indexFromString(formIndexString, model.getForm()); controller.deleteRepeat(formIndex); return getCurrentJson(controller, model); }
Source:
private void assertJson(Object value, String resourceFile) { final JsonNode jsonTree = readTreeFromResource(resourceFile); final JsonNode objectTree = mapper.valueToTree(value); try { assertEquals(mapper.readTree(jsonTree.toString()), mapper.readTree(objectTree.toString())); } catch (IOException e) { System.out.println(new StringBuilder("Error while reading tree: ").append(e.getMessage())); } }

Target:
private void assertJson(Object value, String resourceFile) { final JsonNode jsonTree = readTreeFromResource(resourceFile); final JsonNode objectTree = mapper.valueToTree(value); try { assertEquals(mapper.readTree(jsonTree.toString()), mapper.readTree(objectTree.toString())); } catch (IOException e) { fail(e.getMessage()); } }
Source:
public void addACL(ACL acl) { assert acl != null; ACL oldACL = getACL(acl.getName()); if (!acl.equals(oldACL)) { if (oldACL != null) { oldACL.clear(); oldACL.addAll(acl); } else { String name = acl.getName(); switch (name) { case ACL.INHERITED_ACL: acls.add(acl); break; case ACL.LOCAL_ACL: ACL inherited = getACL(ACL.INHERITED_ACL); if (inherited != null) { int i = acls.indexOf(inherited); acls.add(i, acl); } else { acls.add(acl); } break; default: ACL local = getACL(ACL.LOCAL_ACL); if (local != null) { int i = acls.indexOf(local); if (Framework.isBooleanPropertyTrue(LEGACY_BEHAVIOUR_PROPERTY)) { ++i; } acls.add(i, acl); } else { inherited = getACL(ACL.INHERITED_ACL); if (inherited != null) { int i = acls.indexOf(inherited); acls.add(i, acl); } else { acls.add(acl); } } } } } cache.clear(); }

Target:
public void addACL(ACL acl) { assert acl != null; ACL oldACL = getACL(acl.getName()); if (!acl.equals(oldACL)) { if (oldACL != null) { oldACL.clear(); oldACL.addAll(acl); } else { String name = acl.getName(); switch (name) { case ACL.INHERITED_ACL: acls.add(acl); break; case ACL.LOCAL_ACL: ACL inherited = getACL(ACL.INHERITED_ACL); if (inherited != null) { int i = acls.indexOf(inherited); acls.add(i, acl); } else { acls.add(acl); } break; default: ACL local = getACL(ACL.LOCAL_ACL); if (local != null) { int i = acls.indexOf(local); if (isLegacyBehavior) { i++; } acls.add(i, acl); } else { inherited = getACL(ACL.INHERITED_ACL); if (inherited != null) { int i = acls.indexOf(inherited); acls.add(i, acl); } else { acls.add(acl); } } } } } cache.clear(); }
Source:
public TimeSeriesQueryPredicate build() { checkState(metric != null); try { checkState(tagPredicates.size() > 0); } catch (IllegalStateException e) { throw new QueryException("No valid tag predicates"); } return new TimeSeriesQueryPredicate(metric, ImmutableSet.copyOf(tagPredicates)); }

Target:
public TimeSeriesQueryPredicate build() { checkState(metric != null); checkState(tagPredicates.size() > 0); return new TimeSeriesQueryPredicate(metric, ImmutableSet.copyOf(tagPredicates)); }
Source:
public ModelAndView byProjectShortName(@PathVariable String shortName, ModelMap model) throws IOException { Project project = projectService.getProjectByShortName(shortName); if (project == null) { return new ModelAndView("/pages/notFound.jsp", model); } return setupForm(project.getId(), model); }

Target:
public ModelAndView byProjectShortName(@PathVariable String shortName, ModelMap model) throws IOException { Project project = projectService.getProjectByShortName(shortName); if (project == null) throw new NotFoundException("No project found for shortname " + shortName); return setupForm(project.getId(), model); }
Source:
public ITokenCacheStore getCache() { if (mBrokerProxy.canSwitchToBroker()) { return new ITokenCacheStore() { private static final long serialVersionUID = 1L; @Override public void setItem(String key, TokenCacheItem item) { throw new UnsupportedOperationException( "Broker cache does not support direct setItem operation"); } @Override public void removeItem(String key) { throw new UnsupportedOperationException( "Broker cache does not support direct removeItem operation"); } @Override public void removeAll() { mBrokerProxy.removeAccounts(); } @Override public TokenCacheItem getItem(String key) { throw new UnsupportedOperationException( "Broker cache does not support direct getItem operation"); } @Override public boolean contains(String key) { throw new UnsupportedOperationException( "Broker cache does not support contains operation"); } @Override public Iterable<TokenCacheItem> getAll() { throw new UnsupportedOperationException( "Broker cache does not support direct getAll operation"); } }; } return mTokenCacheStore; }

Target:
public ITokenCacheStore getCache() { if (mBrokerProxy.canSwitchToBroker()) { return new ITokenCacheStore() { private static final long serialVersionUID = 1L; @Override public void setItem(String key, TokenCacheItem item) { throw new UnsupportedOperationException( "Broker cache does not support direct setItem operation"); } @Override public void removeItem(String key) { throw new UnsupportedOperationException( "Broker cache does not support direct removeItem operation"); } @Override public void removeAll() { mBrokerProxy.removeAccounts(); } @Override public TokenCacheItem getItem(String key) { throw new UnsupportedOperationException( "Broker cache does not support direct getItem operation"); } @Override public boolean contains(String key) { throw new UnsupportedOperationException( "Broker cache does not support contains operation"); } @Override public Iterator<TokenCacheItem> getAll() { throw new UnsupportedOperationException( "Broker cache does not support direct getAll operation"); } }; } return mTokenCacheStore; }
Source:
public void testStartSendingEvents() { entrancePi.setOutputStream(outputStream); new Expectations() { { for (int i=0; i<1; i++) { entranceProcessor.isFinished(); result=false; entranceProcessor.hasNext(); result=false; } for (int i=0; i<5; i++) { entranceProcessor.isFinished(); result=false; entranceProcessor.hasNext(); result=true; entranceProcessor.nextEvent(); result=event; outputStream.put(event); } for (int i=0; i<2; i++) { entranceProcessor.isFinished(); result=false; entranceProcessor.hasNext(); result=false; } for (int i=0; i<5; i++) { entranceProcessor.isFinished(); result=false; entranceProcessor.hasNext(); result=true; entranceProcessor.nextEvent(); result=event; outputStream.put(event); } entranceProcessor.isFinished(); result=true; times=1; entranceProcessor.hasNext(); times=0; } }; entrancePi.startSendingEvents(); new Verifications() { { try { Thread.sleep(anyInt); times=3; } catch (InterruptedException e) { } } }; }

Target:
public void testStartSendingEvents() { entrancePi.setOutputStream(outputStream); new StrictExpectations() { { for (int i=0; i<1; i++) { entranceProcessor.isFinished(); result=false; entranceProcessor.hasNext(); result=false; } for (int i=0; i<5; i++) { entranceProcessor.isFinished(); result=false; entranceProcessor.hasNext(); result=true; entranceProcessor.nextEvent(); result=event; outputStream.put(event); } for (int i=0; i<2; i++) { entranceProcessor.isFinished(); result=false; entranceProcessor.hasNext(); result=false; } for (int i=0; i<5; i++) { entranceProcessor.isFinished(); result=false; entranceProcessor.hasNext(); result=true; entranceProcessor.nextEvent(); result=event; outputStream.put(event); } entranceProcessor.isFinished(); result=true; times=1; entranceProcessor.hasNext(); times=0; } }; entrancePi.startSendingEvents(); new Verifications() { { try { Thread.sleep(anyInt); times=3; } catch (InterruptedException e) { } } }; }
Source:
public void testNonDeterministicPredicatePropagatesOnlyToSourceSideOfSemiJoin() { assertPlan("SELECT * FROM lineitem WHERE orderkey IN (SELECT orderkey FROM orders) AND orderkey = random(5)", anyTree( semiJoin("LINE_ORDER_KEY", "ORDERS_ORDER_KEY", "SEMI_JOIN_RESULT", anyTree( filter("LINE_ORDER_KEY = CAST(random(5) AS bigint)", tableScan("lineitem", ImmutableMap.of( "LINE_ORDER_KEY", "orderkey")))), anyTree( project( tableScan("orders", ImmutableMap.of("ORDERS_ORDER_KEY", "orderkey"))))))); assertPlan("SELECT * FROM lineitem WHERE orderkey NOT IN (SELECT orderkey FROM orders) AND orderkey = random(5)", anyTree( semiJoin("LINE_ORDER_KEY", "ORDERS_ORDER_KEY", "SEMI_JOIN_RESULT", anyTree( filter("LINE_ORDER_KEY = CAST(random(5) AS bigint)", tableScan("lineitem", ImmutableMap.of( "LINE_ORDER_KEY", "orderkey")))), anyTree( project( tableScan("orders", ImmutableMap.of("ORDERS_ORDER_KEY", "orderkey"))))))); }

Target:
public void testNonDeterministicPredicatePropagatesOnlyToSourceSideOfSemiJoin() { assertPlan("SELECT * FROM lineitem WHERE orderkey IN (SELECT orderkey FROM orders) AND orderkey = random(5)", anyTree( semiJoin("LINE_ORDER_KEY", "ORDERS_ORDER_KEY", "SEMI_JOIN_RESULT", anyTree( filter("LINE_ORDER_KEY = CAST(random(5) AS bigint)", tableScan("lineitem", ImmutableMap.of( "LINE_ORDER_KEY", "orderkey")))), node(ExchangeNode.class, project( tableScan("orders", ImmutableMap.of("ORDERS_ORDER_KEY", "orderkey"))))))); assertPlan("SELECT * FROM lineitem WHERE orderkey NOT IN (SELECT orderkey FROM orders) AND orderkey = random(5)", anyTree( semiJoin("LINE_ORDER_KEY", "ORDERS_ORDER_KEY", "SEMI_JOIN_RESULT", anyTree( filter("LINE_ORDER_KEY = CAST(random(5) AS bigint)", tableScan("lineitem", ImmutableMap.of( "LINE_ORDER_KEY", "orderkey")))), anyTree( project( tableScan("orders", ImmutableMap.of("ORDERS_ORDER_KEY", "orderkey"))))))); }
Source:
public boolean isRsMaintainer(CIString mntner) { return isRsMaintainer(Sets.newHashSet(mntner)); }

Target:
public boolean isRsMaintainer(CIString mntner) { return isRsMaintainer(Collections.singleton(mntner)); }
Source:
public TableDefinition get(TableHandle tableHandle) { if (tableDefinitions.containsKey(tableHandle)) { return tableDefinitions.get(tableHandle); } TableHandle found = null; for (TableHandle testTableHandle : tableDefinitions.keySet()) { if (testTableHandle.isMoreSpecificThan(tableHandle)) { checkState(found == null, "ambiguous table handle: %s", tableHandle); found = testTableHandle; } } checkState(found != null, "no table definition for: %s", tableHandle); return tableDefinitions.get(found); }

Target:
public TableDefinition get(TableHandle tableHandle) { TableDefinitionRepositoryKey tableHandleKey = asRepositoryKey(tableHandle); TableDefinitionRepositoryKey nameKey = asRepositoryKey(tableHandle.getName()); if (tableDefinitions.containsKey(tableHandleKey)) { return tableDefinitions.get(tableHandleKey); } else if (tableDefinitions.containsKey(nameKey)){ return tableDefinitions.get(nameKey); } throw new IllegalStateException("no table definition for: " + tableHandleKey); }
Source:
private SBIIndex fromSAMRecords(final File bamFile, final long granularity) { final ByteArrayOutputStream out = new ByteArrayOutputStream(); final SBIIndexWriter indexWriter = new SBIIndexWriter(out, granularity); final BAMFileReader bamFileReader = bamFileReader(bamFile); final CloseableIterator<SAMRecord> iterator = bamFileReader.getIterator(); while (iterator.hasNext()) { processAlignment(indexWriter, iterator.next()); } indexWriter.finish(bamFileReader.getVirtualFilePointer(), bamFile.length()); return SBIIndex.load(new ByteArrayInputStream(out.toByteArray())); }

Target:
private SBIIndex fromSAMRecords(final File bamFile, final long granularity) throws IOException { final BAMFileReader bamFileReader = bamFileReader(bamFile); try (CloseableIterator<SAMRecord> iterator = bamFileReader.getIterator(); ByteArrayOutputStream out = new ByteArrayOutputStream()) { final SBIIndexWriter indexWriter = new SBIIndexWriter(out, granularity); while (iterator.hasNext()) { processAlignment(indexWriter, iterator.next()); } indexWriter.finish(bamFileReader.getVirtualFilePointer(), bamFile.length()); return SBIIndex.load(new ByteArrayInputStream(out.toByteArray())); } }
Source:
protected int findQueueIndex(File queueFile) { String queueDirName = queueFile.getParentFile().getName(); return Integer.valueOf(queueDirName.substring(queueDirName.length() - 2)); }

Target:
protected int findQueueIndex(File queueFile) { String queueDirName = queueFile.getParentFile().getName(); return Integer.parseInt(queueDirName.substring(queueDirName.length() - 2)); }
Source:
public void InteractiveMaps_035_PalantirSetDecimalZoom() { InteractiveMapPageObject selectedMap = new InteractiveMapPageObject(driver); selectedMap.openMap(wikiURL, 3); selectedMap.verifyMapOpened(); PalantirComponentObject poi = new PalantirComponentObject(driver); PalantirContent handle = new PalantirContent(); handle = poi.setAndVerifyPlayerPosition(-40, -10, 3.4, true); poi.verifyDecimalZoomLevel(handle.success, handle.responseCode, handle.message); poi.verifyPoiNotAppearOnMap(); }

Target:
public void InteractiveMaps_035_PalantirSetDecimalZoom() { InteractiveMapsPageObject specialMap = new InteractiveMapsPageObject(driver); InteractiveMapPageObject selectedMap = specialMap.openMap(wikiURL, PalantirContent.PALANTIR_MAP); selectedMap.verifyMapOpened(); PalantirComponentObject poi = new PalantirComponentObject(driver); PalantirContent handle = poi.setAndVerifyPlayerPosition(-40, -10, 3.4, true); poi.verifyDecimalZoomLevel(handle); poi.verifyPoiNotAppearOnMap(); }
Source:
protected Object evalBody(DataInstance model, EvaluationContext evalContext, Object[] evaluatedArgs) { List<String> sortedList; if (evaluatedArgs.length == 1) { sortedList = sortSingleList(FunctionUtils.toString(evaluatedArgs[0]), true); } else if (evaluatedArgs.length == 2) { Object lastArg = evaluatedArgs[1]; if (lastArg instanceof Boolean) { sortedList = sortSingleList(FunctionUtils.toString(evaluatedArgs[0]), FunctionUtils.toBoolean(evaluatedArgs[1])); } else { sortedList = sortListByOtherList(FunctionUtils.toString(evaluatedArgs[0]), FunctionUtils.toString(evaluatedArgs[1]), true); } } else { sortedList = sortListByOtherList(FunctionUtils.toString(evaluatedArgs[0]), FunctionUtils.toString(evaluatedArgs[1]), FunctionUtils.toBoolean(evaluatedArgs[2])); } return listToString(sortedList); }

Target:
protected Object evalBody(DataInstance model, EvaluationContext evalContext, Object[] evaluatedArgs) { List<String> sortedList; if (evaluatedArgs.length == 1) { sortedList = sortSingleList(FunctionUtils.toString(evaluatedArgs[0]), true); } else { sortedList = sortSingleList(FunctionUtils.toString(evaluatedArgs[0]), FunctionUtils.toBoolean(evaluatedArgs[1])); } return DataUtil.listToString(sortedList); }
Source:
public void loadMetaData() { try { File metaFile = FileSelector.selectFile("Select metadata file", this, ".txt"); gd.loadMetaData(metaFile); System.out.println(gd.getGenomes().get(0).getAge()); } catch (FileSelectorException | FileNotFoundException exception) { if (DialogUtil.confirm("Error!", "Your file was not found. Want to try again?")) { loadMetaData(); } } }

Target:
public void loadMetaData() { try { File metaFile = FileSelector.selectFile("Select metadata file", this, ".txt"); graphDataRepository.loadMetaData(metaFile); } catch (FileSelectorException | FileNotFoundException exception) { if (DialogUtil.confirm("Error!", "Your file was not found. Want to try again?")) { loadMetaData(); } } }
Source:
public AggregatorFactory[] getMetrics() { return metrics; }

Target:
AggregatorFactory[] getMetrics() { return metrics; }
Source:
private synchronized void updateItemsFromPanelSettings(PowerMaxBindingProvider provider, String name, PowerMaxSelectorType selector) { if (itemUpdateDisabled) { logger.debug("updateItemsFromPanelSettings(): items update disabled"); return; } if (provider == null) { for (PowerMaxBindingProvider prov : providers) { updateItemsFromPanelSettings(prov, name, selector); } } else { PowerMaxPanelSettings settings = PowerMaxPanelSettings.getThePanelSettings(); for (String itemName : provider.getItemNames()) { if ((name == null) || itemName.equals(name)) { State itemState = null; PowerMaxBindingConfig config = provider.getConfig(itemName); Item item = config.getItem(); if ((selector == null) || (selector == config.getSelectorType())) { switch (config.getSelectorType()) { case PANEL_TYPE: if ((item instanceof StringItem) && (settings.getPanelType() != null)) { itemState = new StringType(settings.getPanelType().getLabel()); } break; case PANEL_SERIAL: if ((item instanceof StringItem) && (settings.getPanelSerial() != null)) { itemState = new StringType(settings.getPanelSerial()); } break; case PANEL_EPROM: if ((item instanceof StringItem) && (settings.getPanelEprom() != null)) { itemState = new StringType(settings.getPanelEprom()); } break; case PANEL_SOFTWARE: if ((item instanceof StringItem) && (settings.getPanelSoftware() != null)) { itemState = new StringType(settings.getPanelSoftware()); } break; default: break; } if (itemState != null) { eventPublisher.postUpdate(itemName, itemState); } } } } } }

Target:
private synchronized void updateItemsFromPanelSettings(PowerMaxBindingProvider provider, String name, PowerMaxSelectorType selector) { if (itemUpdateDisabled) { logger.debug("updateItemsFromPanelSettings(): items update disabled"); return; } if (provider == null) { for (PowerMaxBindingProvider prov : providers) { if (prov != null) { updateItemsFromPanelSettings(prov, name, selector); } } } else { PowerMaxPanelSettings settings = PowerMaxPanelSettings.getThePanelSettings(); for (String itemName : provider.getItemNames()) { if ((name == null) || itemName.equals(name)) { String value = null; PowerMaxBindingConfig config = provider.getConfig(itemName); if ((selector == null) || (selector == config.getSelectorType())) { switch (config.getSelectorType()) { case PANEL_TYPE: value = (settings.getPanelType() != null) ? settings.getPanelType().getLabel() : null; break; case PANEL_SERIAL: value = settings.getPanelSerial(); break; case PANEL_EPROM: value = settings.getPanelEprom(); break; case PANEL_SOFTWARE: value = settings.getPanelSoftware(); break; default: break; } } if (value != null) { State itemState = TypeParser.parseState(config.getAcceptedDataTypes(), value); if (itemState != null) { eventPublisher.postUpdate(itemName, itemState); } } } } } }
Source:
@NonNull public PreparedPutContentValues prepare() { Checks.checkNotNull(putResolver, "Please specify put resolver"); return new PreparedPutContentValues( storIOSQLiteDb, putResolver, contentValues ); }

Target:
@NonNull public PreparedPutContentValues prepare() { checkNotNull(putResolver, "Please specify put resolver"); return new PreparedPutContentValues( storIOSQLiteDb, putResolver, contentValues ); }
Source:
public void executeNextAction(Environment environment) throws WordsProgramException { if (createdInThisFrame) { createdInThisFrame = false; } else { if (!lastCell.equals(cell)) { this.movedInTurn = true; } else { this.movedInTurn = false; } if (!actionQueue.isEmpty()) { while (actionQueue.peek().isExpandable()) { Action action = actionQueue.pop(); actionQueue.addAll(0, action.expand(this, environment)); if (actionQueue.isEmpty()) { lastAction = new WaitAction(environment.getCurrentScope()); return; } } Action action = actionQueue.pop(); lastAction = action; lastCell = new Position(cell); action.execute(this, environment); if (!lastCell.equals(cell)) { this.movedInTurn = true; } } else { lastAction = new WaitAction(environment.getCurrentScope()); } } lastCell = new Position(cell); }

Target:
public void executeNextAction(Environment environment) throws WordsProgramException { if (createdInThisFrame) { createdInThisFrame = false; } else { if (!actionQueue.isEmpty()) { while (actionQueue.peek().isExpandable()) { Action action = actionQueue.pop(); actionQueue.addAll(0, action.expand(this, environment)); if (actionQueue.isEmpty()) { lastAction = new WaitAction(environment.getCurrentScope()); return; } } Action action = actionQueue.pop(); lastAction = action; action.execute(this, environment); } else { lastAction = new WaitAction(environment.getCurrentScope()); } } }
Source:
private void connectAndQueryTopology() throws LogReplicationDiscoveryServiceException { for (int retry=0; retry < CLUSTER_MANAGER_CONNECT_RETRIES; retry++) { try { log.info("Connecting to Cluster Manager adapter..."); clusterManagerAdapter.setCorfuReplicationDiscoveryService(this); log.info("Fetch topology from Cluster Manager..."); TopologyConfigurationMsg topologyMessage = clusterManagerAdapter.queryTopologyConfig(); topologyDescriptor = new TopologyDescriptor(topologyMessage); return; } catch (Exception e) { String message = "Caught exception while fetching topology. Log Replication cannot start."; log.error(message, e); Sleep.sleepUninterruptibly(Duration.ofMillis(CONNECT_SLEEP_DURATION)); } } throw new LogReplicationDiscoveryServiceException("Failed to connect and fetch topology. Abort."); }

Target:
private void connectAndQueryTopology() throws LogReplicationDiscoveryServiceException { for (int retry=0; retry < CLUSTER_MANAGER_CONNECT_RETRIES; retry++) { try { log.info("Connecting to Cluster Manager adapter..."); clusterManagerAdapter.register(this); clusterManagerAdapter.start(); log.info("Fetch topology from Cluster Manager..."); TopologyConfigurationMsg topologyMessage = clusterManagerAdapter.queryTopologyConfig(false); topologyDescriptor = new TopologyDescriptor(topologyMessage); return; } catch (Exception e) { String message = "Caught exception while fetching topology. Log Replication cannot start."; log.error(message, e); Sleep.sleepUninterruptibly(Duration.ofMillis(CONNECT_SLEEP_DURATION)); } } throw new LogReplicationDiscoveryServiceException("Failed to connect and fetch topology. Abort."); }
Source:
public synchronized String getFieldString(int size, int decimalPlaces, Number n) { buffer.delete(0, buffer.length()); if (n != null) { double dval = n.doubleValue(); if (Double.isNaN(dval) || Double.isInfinite(dval)) { buffer.append(n.toString()); } else { numFormat.setMaximumFractionDigits(decimalPlaces); numFormat.setMinimumFractionDigits(decimalPlaces); FieldPosition fp = new FieldPosition(NumberFormat.FRACTION_FIELD); numFormat.format(n, buffer, fp); if (fp.getBeginIndex() >= size) { buffer.delete(0, buffer.length()); buffer.append(n.toString()); if (buffer.length() > size) { throw new IllegalArgumentException("Value "+n+" cannot be represented in size " + size); } } } } int diff = size - buffer.length(); if (diff > 0) { buffer.insert(0, emptyString.substring(0, diff)); } else if (diff < 0) { buffer.setLength(size); } return buffer.toString(); }

Target:
public String getFieldString(int size, int decimalPlaces, Number n) { buffer.delete(0, buffer.length()); if (n != null) { double dval = n.doubleValue(); if (Double.isNaN(dval) || Double.isInfinite(dval)) { buffer.append(n.toString()); } else { numFormat.setMaximumFractionDigits(decimalPlaces); numFormat.setMinimumFractionDigits(decimalPlaces); FieldPosition fp = new FieldPosition(NumberFormat.FRACTION_FIELD); numFormat.format(n, buffer, fp); if (fp.getBeginIndex() >= size) { buffer.delete(0, buffer.length()); buffer.append(n.toString()); if (buffer.length() > size) { logger.logp(Level.WARNING, this.getClass().getName(), "getFieldString", "Writing DBF data, value {0} cannot be represented in size {1,number}", new Object[] {n, size}); if ( ! swallowFieldSizeErrors) { throw new IllegalArgumentException("Value "+n+" cannot be represented in size " + size); } } } } } int diff = size - buffer.length(); if (diff > 0) { buffer.insert(0, emptyString.substring(0, diff)); } else if (diff < 0) { buffer.setLength(size); } return buffer.toString(); }
Source:
protected void executeCommand() { final List<LUNs> lunsFromVgInfo = getLunsFromVgInfo(); final List<LUNs> lunsFromDb = lunDao.getAllForVolumeGroup(getStorageDomain().getStorage()); Map<LunHandler, List<LUNs>> lunsToUpdateInDb = getLunsToUpdateInDb(lunsFromVgInfo, lunsFromDb); boolean dbShouldBeUpdated = lunsToUpdateInDb.keySet().stream().anyMatch(LunHandler::requiresDbUpdate); if (dbShouldBeUpdated) { TransactionSupport.executeInNewTransaction(() -> { updateLunsInDb(lunsToUpdateInDb); refreshLunsConnections(lunsFromVgInfo); return null; }); } refreshMetadataDevicesInfo(); setSucceeded(true); }

Target:
protected void executeCommand() { final List<LUNs> lunsFromVgInfo = getLunsFromVgInfo(); final List<LUNs> lunsFromDb = lunDao.getAllForVolumeGroup(getStorageDomain().getStorage()); Map<LunHandler, List<LUNs>> lunsToUpdateInDb = getLunsToUpdateInDb(lunsFromVgInfo, lunsFromDb); boolean dbShouldBeUpdated = lunsToUpdateInDb.keySet().stream().anyMatch(LunHandler::requiresDbUpdate); if (dbShouldBeUpdated) { TransactionSupport.executeInNewTransaction(() -> { updateLunsInDb(lunsToUpdateInDb); refreshLunsConnections(lunsFromVgInfo); return null; }); } refreshMetadataDevicesInfoIfNeeded(); setSucceeded(true); }
Source:
public Filter(ResourceStore dataDirectory) { Resource resource = dataDirectory.get("rules.xml"); rules = RulesDao.getRules(resource.in()); resource.addListener(notify -> rules = RulesDao.getRules(resource.in())); }

Target:
public Filter(ResourceStore dataDirectory) { Resource resource = dataDirectory.get(RulesDao.getRulesPath()); rules = RulesDao.getRules(resource.in()); resource.addListener(notify -> rules = RulesDao.getRules(resource.in())); }
Source:
public void equilateralTrianglesHaveEqualSides() throws TriangleException { Triangle triangle = new Triangle(2, 2, 2); assertEquals(true, triangle.isEquilateral()); }

Target:
public void equilateralTrianglesHaveEqualSides() throws TriangleException { Triangle triangle = new Triangle(2, 2, 2); assertTrue(triangle.isEquilateral()); }
Source:
private void removeFromIndex(String path) throws IOException { final DirCache dirc = db.lockDirCache(); final int first = dirc.findEntry(path); if (first < 0) throw new IOException("could not find entry " + path); final DirCacheBuilder edit = dirc.builder(); if (first > 0) edit.keep(0, first); final int next = dirc.nextEntry(first); if (next < dirc.getEntryCount()) edit.keep(next, dirc.getEntryCount() - next); if (!edit.commit()) throw new IOException("could not commit"); }

Target:
private void removeFromIndex(String path) throws IOException { final DirCache dirc = db.lockDirCache(); final DirCacheEditor edit = dirc.editor(); edit.add(new DirCacheEditor.DeletePath(path)); if (!edit.commit()) throw new IOException("could not commit"); }
Source:
public void setAuthenticationManager(AuthenticationManager authenticationManager) { Assert.notNull(authenticationManager, "authenticationManager cannot be null"); this.authenticationManager = authenticationManager; }

Target:
public void setAuthenticationManager(AuthenticationManager authenticationManager) { this.authenticationManager = authenticationManager; }
Source:
private PatchLink createLink(int index, PatchScreen.Type patchType, String before, String after) { Patch patch = patchList.get(index); String fileName = patch.getFileName(); int s = fileName.indexOf(File.pathSeparator); if (s >= 0) { fileName = fileName.substring(s + 1); } Key thisKey = patch.getKey(); PatchLink result = null; String linkText = before + " " + fileName + " " + after; if (patchType == PatchScreen.Type.SIDE_BY_SIDE && patch.getPatchType() == Patch.PatchType.UNIFIED) { result = new PatchLink.SideBySide(linkText, thisKey, index, this); } else { result = new PatchLink.Unified(linkText, thisKey, index, this); } return result; }

Target:
private PatchLink createLink(int index, PatchScreen.Type patchType, String before, String after) { Patch patch = patchList.get(index); String fileName = patch.getFileName(); int s = fileName.lastIndexOf('/'); if (s >= 0) { fileName = fileName.substring(s + 1); } Key thisKey = patch.getKey(); String linkText = before + " " + fileName + " " + after; if (patchType == PatchScreen.Type.SIDE_BY_SIDE && patch.getPatchType() == Patch.PatchType.UNIFIED) { return new PatchLink.SideBySide(linkText, thisKey, index, this); } else { return new PatchLink.Unified(linkText, thisKey, index, this); } }
Source:
public void addLinks(List<String> sourceIds, String targetId) throws DirectoryException { if (sourceIds == null || sourceIds.isEmpty()) { return; } try (MongoDBSession session = getMongoDBSession()) { MongoCollection<Document> coll = session.getCollection(collection); List<Document> newDocs = sourceIds.stream() .map(sourceId -> buildDoc(sourceId, targetId)) .filter(doc -> coll.count(doc) == 0) .collect(Collectors.toList()); if(!newDocs.isEmpty()) { coll.insertMany(newDocs); } } catch (MongoWriteException e) { throw new DirectoryException(e); } }

Target:
public void addLinks(List<String> sourceIds, String targetId) throws DirectoryException { if (sourceIds == null || sourceIds.isEmpty()) { return; } try (MongoDBSession session = getMongoDBSession()) { addLinks(sourceIds, targetId, session); } catch (MongoWriteException e) { throw new DirectoryException(e); } }
Source:
public Builder services(ServicesConfig servicesConfig) { checkNotNull(servicesConfig); if (servicesConfig != null) { this.servicesConfig = servicesConfig; } return this; }

Target:
public Builder services(ServicesConfig servicesConfig) { checkNotNull(servicesConfig); this.servicesConfig = servicesConfig; return this; }
Source:
private ResultScanner<Row> streamRows(ReadRowsRequest request) { expandPoolIfNecessary(this.bigtableOptions.getChannelCount()); Timer.Context timeContext = readRowsAsync.getRpcMetrics().timeRpc(); ClientCall<ReadRowsRequest, ReadRowsResponse> readRowsCall = channelPool.newCall(BigtableGrpc.METHOD_READ_ROWS, CallOptions.DEFAULT); ResponseQueueReader responseQueueReader = new ResponseQueueReader( retryOptions.getReadPartialRowTimeoutMillis(), retryOptions.getStreamingBufferSize()); StreamObserver<ReadRowsResponse> rowMerger = new RowMerger(responseQueueReader); ClientCall.Listener<ReadRowsResponse> listener = new StreamObserverAdapter<>(readRowsCall, rowMerger); asyncUtilities.asyncServerStreamingCall(readRowsCall, request, listener, createMetadata(request.getTableName())); CancellationToken cancellationToken = createCancellationToken(readRowsCall, timeContext); return new StreamingBigtableResultScanner(responseQueueReader, cancellationToken); }

Target:
private ResultScanner<Row> streamRows(ReadRowsRequest request) { Timer.Context timerContext = readRowsAsync.getRpcMetrics().timeRpc(); expandPoolIfNecessary(this.bigtableOptions.getChannelCount()); ClientCall<ReadRowsRequest, ReadRowsResponse> readRowsCall = channelPool.newCall(BigtableGrpc.METHOD_READ_ROWS, CallOptions.DEFAULT); return new StreamingBigtableResultScanner( createReader(request, readRowsCall), createCancellationToken(readRowsCall, timerContext)); }
Source:
public SortOrder getSortOrder() { final String so = getAttribute("SO"); if (so == null || so.equals("unknown")) { return SortOrder.unsorted; } try { return SortOrder.valueOf(so); } catch (IllegalArgumentException e) { log.warn("Found non conforming header SO tag: "+ so + ". Treating as 'unknown'."); return SortOrder.unknown; } }

Target:
public SortOrder getSortOrder() { if (sortOrder == null) { final String so = getAttribute(SORT_ORDER_TAG); if (so == null) { sortOrder = SortOrder.unsorted; } else { try { return SortOrder.valueOf(so); } catch (IllegalArgumentException e) { log.warn("Found non conforming header SO tag: " + so + ". Treating as 'unknown'."); sortOrder = SortOrder.unknown; } } } return sortOrder; }
Source:
@Produces public ErrbitConfig createConfig() throws URISyntaxException { ErrbitConfig config = new ErrbitConfig(); config.setEndpoint(new URI(properties.getProperty("errbitEndpoint"))); config.setKey(properties.getProperty("errbitApiKey")); config.setEnvironmentName(properties.getProperty("errbitEnvironment")); config.getApplicationBasePackages().addAll(ImmutableList.of("org.cru.godTools")); return config; }

Target:
@Produces public ErrbitConfig createConfig() throws URISyntaxException { ErrbitConfig config = new ErrbitConfig(); config.setEndpoint(new URI(properties.getProperty("errbitEndpoint"))); config.setKey(properties.getProperty("errbitApiKey")); config.setEnvironmentName(properties.getProperty("errbitEnvironment")); config.getApplicationBasePackages().addAll(ImmutableList.of("org.cru.godtools")); return config; }
Source:
public List<GerritQueryResult> queryMyReviews(IProgressMonitor monitor) throws GerritException { Version version = getCachedVersion(monitor); if (version.compareTo(GERRIT_VERSION_2_6) < 0 && !restQueryAPIEnabled) { try { final Account account = getAccount(monitor); AccountDashboardInfo ad = execute(monitor, new Operation<AccountDashboardInfo>() { @Override public void execute(IProgressMonitor monitor) throws GerritException { getChangeListService().forAccount(account.getId(), this); } }); List<ChangeInfo> allMyChanges = ad.getByOwner(); allMyChanges.addAll(ad.getForReview()); allMyChanges.addAll(ad.getClosed()); return convert(allMyChanges); } catch (GerritException e) { if (isNoSuchServiceError(e)) { restQueryAPIEnabled = true; } else { throw e; } } } return executeQueryRest(monitor, "owner:self OR reviewer:self"); }

Target:
public List<GerritQueryResult> queryMyReviews(IProgressMonitor monitor) throws GerritException { if (hasJsonRpcApi(monitor) && !restQueryAPIEnabled) { try { final Account account = getAccount(monitor); AccountDashboardInfo ad = execute(monitor, new Operation<AccountDashboardInfo>() { @Override public void execute(IProgressMonitor monitor) throws GerritException { getChangeListService().forAccount(account.getId(), this); } }); List<ChangeInfo> allMyChanges = ad.getByOwner(); allMyChanges.addAll(ad.getForReview()); allMyChanges.addAll(ad.getClosed()); return convert(allMyChanges); } catch (GerritException e) { if (isNoSuchServiceError(e)) { restQueryAPIEnabled = true; } else { throw e; } } } return executeQueryRest(monitor, "owner:self OR reviewer:self"); }
Source:
public void testGetWorkspaceMetacardsWithException() throws UnsupportedQueryException, SourceUnavailableException, FederationException, PersistenceException { mockCatalogFrameworkQuery("123", "subject"); when(catalogFramework.query(any())).thenThrow(UnsupportedQueryException.class); List<WorkspaceMetacardImpl> workspaceMetacards = workspaceService.getWorkspaceMetacards(); assertThat(workspaceMetacards, hasSize(0)); }

Target:
public void testGetWorkspaceMetacardsWithException() throws UnsupportedQueryException, SourceUnavailableException, FederationException, PersistenceException { mockCatalogFrameworkQuery(TEST_ID, TEST_SUBJECT); when(catalogFramework.query(any())).thenThrow(UnsupportedQueryException.class); List<WorkspaceMetacardImpl> workspaceMetacards = workspaceServiceImpl.getWorkspaceMetacards(); assertThat(workspaceMetacards, hasSize(0)); }
Source:
protected final Collection<T> sortItems(Collection<T> items) { if (items == null || comparator == null) { return items; } insertionIndex.clear(); SortedSet<T> sortedItems = new TreeSet<T>(comparator) { private int counter = 0; @Override public boolean add(T e) { insertionIndex.put(e, counter++); return super.add(e); } @Override public boolean remove(Object o) { insertionIndex.remove(o); return super.remove(o); } }; sortedItems.addAll(items); return sortedItems; }

Target:
protected final Collection<T> sortItems(Collection<T> items) { if (items == null || comparator == null) { return items; } SortedSet<T> sortedItems = new TreeSet<T>(comparator) { private int nextPosition = positions.size(); @Override public boolean add(T e) { if (!positions.containsKey(e)) { positions.put(e, nextPosition++); } return super.add(e); } @Override public boolean addAll(Collection<? extends T> c) { boolean changed = false; for (T e : c) { changed |= add(e); } return changed; } }; sortedItems.addAll(items); return sortedItems; }
Source:
public void stopPortForwarding() { final MessageConsole console = ConsoleUtils.findMessageConsole(getMessageConsoleName()); MessageConsoleStream stream = console.newMessageStream(); stream.println("Stopping port-forwarding..."); final IPortForwardable cap = PortForwardingUtils.stopPortForwarding(pod); if (cap != null) { Stream.of(cap.getPortPairs()).forEach(port -> stream.println(NLS.bind("{0} {1} -> {2}", new Object[] { port.getName(), port.getLocalPort(), port.getRemotePort() }))); } stream.println("done."); ConsoleUtils.displayConsoleView(console); firePropertyChange(PROPERTY_PORT_FORWARDING, true, getPortForwarding()); updatePortForwardingAllowed(); ConsoleUtils.deregisterConsoleListener(consoleListener); }

Target:
public void stopPortForwarding() throws IOException { if (!PortForwardingUtils.isPortForwardingStarted(pod)) { return; } final MessageConsole console = ConsoleUtils.findMessageConsole(getMessageConsoleName()); try (final MessageConsoleStream stream = console.newMessageStream()) { stream.println("Stopping port-forwarding..."); final IPortForwardable cap = PortForwardingUtils.stopPortForwarding(pod, stream); if (cap != null) { Stream.of(cap.getPortPairs()).forEach(port -> stream.println(NLS.bind("{0} {1} -> {2}", new Object[] { port.getName(), port.getLocalPort(), port.getRemotePort() }))); } if (!PortForwardingUtils.hasPortInUse(this.ports)) { stream.println("done."); } else { stream.println( "Ports remain in use yet. Stopping ports is requested and eventually will be completed."); } ConsoleUtils.displayConsoleView(console); firePropertyChange(PROPERTY_PORT_FORWARDING, true, getPortForwarding()); updatePortForwardingAllowed(); } finally { ConsoleUtils.deregisterConsoleListener(consoleListener); } }
Source:
public TSOFuture<Long> commit(long transactionId, Set<? extends CellId> cells) { TSOProto.Request.Builder builder = TSOProto.Request.newBuilder(); TSOProto.CommitRequest.Builder commitbuilder = TSOProto.CommitRequest.newBuilder(); commitbuilder.setStartTimestamp(transactionId); rowLevelWriteSet.clear(); for (CellId cell : cells) { long id; if (conflictAnalysisLevel == ConflictAnalysisLevel.ROW) { id = cell.getRowId(); if (rowLevelWriteSet.contains(id)) { continue; } else { rowLevelWriteSet.add(id); } } else { id = cell.getCellId(); } commitbuilder.addCellId(id); } builder.setCommitRequest(commitbuilder.build()); RequestEvent request = new RequestEvent(builder.build(), requestMaxRetries); fsm.sendEvent(request); return new ForwardingTSOFuture<>(request); }

Target:
public TSOFuture<Long> commit(long transactionId, Set<? extends CellId> cells) { TSOProto.Request.Builder builder = TSOProto.Request.newBuilder(); TSOProto.CommitRequest.Builder commitbuilder = TSOProto.CommitRequest.newBuilder(); commitbuilder.setStartTimestamp(transactionId); rowLevelWriteSet.clear(); for (CellId cell : cells) { long id; switch (conflictDetectionLevel) { case ROW: id = cell.getRowId(); if (rowLevelWriteSet.contains(id)) { continue; } else { rowLevelWriteSet.add(id); } break; case CELL: id = cell.getCellId(); break; default: id = 0; assert (false); } commitbuilder.addCellId(id); } builder.setCommitRequest(commitbuilder.build()); RequestEvent request = new RequestEvent(builder.build(), requestMaxRetries); fsm.sendEvent(request); return new ForwardingTSOFuture<>(request); }
Source:
private DmrResponse getResponseAndWait(ResourceAddress address, String attribute) { DmrResponse response = dispatcher.execute(readAttributeOperation(address, attribute)); Library.letsSleep(50); return response; }

Target:
private DmrResponse getResponseAndWait(ResourceAddress address, String attribute) { Library.letsSleep(50); DmrResponse response = dispatcher.execute(readAttributeOperation(address, attribute)); return response; }
Source:
public static int computeIndex(Match match, EStructuralFeature feature, Object value, DifferenceSource side) { Comparison comparison = match.getComparison(); int result = -1; EObject matchedObject = MatchUtil.getMatchedObject(match, side); if (matchedObject != null) { IEqualityHelper equalityHelper = comparison.getEqualityHelper(); boolean hasOrigin = match.getOrigin() != null; @SuppressWarnings("unchecked") final List<Object> sideValues = (List<Object>)ReferenceUtil.safeEGet(matchedObject, feature); for (int i = 0, size = sideValues.size(); i < size; i++) { final Object sideObject = sideValues.get(i); if (equalityHelper.matchingValues(sideObject, value)) { break; } else if ((hasOrigin && hasDiff(match, feature, sideObject)) || hasDeleteDiff(match, feature, sideObject)) { } else { result++; } } } return result; }

Target:
public static int computeIndex(Match match, EStructuralFeature feature, Object value, DifferenceSource side) { Comparison comparison = match.getComparison(); int result = -1; EObject matchedObject = MatchUtil.getMatchedObject(match, side); if (matchedObject != null) { IEqualityHelper equalityHelper = comparison.getEqualityHelper(); boolean hasOrigin = match.getOrigin() != null; @SuppressWarnings("unchecked") final List<Object> sideValues = (List<Object>)ReferenceUtil.safeEGet(matchedObject, feature); for (Object sideObject : sideValues) { if (equalityHelper.matchingValues(sideObject, value)) { break; } else if ((hasOrigin && hasDiff(match, feature, sideObject)) || hasDeleteDiff(match, feature, sideObject)) { } else { result++; } } } return result; }
Source:
public boolean isMemberActive() { return this.getStartDate().before(new Date()) && this.getEndDate() == null; }

Target:
public boolean isMemberActive() { return this.getStartDate() != null && this.getStartDate().before(new Date()) && this.getEndDate() == null; }
Source:
protected void onPostExecute(OEmbed embed) { if (embed != null) { if(!isCancelled()) { mMainWebView.loadUrl(mStep.getEmded().getOembed().getURL()); mMainWebView.setTag(mStep.getEmded().getOembed().getURL()); } } }

Target:
protected void onPostExecute(OEmbed embed) { if (embed != null) { if(!isCancelled()) { String url = mStep.getEmded().getOembed().getURL(); mMainWebView.loadUrl(url); mMainWebView.setTag(url); } } }
Source:
static public Object getNewInstance(Class<?>[] cast, String classname, Object... params) { try { return getThrowableNewInstance(cast, classname, params); } catch (Exception e) { if (!classname.endsWith("Gui")) { log.error("getNewInstance failed for {}", cast, classname, e.getClass()); } } return null; }

Target:
static public Object getNewInstance(Class<?>[] cast, String classname, Object... params) { try { return getThrowableNewInstance(cast, classname, params); } catch (Exception e) { log.warn("getNewInstance failed for {}", cast, classname, e.getClass()); } return null; }
Source:
public void startScreencast(JsonRpcPeer peer, Page.StartScreencastRequest request) { mRequest = request; LogUtil.d("Starting screencast"); if (mHandlerThread == null) { mHandlerThread = new HandlerThread("Screencast Thread"); mHandlerThread.start(); } mPeer = peer; mIsRunning = true; mStream = new ByteArrayOutputStream(); mBackgroundHandler = new Handler(mHandlerThread.getLooper()); mMainHandler.postDelayed(mBitmapFetchRunnable, FRAME_DELAY); }

Target:
public void startScreencast(JsonRpcPeer peer, Page.StartScreencastRequest request) { LogUtil.d("Starting screencast"); mRequest = request; mHandlerThread = new HandlerThread("Screencast Thread"); mHandlerThread.start(); mPeer = peer; mIsRunning = true; mStream = new ByteArrayOutputStream(); mBackgroundHandler = new Handler(mHandlerThread.getLooper()); mMainHandler.postDelayed(mBitmapFetchRunnable, FRAME_DELAY); }
Source:
public BlobList getInput(String content) { String[] ar = StringUtils.split(content, ',', true); BlobList list = new BlobList(ar.length); for (String b : ar) { list.add(BlobInputResolver.blobFromKey(b)); } return list; }

Target:
public BlobList getInput(String content) { String[] array = StringUtils.split(content, ',', true); BlobList list = new BlobList(array.length); for (String key : array) { list.add(BlobInputResolver.blobFromKey(key)); } return list; }