auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) { if (convertView == null) { convertView = LayoutInflater.from(getContext()).inflate(R.layout.grid_item_channel, parent, false); final FavouriteItemViewHolder vh = new FavouriteItemViewHolder(convertView); convertView.setTag(vh); } final FavouriteItemViewHolder vh = (FavouriteItemViewHolder) convertView.getTag(); final FavouriteType.DetailsFavourite favouriteDetail = getItem(position); vh.contextMenu.setVisibility(View.GONE); vh.titleView.setText(favouriteDetail.title); vh.detailView.setText(favouriteDetail.type); UIUtils.loadImageWithCharacterAvatar(getContext(), hostManager, favouriteDetail.thumbnail, favouriteDetail.title, vh.artView, artWidth, artHeight); return convertView; }

Target:
public View getView(int position, @Nullable View convertView, @NonNull ViewGroup parent) { if (convertView == null) { convertView = LayoutInflater.from(getContext()).inflate(R.layout.grid_item_channel, parent, false); final FavouriteItemViewHolder vh = new FavouriteItemViewHolder(convertView); convertView.setTag(vh); } final FavouriteItemViewHolder vh = (FavouriteItemViewHolder) convertView.getTag(); final FavouriteType.DetailsFavourite favouriteDetail = getItem(position); vh.contextMenu.setVisibility(View.GONE); vh.titleView.setText(favouriteDetail.title); @StringRes final int typeRes; switch (favouriteDetail.type) { case FavouriteType.FavouriteTypeEnum.MEDIA: typeRes = R.string.media; break; case FavouriteType.FavouriteTypeEnum.SCRIPT: typeRes = R.string.script; break; case FavouriteType.FavouriteTypeEnum.WINDOW: typeRes = R.string.window; break; default: typeRes = R.string.unknown; } vh.detailView.setText(typeRes); UIUtils.loadImageWithCharacterAvatar(getContext(), hostManager, favouriteDetail.thumbnail, favouriteDetail.title, vh.artView, artWidth, artHeight); return convertView; }
Source:
public static boolean containsIgnoreCase(String src, String what) { final int length = what.length(); if (length == 0) { return true; } final char firstLo = Character.toLowerCase(what.charAt(0)); final char firstUp = Character.toUpperCase(what.charAt(0)); for (int i = src.length() - length; i >= 0; i--) { final char ch = src.charAt(i); if (ch != firstLo && ch != firstUp) { continue; } if (src.regionMatches(true, i, what, 0, length)) { return true; } } return false; }

Target:
public static boolean containsIgnoreCase(String src, String what) { if (src == null || what == null) { return false; } final int length = what.length(); if (length == 0) { return true; } final char firstLo = Character.toLowerCase(what.charAt(0)); final char firstUp = Character.toUpperCase(what.charAt(0)); for (int i = src.length() - length; i >= 0; i--) { final char ch = src.charAt(i); if (ch != firstLo && ch != firstUp) { continue; } if (src.regionMatches(true, i, what, 0, length)) { return true; } } return false; }
Source:
private Connection createConnection() throws SQLException { if (StringUtils.isNotBlank(username) && StringUtils.isNotBlank(pass)) { return DriverManager.getConnection(connectionUrl, username, pass); } else { return DriverManager.getConnection(connectionUrl); } }

Target:
private Connection createConnection() throws SQLException { if (StringUtils.isNotBlank(username) && pass != null) { return DriverManager.getConnection(connectionUrl, username, pass); } else { return DriverManager.getConnection(connectionUrl); } }
Source:
private boolean isField(ExpressionTree tree) { TypeSymbol enclosingClass = (TypeSymbol) getSemanticModel().getEnclosingClass(tree); if (tree.is(Kind.IDENTIFIER)) { IdentifierTree identifier = (IdentifierTree) tree; List<Symbol> lookup = ((TypeSymbol) enclosingClass).members().lookup(identifier.name()); Symbol reference = getSemanticModel().getReference(identifier); return lookup.contains(reference); } return false; }

Target:
private boolean isField(ExpressionTree tree) { if (tree.is(Kind.IDENTIFIER)) { Symbol reference = getSemanticModel().getReference((IdentifierTree) tree); return reference != null && reference.owner().isKind(Symbol.TYP); } else if (tree.is(Kind.MEMBER_SELECT)) { MemberSelectExpressionTree mse = (MemberSelectExpressionTree) tree; ExpressionTree mseExpression = mse.expression(); if (isThis(mseExpression)) { return isField(mse.identifier()); } else { return isField(mseExpression); } } return false; }
Source:
protected Promise<List<Node>> getChildrenImpl() { List<Node> fileNodes = new ArrayList<>(); List<SearchOccurrence> occurrences = searchResult.getOccurrences(); occurrences.sort(Comparator.comparingInt((SearchOccurrence searchOccurrence) -> searchOccurrence.getLineNumber())); for (SearchOccurrence occurrence : occurrences) { FoundOccurrenceNode foundItemNode = nodeFactory.newFoundOccurrenceNode(occurrence, searchResult.getPath(), searchResult.getContentUrl()); fileNodes.add(foundItemNode); } return promiseProvider.resolve(fileNodes); }

Target:
protected Promise<List<Node>> getChildrenImpl() { List<Node> fileNodes; List<SearchOccurrence> occurrences = searchResult.getOccurrences(); occurrences.sort(Comparator.comparingInt((SearchOccurrence searchOccurrence) -> searchOccurrence.getLineNumber())); fileNodes = occurrences.stream().map(occurrence -> nodeFactory .newFoundOccurrenceNode(occurrence, searchResult.getPath())).collect(Collectors.toList()); return promiseProvider.resolve(fileNodes); }
Source:
protected double findMaximumTickLabelWidth(List ticks, Graphics2D g2, Rectangle2D drawArea, boolean vertical) { RectangleInsets insets = getTickLabelInsets(); double maxWidth = 0.0; Iterator iterator = ticks.iterator(); while (iterator.hasNext()) { Tick tick = (Tick) iterator.next(); Rectangle2D labelBounds = null; if (tick.getText() != null) { labelBounds = TextUtilities.calculateRotatedStringBounds(tick.getText(), g2, 0, 0, TextAnchor.TOP_LEFT, tickLabelAngle, TextAnchor.TOP_LEFT).getBounds2D(); } if (labelBounds != null && labelBounds.getWidth() + insets.getLeft() + insets.getRight() > maxWidth) { maxWidth = labelBounds.getWidth() + insets.getLeft() + insets.getRight(); } } return maxWidth; }

Target:
protected double findMaximumTickLabelWidth(List ticks, Graphics2D g2, Rectangle2D drawArea, boolean vertical) { return ChartsHelper.getMaximumTickLabelWidth(ticks, g2, getTickLabelInsets(), getTickLabelFont(), tickLabelAngle); }
Source:
private Set<ResolvedBroadcast> aggregateBroadcastsInternal(Collection<ResolvedBroadcast> broadcasts) { Multimap<ChannelRef, ResolvedBroadcast> parentChannelMap = broadcasts.stream() .collect(MoreCollectors.toImmutableListMultiMap( resolvedBroadcast -> MoreObjects.firstNonNull( resolvedBroadcast.getResolvedChannel() .getChannel() .getParent(), new ChannelRef( resolvedBroadcast.getResolvedChannel().getChannel().getId(), resolvedBroadcast.getResolvedChannel().getChannel().getSource() ) ), resolvedBroadcast -> resolvedBroadcast )); Set<ResolvedBroadcast> resolvedBroadcasts = Sets.newHashSet(); for (ChannelRef channelRef : parentChannelMap.keySet()) { resolvedBroadcasts.add( aggregateChannelsFromParent(channelRef, parentChannelMap.get(channelRef)) ); } return resolvedBroadcasts; }

Target:
private Set<ResolvedBroadcast> aggregateBroadcastsInternal(Collection<ResolvedBroadcast> broadcasts) { Multimap<ChannelRef, ResolvedBroadcast> parentChannelMap = broadcasts.stream() .collect(MoreCollectors.toImmutableListMultiMap( resolvedBroadcast -> MoreObjects.firstNonNull( resolvedBroadcast.getResolvedChannel() .getChannel() .getParent(), resolvedBroadcast.getResolvedChannel() .getChannel() .toRef() ), resolvedBroadcast -> resolvedBroadcast )); Set<ResolvedBroadcast> resolvedBroadcasts = Sets.newHashSet(); for (ChannelRef channelRef : parentChannelMap.keySet()) { resolvedBroadcasts.add( aggregateChannelsFromParent(channelRef, parentChannelMap.get(channelRef)) ); } return resolvedBroadcasts; }
Source:
private boolean ensureValidKeyAvailable() { boolean keyAvailableLocally = true; if (this.key == null) { try { if (keyCollection.equals(SECRETS_COLLECTION)) { this.key = getSecretKey().block(); } else { KeyVaultKey keyVaultKey = getKey().block(); this.key = keyVaultKey.getKey(); } keyAvailableLocally = this.key.isValid(); initializeCryptoClients(); } catch (HttpResponseException | NullPointerException e) { logger.warning("Failed to retrieve key from key vault"); logger.logExceptionAsWarning(e); keyAvailableLocally = false; } } return keyAvailableLocally; }

Target:
private boolean ensureValidKeyAvailable() { boolean keyAvailableLocally = true; if (this.key == null && keyCollection != null) { try { if (keyCollection.equals(SECRETS_COLLECTION)) { this.key = getSecretKey().block(); } else { KeyVaultKey keyVaultKey = getKey().block(); this.key = keyVaultKey.getKey(); } keyAvailableLocally = this.key.isValid(); initializeCryptoClients(); } catch (HttpResponseException | NullPointerException e) { logger.warning("Failed to retrieve key from key vault"); logger.logExceptionAsWarning(e); keyAvailableLocally = false; } } return keyAvailableLocally; }
Source:
protected Function<GridCellTuple, Command> newCellHasNoValueCommand() { return (gc) -> new DeleteCellValueCommand(gc, () -> uiModelMapper, gridLayer::batch); }

Target:
protected Function<GridCellTuple, Command> newCellHasNoValueCommand() { return (gridCellTuple) -> new DeleteCellValueCommand(gridCellTuple, () -> uiModelMapper, gridLayer::batch); }
Source:
static String switchToAllVolumes(Path olddelete) { if (olddelete.depth() == 4 && !olddelete.getName().startsWith(Constants.BULK_PREFIX)) { return GcVolumeUtil.getDeleteTabletOnAllVolumesUri( TableId.of(olddelete.getParent().getName()), olddelete.getName()); } else { return olddelete.toString(); } }

Target:
static String switchToAllVolumes(Path olddelete) { Path pathNoVolume = Objects.requireNonNull(VolumeManager.FileType.TABLE.removeVolume(olddelete), "Invalid delete marker. No volume in path: " + olddelete); if (pathNoVolume.depth() == 3 && !pathNoVolume.getName().startsWith(Constants.BULK_PREFIX)) { return GcVolumeUtil.getDeleteTabletOnAllVolumesUri( TableId.of(pathNoVolume.getParent().getName()), pathNoVolume.getName()); } else { return olddelete.toString(); } }
Source:
public <T> T get(Object key, Callable<T> valueLoader) { Object value = map.get(key); if (value == null) { misses.incrementAndGet(); RLock lock = map.getLock(key); lock.lock(); try { value = map.get(key); if (value == null) { try { value = toStoreValue(valueLoader.call()); } catch (Exception ex) { try { Class<?> c = Class.forName("org.springframework.cache.Cache$ValueRetrievalException"); Constructor<?> constructor = c.getConstructor(Object.class, Callable.class, Throwable.class); RuntimeException exception = (RuntimeException) constructor.newInstance(key, valueLoader, ex.getCause()); throw exception; } catch (Exception e) { throw new IllegalStateException(e); } } map.put(key, value); } } finally { lock.unlock(); } }else{ addCacheHit(); } return (T) fromStoreValue(value); }

Target:
public <T> T get(Object key, Callable<T> valueLoader) { Object value = map.get(key); if (value == null) { addCacheMiss(); RLock lock = map.getLock(key); lock.lock(); try { value = map.get(key); if (value == null) { try { value = toStoreValue(valueLoader.call()); } catch (Exception ex) { try { Class<?> c = Class.forName("org.springframework.cache.Cache$ValueRetrievalException"); Constructor<?> constructor = c.getConstructor(Object.class, Callable.class, Throwable.class); RuntimeException exception = (RuntimeException) constructor.newInstance(key, valueLoader, ex.getCause()); throw exception; } catch (Exception e) { throw new IllegalStateException(e); } } map.put(key, value); } } finally { lock.unlock(); } }else{ addCacheHit(); } return (T) fromStoreValue(value); }
Source:
public void correctPrincipalNoPassword() throws Exception { Owner owner = new Owner("user", "user"); setUserAndPassword("user", ""); when(userService.validateUser("user", "")).thenReturn(true); Set<OwnerPermission> permissions = new HashSet<OwnerPermission>(); permissions.add(new OwnerPermission(owner, Access.ALL)); when(userService.findByLogin("user")).thenReturn(new User()); UserPrincipal expected = new UserPrincipal("user", new ArrayList<Permission>(permissions), false); assertEquals(expected, this.auth.getPrincipal(request)); }

Target:
public void correctPrincipalNoPassword() throws Exception { Owner owner = new Owner("user", "user"); setUserNoPassword("user"); when(userService.validateUser("user", null)).thenReturn(true); Set<OwnerPermission> permissions = new HashSet<OwnerPermission>(); permissions.add(new OwnerPermission(owner, Access.ALL)); when(userService.findByLogin("user")).thenReturn(new User()); UserPrincipal expected = new UserPrincipal("user", new ArrayList<Permission>(permissions), false); assertEquals(expected, this.auth.getPrincipal(request)); }
Source:
private void dumpHtmlCodeFromTheCurrentPage(ITestResult result, SeleniumWebDriver webDriver) { String testName = result.getTestClass().getName() + "." + result.getMethod().getMethodName(); String filename = NameGenerator.generate(testName + "_", 8) + ".png"; try { String pageSource = webDriver.getPageSource(); Path dmpDirectory = Paths.get("target/htmldump", filename + ".html"); Files.createDirectories(dmpDirectory.getParent()); Files.write(dmpDirectory, pageSource.getBytes(), StandardOpenOption.CREATE); } catch (WebDriverException | IOException e) { LOG.error(format("Can't capture screenshot for test %s", testName), e); } }

Target:
private void dumpHtmlCodeFromTheCurrentPage(ITestResult result, SeleniumWebDriver webDriver) { String testName = result.getTestClass().getName() + "." + result.getMethod().getMethodName(); String filename = NameGenerator.generate(testName + "_", 8) + ".html"; try { String pageSource = webDriver.getPageSource(); Path dmpDirectory = Paths.get("target/htmldump", filename); Files.createDirectories(dmpDirectory.getParent()); Files.write(dmpDirectory, pageSource.getBytes(), StandardOpenOption.CREATE); } catch (WebDriverException | IOException e) { LOG.error(format("Can't dump of html source for test %s", testName), e); } }
Source:
public <T> T getInterface(@Nullable Class<T> policy) { if (policy == null) { return null; } ProxyPolicy proxyPolicy = proxiesByPolicyClass.get(policy); if (proxyPolicy == null) { if (behaviour instanceof NoOpBehaviour) { ProxyPolicyInvocationHandler proxyHandler = new ProxyPolicyInvocationHandler(null, this.behaviour, this.timer); Object proxy = Proxy .newProxyInstance(this.getClass().getClassLoader(), new Class[]{policy}, proxyHandler); if (proxy == null) { throw new IllegalStateException("proxy is null"); } proxyPolicy = new ProxyPolicy(proxy, proxyHandler); } else { Object originalHandler = this.behaviour.getInterface(policy); ProxyPolicyInvocationHandler proxyHandler = new ProxyPolicyInvocationHandler(originalHandler, this.behaviour, this.timer); Object proxy = Proxy .newProxyInstance(this.getClass().getClassLoader(), new Class[]{policy}, proxyHandler); if (proxy == null) { throw new IllegalStateException("proxy is null"); } proxyPolicy = new ProxyPolicy(proxy, proxyHandler); } proxiesByPolicyClass.put(policy, proxyPolicy); } return (T) proxyPolicy.getProxy(); }

Target:
public <T> T getInterface(@Nullable Class<T> policy) { if (policy == null) { return null; } ProxyPolicy proxyPolicy = proxiesByPolicyClass.get(policy); if (proxyPolicy == null) { if (behaviour instanceof NoOpBehaviour) { ProxyPolicyInvocationHandler proxyHandler = new ProxyPolicyInvocationHandler(null, this.behaviour, this.timer); Object proxy = Proxy .newProxyInstance(this.getClass().getClassLoader(), new Class[]{policy}, proxyHandler); proxyPolicy = new ProxyPolicy(proxy, proxyHandler); } else { Object originalHandler = this.behaviour.getInterface(policy); ProxyPolicyInvocationHandler proxyHandler = new ProxyPolicyInvocationHandler(originalHandler, this.behaviour, this.timer); Object proxy = Proxy .newProxyInstance(this.getClass().getClassLoader(), new Class[]{policy}, proxyHandler); proxyPolicy = new ProxyPolicy(proxy, proxyHandler); } proxiesByPolicyClass.put(policy, proxyPolicy); } return (T) proxyPolicy.getProxy(); }
Source:
public SpongeFlyingData(boolean value) { super(FlyingData.class, value, Keys.IS_FLYING, ImmutableFlyingData.class); }

Target:
public SpongeFlyingData(boolean value) { super(FlyingData.class, value, Keys.IS_FLYING, ImmutableSpongeFlyingData.class); }
Source:
default Set<AABB> getIntersectingCollisionBoxes(Entity owner) { return owner.getBoundingBox(). map(box -> getIntersectingCollisionBoxes(owner, box)). orElse(Collections.emptySet()); }

Target:
default Set<AABB> getIntersectingCollisionBoxes(Entity owner) { checkNotNull(owner, "owner"); return owner.getBoundingBox(). map(box -> getIntersectingCollisionBoxes(owner, box)). orElse(Collections.emptySet()); }
Source:
private static Response putBody(HttpPut httpRequest, String body, ContentType contentType, String username, String password) throws URISyntaxException, HttpException { StringEntity stringEntity = new StringEntity(body, contentType); stringEntity.setChunked(true); httpRequest.setEntity(stringEntity); return send(httpRequest, username, password); }

Target:
private static Response putBody(HttpPut httpRequest, String body, ContentType contentType, String username, String password) throws URISyntaxException, HttpException { if (contentType != null && !StringUtils.isEmpty(body)) { StringEntity stringEntity = new StringEntity(body, contentType); stringEntity.setChunked(true); httpRequest.setEntity(stringEntity); } return send(httpRequest, username, password); }
Source:
public MetaFilterView() { super(); GridLayout gridLayout = new GridLayout(5, 2); this.setLayout(gridLayout); JLabel hivLabel = new JLabel("HIV status:"); hivStatus = new JComboBox<>(new DefaultComboBoxModel(new String[] {"- None -", "Positive", "Negative"})); this.add(hivLabel); this.add(hivStatus); JLabel ageLabel = new JLabel("Age or age range:"); age = new JTextField(); this.add(ageLabel); this.add(age); JLabel genderLabel = new JLabel("Gender:"); gender = new JComboBox<>(new DefaultComboBoxModel(new String[] {"- None -", "Male", "Female"})); this.add(genderLabel); this.add(gender); JLabel locationLabel = new JLabel("Location:"); strainLocation = new JTextField(); this.add(locationLabel); this.add(strainLocation); JLabel isolationDateLabel = new JLabel("Isolation date:"); isolationDate = new JTextField(); this.add(isolationDateLabel); this.add(isolationDate); AutoCompleteDecorator.decorate(gender); }

Target:
public MetaFilterView() { super(); GridLayout gridLayout = new GridLayout(5, 2); this.setLayout(gridLayout); createHivStatusElements(); createAgeElements(); createGenderElements(); createLocationElements(); createIsolationDateElements(); AutoCompleteDecorator.decorate(gender); }
Source:
public void connect( String channelConfig ) throws IOException { if ( !canUse( channelConfig ) ) { throw new MalformedURLException( "Unknown chanel string " + channelConfig ); } try { URI uri = new URI( channelConfig ); channel = SocketChannel.open( new InetSocketAddress( uri.getHost(), uri.getPort() ) ); } catch ( URISyntaxException e ) { throw new IOException( e.getLocalizedMessage(), e ); } }

Target:
public void connect( String channelConfig ) throws IOException { if ( !canUse( channelConfig ) ) { throw new MalformedURLException( "Unknown chanel string " + channelConfig ); } try { URI uri = new URI( channelConfig ); InetSocketAddress hostAddress = new InetSocketAddress( uri.getHost(), uri.getPort() ); clientSocketChannel = open( withFixedThreadPool( 2, newDaemonThreadFactory() ) ); setTrueOptions( SO_REUSEADDR, TCP_NODELAY, SO_KEEPALIVE ); clientSocketChannel.connect( hostAddress ).get(); } catch ( URISyntaxException | InterruptedException e ) { throw new IOException( e.getLocalizedMessage(), e ); } catch ( ExecutionException e ) { throw new IOException( e.getLocalizedMessage(), e.getCause() ); } }
Source:
public void loadTemplate() throws IOException { DefaultTemplateLoader defaultTemplateLoader = new DefaultTemplateLoader(); String template = defaultTemplateLoader.load(new Version(6,4,1) , "/eventsIndexTemplate"); final JsonElement json = new JsonParser().parse(template); if (!json.isJsonObject()) { throw new IllegalArgumentException("Provided template is not a valid json object"); } JsonObject templateJson = json.getAsJsonObject(); assertNotNull(templateJson); assertTrue(!templateJson.toString().isEmpty()); }

Target:
public void loadTemplate() throws IOException { DefaultTemplateLoader defaultTemplateLoader = new DefaultTemplateLoader(); String template = defaultTemplateLoader.load(new Version(6, 4, 1), "/eventsIndexTemplate"); final JsonElement json = new JsonParser().parse(template); if (!json.isJsonObject()) { throw new IllegalArgumentException("Provided template is not a valid json object"); } JsonObject templateJson = json.getAsJsonObject(); assertNotNull(templateJson); assertFalse(templateJson.toString().isEmpty()); }
Source:
private void registerBeanConfigurerAspectIfNecessary(BeanDefinitionRegistry registry) { if (!registry.containsBeanDefinition(BEAN_CONFIGURER_ASPECT_BEAN_NAME)) { if (!ClassUtils.isPresent(BEAN_CONFIGURER_ASPECT_CLASS_NAME, getClass().getClassLoader())) { throw new BeanDefinitionStoreException("Could not configure Spring Data JPA auditing-feature because" + " spring-aspects.jar is not on the classpath!\n" + "If you want to use auditing please add spring-aspects.jar to the classpath."); } RootBeanDefinition def = new RootBeanDefinition(); def.setBeanClassName(BEAN_CONFIGURER_ASPECT_CLASS_NAME); def.setFactoryMethodName("aspectOf"); def.setRole(BeanDefinition.ROLE_INFRASTRUCTURE); registry.registerBeanDefinition(BEAN_CONFIGURER_ASPECT_BEAN_NAME, new BeanComponentDefinition(def, BEAN_CONFIGURER_ASPECT_BEAN_NAME).getBeanDefinition()); } }

Target:
private void registerBeanConfigurerAspectIfNecessary(BeanDefinitionRegistry registry) { if (registry.containsBeanDefinition(BEAN_CONFIGURER_ASPECT_BEAN_NAME)) { return; } if (!ClassUtils.isPresent(BEAN_CONFIGURER_ASPECT_CLASS_NAME, getClass().getClassLoader())) { throw new BeanDefinitionStoreException("Could not configure Spring Data JPA auditing-feature because" + " spring-aspects.jar is not on the classpath!\n" + "If you want to use auditing please add spring-aspects.jar to the classpath."); } RootBeanDefinition def = new RootBeanDefinition(); def.setBeanClassName(BEAN_CONFIGURER_ASPECT_CLASS_NAME); def.setFactoryMethodName("aspectOf"); def.setRole(BeanDefinition.ROLE_INFRASTRUCTURE); registry.registerBeanDefinition(BEAN_CONFIGURER_ASPECT_BEAN_NAME, new BeanComponentDefinition(def, BEAN_CONFIGURER_ASPECT_BEAN_NAME).getBeanDefinition()); }
Source:
private String getObjectJavaExpression(String exp, Class objectType) throws NoSuchFieldException { StringBuilder sb = new StringBuilder(); String[] split = exp.split("\\."); Class<?> currentClassType = objectType; boolean first = true; for (String field : split) { if (first) { first = false; } else { sb.append("."); } if (field.equals(exprObjPlaceholder)) { sb.append("((").append(objectType.getName().replace("$", "\\$")).append(")").append("(") .append(codeObjPlaceholder).append("))"); currentClassType = objectType; } else { KeyValPair<String, ? extends Class<?>> getter = getGetterForVariable(field, currentClassType); sb.append(getter.getKey()); currentClassType = getter.getValue(); } } return sb.toString(); }

Target:
private String getObjectJavaExpression(String exp, Class objectType) { StringBuilder sb = new StringBuilder(); String[] split = exp.split("\\."); Class<?> currentClassType = objectType; boolean first = true; for (String field : split) { if (first) { first = false; } else { sb.append("."); } if (field.equals(exprObjPlaceholder)) { sb.append("((").append(objectType.getName().replace("$", "\\$")).append(")").append("(") .append(codeObjPlaceholder).append("))"); currentClassType = objectType; } else { KeyValPair<String, ? extends Class<?>> getter = getGetterForVariable(field, currentClassType); sb.append(getter.getKey()); currentClassType = getter.getValue(); } } return sb.toString(); }
Source:
private String processNodeName(ServiceTreeNode node) { String name = node.getName().substring(0, node.getName().indexOf("Resource")); String[] parts = name.split(CAMEL_CASE_REGEX); name = ""; for (String part : parts) { name += part.toLowerCase() + "-"; } return name.substring(0, name.length() -1); }

Target:
private String processNodeName(ServiceTreeNode node) { String[] parts = node.getName().replaceAll("Resource$", "").split(CAMEL_CASE_REGEX); String name = ""; for (String part : parts) { name += part.toLowerCase() + "-"; } return name.substring(0, name.length() -1); }
Source:
private boolean hasContextMultipleReferences(Context context) { int counter = 0; Iterator<Context> iterator = context.getHost().getContexts().iterator(); while (counter <= 1) { if (!iterator.hasNext()) break; if (context.getPath().equals(iterator.next().getPath())) { ++counter; } } return counter > 1; }

Target:
private boolean hasContextMultipleReferences(Context context) { int counter = 0; Iterator<Context> iterator = context.getHost().getContexts().iterator(); while (counter <= 1 && iterator.hasNext()) { if (context.getPath().equals(iterator.next().getPath())) { ++counter; } } return counter > 1; }
Source:
public static String buildTravelUrl(String url, String lang) { String title = url.substring(url.indexOf(':') + 1); return "<LINK_1>" + title + "&lang=" + lang; }

Target:
public static String buildTravelUrl(String url, String lang) { String title = url.replace(" ", "_"); try { title = URLEncoder.encode(title, "UTF-8"); } catch (UnsupportedEncodingException e) { System.err.println(e.getMessage()); } return "<LINK_0>" + title + "&lang=" + lang; }
Source:
public SetVdsStatusVDSCommandParameters(Guid vdsId, VDSStatus status) { super(vdsId); _status = status; nonOperationalReason = NonOperationalReason.NONE; logStopSpmFailure = false; }

Target:
public SetVdsStatusVDSCommandParameters(Guid vdsId, VDSStatus status) { super(vdsId); _status = status; nonOperationalReason = NonOperationalReason.NONE; stopSpmFailureLogged = false; }
Source:
public IAuthorData getEndorserData() { if (!endorsed) { return null; } else { return new IAuthorData() { @Override public String getAuthor() { return endorsedBy; } @Override public String getAuthorLabel() { return endorsedByLabel; } @Override public Date getCreatedAt() { return endorsedAt; } @Override public boolean isAuthorAnonymous() { return DiscussionComment.this.isAuthorAnonymous(); } }; } }

Target:
public IAuthorData getEndorserData() { if (!endorsed) { return null; } else { return new IAuthorData() { @Override public String getAuthor() { return endorsedBy; } @Override public String getAuthorLabel() { return endorsedByLabel; } @Override public Date getCreatedAt() { return endorsedAt; } @Override public boolean isAuthorAnonymous() { return false; } }; } }
Source:
public Models get() { load(); int tries = 0; while (true) { try { return ft.get(); } catch (ExecutionException | InterruptedException e) { tries++; if (tries == 5) { throw new RuntimeException(e); } } } }

Target:
public Models get() { load(); try { return mFutureTask.get(); } catch (ExecutionException | InterruptedException e) { throw new RuntimeException(e); } }
Source:
private Object findByKey(String key) { Object value = Config.get(request, key); if (value != null) { return value; } value = Config.get(request.getSession(false), key); if (value != null) { return value; } value = Config.get(request.getServletContext(), key); if (value != null) { return value; } return request.getServletContext().getInitParameter(key); }

Target:
private Object findByKey(String key) { Object value = Config.get(request, key); if (value != null) { return value; } value = Config.get(request.getSession(createNewSession()), key); if (value != null) { return value; } value = Config.get(request.getServletContext(), key); if (value != null) { return value; } return request.getServletContext().getInitParameter(key); }
Source:
public String getName() { return name == null ? simpleAddress.toString() : name.toString(); }

Target:
public String getName() { return name != null ? name : getAddress(); }
Source:
protected int index(int key) { return (entries.length - 1) & (key ^ (key >>> 16)); }

Target:
protected int index(int key) { return (entries.length - 1) & ((key ^ (key >>> 16)) * MAGIC_HASH_MIXER); }
Source:
private RepositoryCommit getCommit(Repository repository, ObjectId objectId) { RevWalk walk = new RevWalk(repository); try { RevCommit commit = walk.parseCommit(objectId); for (RevCommit parent : commit.getParents()) walk.parseBody(parent); return new RepositoryCommit(repository, commit); } catch (IOException e) { return null; } finally { walk.release(); } }

Target:
private RepositoryCommit getCommit(Repository repository, ObjectId objectId) { RevWalk walk = new RevWalk(repository); try { RevCommit commit = walk.parseCommit(objectId); for (RevCommit parent : commit.getParents()) walk.parseBody(parent); return new RepositoryCommit(repository, commit); } catch (IOException e) { Activator.showError(NLS.bind( UIText.GitProjectPropertyPage_UnableToGetCommit, objectId.name()), e); } finally { walk.release(); } return null; }
Source:
public String readMergeCommitMsg() throws IOException { File mergeMsgFile = new File(gitDir, Constants.MERGE_MSG); if (mergeMsgFile.exists()) { int length = (int) mergeMsgFile.length(); char[] messageBuffer = new char[length]; try { FileReader r = new FileReader(mergeMsgFile); r.read(messageBuffer, 0, length); r.close(); return new String(messageBuffer); } catch (FileNotFoundException e) { } } return null; }

Target:
public String readMergeCommitMsg() throws IOException { File mergeMsgFile = new File(gitDir, Constants.MERGE_MSG); try { return new String(IO.readFully(mergeMsgFile)); } catch (FileNotFoundException e) { return null; } }
Source:
public void onOpen(WebSocket webSocket, Response response) { try { if (in instanceof PipedInputStream && input != null) { input.connect((PipedInputStream) in); } if (out instanceof PipedOutputStream && output != null) { output.connect((PipedOutputStream) out); } if (err instanceof PipedOutputStream && error != null) { error.connect((PipedOutputStream) err); } if (errChannel instanceof PipedOutputStream && errorChannel != null) { errorChannel.connect((PipedOutputStream) errChannel); } webSocketRef.set(webSocket); if (!executorService.isShutdown()) { executorService.submit(pumper); started.set(true); queue.add(true); } } catch (IOException e) { queue.add(new KubernetesClientException(OperationSupport.createStatus(response))); } catch (RejectedExecutionException rejectedTaskException) { throw new KubernetesClientException("Unable to write to OutputStream since close() has been called.", rejectedTaskException.getCause()); } finally { if (listener != null) { listener.onOpen(response); } } }

Target:
public void onOpen(WebSocket webSocket, Response response) { try { if (in instanceof PipedInputStream && input != null) { input.connect((PipedInputStream) in); } if (out instanceof PipedOutputStream && output != null) { output.connect((PipedOutputStream) out); } if (err instanceof PipedOutputStream && error != null) { error.connect((PipedOutputStream) err); } if (errChannel instanceof PipedOutputStream && errorChannel != null) { errorChannel.connect((PipedOutputStream) errChannel); } webSocketRef.set(webSocket); if (!executorService.isShutdown()) { executorService.submit(pumper); started.set(true); queue.add(true); } } catch (IOException e) { queue.add(new KubernetesClientException(OperationSupport.createStatus(response))); } finally { if (listener != null) { listener.onOpen(response); } } }
Source:
public static SrlBankProblem mongoGetBankProblem(final Authenticator authenticator, final DB dbs, final String problemBankId, final String userId) throws AuthenticationException, DatabaseAccessException { final DBRef myDbRef = new DBRef(dbs, PROBLEM_BANK_COLLECTION, createId(problemBankId)); final DBObject mongoBankProblem = myDbRef.fetch(); if (mongoBankProblem == null) { throw new DatabaseAccessException("bank problem can not be found with id " + problemBankId); } final Authentication.AuthType authType = Authentication.AuthType.newBuilder() .setCheckAccess(true) .setCheckingAdmin(true) .build(); final AuthenticationResponder responder = authenticator .checkAuthentication(School.ItemType.BANK_PROBLEM, problemBankId, userId, 0, authType); if (!responder.hasStudentPermission() && responder.isRegistrationRequired()) { throw new AuthenticationException(AuthenticationException.INVALID_PERMISSION); } return extractBankProblem(mongoBankProblem, problemBankId, responder.hasTeacherPermission()); }

Target:
public static SrlBankProblem mongoGetBankProblem(final Authenticator authenticator, final DB dbs, final String problemBankId, final String userId) throws AuthenticationException, DatabaseAccessException { final DBRef myDbRef = new DBRef(dbs, PROBLEM_BANK_COLLECTION, convertStringToObjectId(problemBankId)); final DBObject mongoBankProblem = myDbRef.fetch(); if (mongoBankProblem == null) { throw new DatabaseAccessException("bank problem can not be found with id: " + problemBankId); } final Authentication.AuthType authType = Authentication.AuthType.newBuilder() .setCheckAccess(true) .setCheckingAdmin(true) .build(); final AuthenticationResponder responder = authenticator .checkAuthentication(School.ItemType.BANK_PROBLEM, problemBankId, userId, 0, authType); if (!responder.hasStudentPermission() && responder.isRegistrationRequired()) { throw new AuthenticationException(AuthenticationException.INVALID_PERMISSION); } return extractBankProblem(mongoBankProblem, problemBankId, responder.hasTeacherPermission()); }
Source:
public KijiFuture<Object> flush() throws IOException { try { final Deferred<Object> deferred = mHBClient.flush(); return AsyncHBaseKijiFuture.create(deferred); } catch (Exception e) { ZooKeeperUtils.wrapAndRethrow(e); final Deferred<Object> error = Deferred.fromError(e); return AsyncHBaseKijiFuture.create(error); } }

Target:
public KijiFuture<Object> flush() throws IOException { final Deferred<Object> deferred = mHBClient.flush(); return AsyncHBaseKijiFuture.create(deferred); }
Source:
public String toString() { return "TmfEventMatches [ Number of matches found: " + fMatches.size() + " ]"; }

Target:
public String toString() { return getClass().getSimpleName() + " [ Number of matches found: " + fMatches.size() + " ]"; }
Source:
public static void setUpClass() { FileUtil.delete("target/data"); EsIndexColumns cols = new EsIndexColumns(def1, def2, def3, def4, def5); esNode = NodeBuilder.nodeBuilder().local(false) .settings(Settings.settingsBuilder().put("path.home", "target/data")) .node(); client = new EsClient("localhost", 9200); index = new EsIndex(client, cols, context, "test", "workspace"); initialIndex(); try { Thread.currentThread().sleep(1000); } catch (Exception e) { } }

Target:
public static void setUpClass() throws Exception { FileUtil.delete("target/data"); EsIndexColumns cols = new EsIndexColumns(def1, def2, def3, def4, def5); esNode = NodeBuilder.nodeBuilder().local(false) .settings(Settings.settingsBuilder().put("path.home", "target/data")) .node(); client = new EsClient("localhost", 9200); index = new EsIndex(client, cols, context, "test", "workspace"); initialIndex(); Thread.currentThread().sleep(1000); }
Source:
public void testModifyX() throws Exception { ApplyResult result = init("X"); assertTrue(result.getFormatErrors().isEmpty()); assertTrue(result.getApplyErrors().isEmpty()); checkFile(new File(db.getWorkTree(), "X"), b.getString(0, b.size(), false)); }

Target:
public void testModifyX() throws Exception { ApplyResult result = init("X"); assertEquals(1, result.getUpdatedFiles().size()); assertEquals(new File(db.getWorkTree(), "X"), result.getUpdatedFiles() .get(0)); checkFile(new File(db.getWorkTree(), "X"), b.getString(0, b.size(), false)); }
Source:
public static BinaryExpression cmpX(Expression lhv, Expression rhv, boolean reversed) { return (reversed) ? cmpXReversed(lhv, rhv) : cmpX(lhv, rhv); }

Target:
public static BinaryExpression cmpX(Expression lhv, Expression rhv, boolean reversed) { return (reversed) ? cmpX(rhv, lhv) : cmpX(lhv, rhv); }
Source:
private void tallyState(TaskArtifact task) throws OseeCoreException { List<IAtsUser> assignees = task.getStateMgr().getAssignees(); if (assignees.isEmpty()) { assignees = ImplementersColumn.instance.getImplementers(task); } for (IAtsUser user : assignees) { int percentComplete = PercentCompleteTotalUtil.getPercentCompleteTotal(task); if (percentComplete == 100) { task.getCompletedDate(); if (task.getStateMgr().getStateType().isCompletedOrCancelledState()) { metrics.put(user, 100); } else { metrics.put(user, 5); } } else { metrics.put(user, percentComplete); } } }

Target:
private void tallyState(TaskArtifact task) throws OseeCoreException { List<IAtsUser> assignees = task.getStateMgr().getAssignees(); if (assignees.isEmpty()) { assignees = ImplementersColumn.instance.getImplementers(task); } for (IAtsUser user : assignees) { int percentComplete = PercentCompleteTotalUtil.getPercentCompleteTotal(task); if (percentComplete == COMPLETED_CANCELLED_PERCENT) { if (task.getStateMgr().getStateType().isCompletedOrCancelledState()) { metrics.put(user, COMPLETED_CANCELLED_PERCENT); } else { metrics.put(user, IN_WORK_PERCENT); } } else { metrics.put(user, percentComplete); } } }
Source:
private boolean isExceptionToBeRetried( final Class<? extends Throwable> thrown, final Class<? extends Throwable>[] types ) { boolean result = false; for (Class<? extends Throwable> exceptionType : types) { if (exceptionType.isAssignableFrom(thrown)) { result = true; } } return result; }

Target:
private boolean isExceptionToBeRetried( final Class<? extends Throwable> thrown, final Class<? extends Throwable>[] types ) { boolean result = false; for (Class<? extends Throwable> type : types) { if (type.isAssignableFrom(thrown)) { result = true; break; } } return result; }
Source:
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); mMapFragment = new GoogleMapFragment(this); mMapFragment.setRetainInstance(true); mLocationTracker = new LocationTracker(getApplicationContext()); mATMListFragment = new ATMListFragment(); Button mapButton = (Button)findViewById(R.id.show_on_map); Button showAllOnMapButton = (Button)findViewById(R.id.show_all_on_map); if (savedInstanceState == null) { FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction(); fragmentTransaction.add(R.id.fragment_container, mATMListFragment); fragmentTransaction.commit(); } setUpActionBar(); setUpDrawer(); mapButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { mIsShowAll = true; mDrawerLayout.closeDrawers(); FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction(); fragmentTransaction.replace(R.id.fragment_container, mMapFragment); fragmentTransaction.addToBackStack(null); fragmentTransaction.commit(); } }); showAllOnMapButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { mDrawerLayout.closeDrawers(); FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction(); fragmentTransaction.replace(R.id.fragment_container, mMapFragment); fragmentTransaction.addToBackStack(null); fragmentTransaction.commit(); } }); }

Target:
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); mMapFragment = new GoogleMapFragment(this); mMapFragment.setRetainInstance(true); mLocationTracker = new LocationTracker(getApplicationContext()); mATMListFragment = new ATMListFragment(); Button mapButton = (Button)findViewById(R.id.show_on_map); if (savedInstanceState == null) { FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction(); fragmentTransaction.add(R.id.fragment_container, mATMListFragment); fragmentTransaction.commit(); } setUpActionBar(); setUpDrawer(); mapButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { mDrawerLayout.closeDrawers(); FragmentTransaction fragmentTransaction = getFragmentManager().beginTransaction(); fragmentTransaction.replace(R.id.fragment_container, mMapFragment); fragmentTransaction.addToBackStack(null); fragmentTransaction.commit(); } }); }
Source:
public boolean isNetworkDisabledFromOptimizations() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { final UsageStatsManagerWrapper usageStatsManagerWrapper = UsageStatsManagerWrapper.getInstance(); if (usageStatsManagerWrapper.isAppInactive(mConnectionContext)) { Logger.w(TAG, "Company Portal is Inactive. Network is disabled.", "", ADALError.NO_NETWORK_CONNECTION_POWER_OPTIMIZATION); return true; } final PowerManagerWrapper powerManagerWrapper = PowerManagerWrapper.getInstance(); if (powerManagerWrapper.isDeviceIdleMode(mConnectionContext) && !powerManagerWrapper.isIgnoringBatteryOptimizations(mConnectionContext)) { Logger.w(TAG, "Device is Dozing. Network is disabled.", "", ADALError.NO_NETWORK_CONNECTION_POWER_OPTIMIZATION); return true; } } return false; }

Target:
public boolean isNetworkDisabledFromOptimizations() { if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) { final UsageStatsManagerWrapper usageStatsManagerWrapper = UsageStatsManagerWrapper.getInstance(); if (usageStatsManagerWrapper.isAppInactive(mConnectionContext)) { Logger.w(TAG, "Client app is inactive. Network is disabled.", "", ADALError.NO_NETWORK_CONNECTION_POWER_OPTIMIZATION); return true; } final PowerManagerWrapper powerManagerWrapper = PowerManagerWrapper.getInstance(); if (powerManagerWrapper.isDeviceIdleMode(mConnectionContext) && !powerManagerWrapper.isIgnoringBatteryOptimizations(mConnectionContext)) { Logger.w(TAG, "Device is dozing. Network is disabled.", "", ADALError.NO_NETWORK_CONNECTION_POWER_OPTIMIZATION); return true; } } return false; }
Source:
public HBMessage send(HBMessage m) throws PacemakerConnectionException, InterruptedException { LOG.debug("Sending pacemaker message to {}: {}", host, m); int next = availableMessageSlots.take(); synchronized (m) { m.set_message_id(next); messages[next] = m; LOG.debug("Put message in slot: for {}", Integer.toString(next), host); int retry = maxRetries; while (true) { try { waitUntilReady(); Channel channel = channelRef.get(); if (channel != null) { channel.writeAndFlush(m, channel.voidPromise()); m.wait(1000); } if (messages[next] != m && messages[next] != null) { HBMessage ret = messages[next]; messages[next] = null; LOG.debug("Got Response: {}", ret); return ret; } } catch (PacemakerConnectionException e) { if (retry <= 0) { throw e; } LOG.error("Error attempting to write to a channel to host " + host + " - " + e.getMessage()); } if (retry <= 0) { throw new PacemakerConnectionException("couldn't get response after " + maxRetries + " attempts."); } retry--; LOG.warn("Not getting response or getting null response. Making more attempts for {}.", retry, host); } } }

Target:
public HBMessage send(HBMessage m) throws PacemakerConnectionException, InterruptedException { LOG.debug("Sending pacemaker message to {}: {}", host, m); int next = availableMessageSlots.take(); synchronized (m) { m.set_message_id(next); messages[next] = m; LOG.debug("Put message in slot: for {}", Integer.toString(next), host); int retry = maxRetries; while (true) { try { waitUntilReady(); Channel channel = channelRef.get(); if (channel != null) { channel.writeAndFlush(m, channel.voidPromise()); m.wait(1000); } if (messages[next] != m && messages[next] != null) { HBMessage ret = messages[next]; messages[next] = null; LOG.debug("Got Response: {}", ret); return ret; } } catch (PacemakerConnectionException e) { if (retry <= 0) { throw e; } LOG.error("Error attempting to write to a channel to host - {}", host, e.getMessage()); } if (retry <= 0) { throw new PacemakerConnectionException("couldn't get response after " + maxRetries + " attempts."); } retry--; LOG.warn("Not getting response or getting null response. Making more attempts for {}.", retry, host); } } }
Source:
public WeldBootstrap getBootstrap() { return bootstrap; }

Target:
WeldBootstrap getBootstrap() { return bootstrap; }
Source:
public DaemonOperationResult execute() throws OperationException { logger.log(Level.INFO, "Starting daemon operation with action " + options.getAction() + " ..."); switch (options.getAction()) { case LIST: return executeList(); case ADD: try { return executeAdd(); } catch (ConfigException | IOException e) { throw new OperationException(e); } case REMOVE: try { return executeRemove(); } catch (ConfigException e) { throw new OperationException(e); } case RUN: try { return executeRun(); } catch (ServiceAlreadyStartedException | IOException | ConfigException e) { throw new OperationException(e); } default: throw new IllegalArgumentException("Unknown action: " + options.getAction()); } }

Target:
public DaemonOperationResult execute() throws OperationException { logger.log(Level.INFO, "Starting daemon operation with action " + options.getAction() + " ..."); switch (options.getAction()) { case LIST: return executeList(); case ADD: return executeAdd(); case REMOVE: return executeRemove(); case RUN: return executeRun(); default: throw new IllegalArgumentException("Unknown action: " + options.getAction()); } }
Source:
private static Set<String> getHostEmulatedMachines(VDS vds) { return new HashSet<>(Arrays.asList(vds.getSupportedEmulatedMachines().split(","))); }

Target:
private static Set<String> getHostEmulatedMachines(VDS vds) { if (vds.getSupportedEmulatedMachines() == null) { return new HashSet<>(); } else { return new HashSet<>(Arrays.asList(vds.getSupportedEmulatedMachines().split(","))); } }
Source:
public void initialize() { Command command = new RecordingCommand(this.editingDomain) { @Override protected void doExecute() { doInitialize(); } }; CommandStack commandStack = this.editingDomain.getCommandStack(); commandStack.execute(command); }

Target:
public void initialize() { Command command = new RecordingCommand(this.editingDomain) { @Override protected void doExecute() { EEFViewImpl.this.doInitialize(); } }; CommandStack commandStack = this.editingDomain.getCommandStack(); commandStack.execute(command); }
Source:
public ArrayList<String[]> getConfigList() { try { try { Class.forName(jdbcDriver); } catch (ClassNotFoundException e) { e.printStackTrace(); } Connection connection = DriverManager.getConnection(mysqlURL, username, password); String sql = "SELECT teamName, description, datasetName, evaluator, id FROM configurations;"; PreparedStatement insertStmt = connection.prepareStatement(sql); ResultSet configList = insertStmt.executeQuery(); ArrayList<String[]> configs = new ArrayList<>(); while (configList.next()) { String config[] = {configList.getString(1), configList.getString(2), configList.getString(3), "We're displaying task variants?", configList.getString(4), Integer.toString(configList.getInt(5))}; configs.add(config); } connection.close(); return configs; } catch (SQLException e) { e.printStackTrace(); return null; } }

Target:
public List<models.Configuration> getConfigList() { try { try { Class.forName(jdbcDriver); } catch (ClassNotFoundException e) { e.printStackTrace(); } Connection connection = DriverManager.getConnection(mysqlURL, username, password); String sql = "SELECT teamName, description, datasetName, evaluator, id FROM configurations;"; PreparedStatement insertStmt = connection.prepareStatement(sql); ResultSet configList = insertStmt.executeQuery(); List<models.Configuration> configs = new ArrayList<>(); while (configList.next()) { models.Configuration config = new models.Configuration(configList.getString(1), configList.getString(2), configList.getString(3), "We're displaying task variants?", configList.getString(4), Integer.toString(configList.getInt(5))); configs.add(config); } connection.close(); return configs; } catch (SQLException e) { e.printStackTrace(); return null; } }
Source:
@Nullable public List<Reference> getReferencesGroup() { return referencesGroup == null ? Collections.emptyList() : Arrays.asList(referencesGroup); }

Target:
@NonNull public List<Reference> getReferencesGroup() { return referencesGroup == null ? Collections.emptyList() : Arrays.asList(referencesGroup); }