auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
public void requireTestSkip(ThrowingRunnable run, String msgPart) { try { run.run(); } catch (Throwable throwable) { if (throwable instanceof SkipException) { if (throwable.getMessage().contains(msgPart)) { return; } else { throw new RuntimeException( String.format("Expected TCK to skip this test with '... %s ...', yet it skipped with (%s) instead!", msgPart, throwable.getMessage()), throwable); } } else { throw new RuntimeException( String.format("Expected TCK to skip this test, yet it threw %s(%s) instead!", throwable.getClass().getName(), throwable.getMessage()), throwable); } } throw new RuntimeException(String.format("Expected TCK to SKIP this test, instead if PASSed!")); }

Target:
public void requireTestSkip(ThrowingRunnable run, String msgPart) { try { run.run(); } catch (SkipException skip) { if (skip.getMessage().contains(msgPart)) { return; } else { throw new RuntimeException( String.format("Expected TCK to skip this test with '... %s ...', yet it skipped with (%s) instead!", msgPart, skip.getMessage()), skip); } } catch (Throwable throwable) { throw new RuntimeException( String.format("Expected TCK to skip this test, yet it threw %s(%s) instead!", throwable.getClass().getName(), throwable.getMessage()), throwable); } throw new RuntimeException("Expected TCK to SKIP this test, instead if PASSed!"); }
Source:
private String generateColumnReference(Path path) { Path.PathElement last = path.lastElement().get(); Class<?> lastClass = last.getType(); String fieldName = last.getFieldName(); JoinTo joinTo = dictionary.getAttributeOrRelationAnnotation(lastClass, JoinTo.class, fieldName); if (joinTo == null) { return getClassAlias(lastClass) + "." + dictionary.getColumnName(lastClass, last.getFieldName()); } else { return generateColumnReference(new Path(lastClass, dictionary, joinTo.path())); } }

Target:
private String generateColumnReference(Path path) { Path.PathElement last = path.lastElement().get(); Class<?> lastClass = last.getType(); String fieldName = last.getFieldName(); JoinTo joinTo = dictionary.getAttributeOrRelationAnnotation(lastClass, JoinTo.class, fieldName); if (joinTo == null) { return getClassAlias(lastClass) + "." + dictionary.getAnnotatedColumnName(lastClass, last.getFieldName()); } else { return generateColumnReference(new Path(lastClass, dictionary, joinTo.path())); } }
Source:
List<String> restoreNegativeNumberOptions(List<String> nonOptionArgs) { if (!negativeNumberParams.isEmpty()) { List<String> nonOptionArgsClone = new ArrayList<>(nonOptionArgs); negativeNumberParams.forEach((k, v) -> { int idx = k; nonOptionArgsClone.remove(idx); nonOptionArgsClone.add(idx, v); }); return Collections.unmodifiableList(nonOptionArgsClone); } else { return nonOptionArgs; } }

Target:
List<String> restoreNegativeNumberOptions(List<String> nonOptionArgs) { if (!negativeNumberParams.isEmpty()) { List<String> nonOptionArgsClone = new ArrayList<>(nonOptionArgs); negativeNumberParams.forEach((k, v) -> { int idx = k; nonOptionArgsClone.set(idx, v); }); return Collections.unmodifiableList(nonOptionArgsClone); } else { return nonOptionArgs; } }
Source:
protected IValidator createDefaultValueAlreadyDefinedValidator() { return new IValidator() { @Override public IStatus validate(final Object value) { if (value instanceof Document) { final Document document = (Document) value; if (document.getDocumentType().equals(DocumentType.NONE)) { return Status.OK_STATUS; } else { return ValidationStatus.warning(Messages.bind(Messages.defaultValueAlreadyDefinedWarning, document.getName())); } } return Status.OK_STATUS; } }; }

Target:
protected IValidator createDefaultValueAlreadyDefinedValidator() { return new IValidator() { @Override public IStatus validate(final Object value) { if (value instanceof Document && contract.eContainer() instanceof Pool) { final Document document = (Document) value; return DocumentType.NONE.equals(document.getDocumentType()) ? Status.OK_STATUS : ValidationStatus.warning(Messages.bind(Messages.defaultValueAlreadyDefinedWarning, document.getName())); } return Status.OK_STATUS; } }; }
Source:
public void fetchesProperties() throws Exception { final Fork fork = Mockito.mock(Fork.class); Mockito.doReturn( Json.createObjectBuilder() .add("organization", "OrganizationName") .add("name", "ForkName") .build() ).when(fork).json(); final Fork.Smart smart = new Fork.Smart(fork); MatcherAssert.assertThat( smart.name(), Matchers.notNullValue() ); }

Target:
public void fetchesProperties() throws Exception { final Fork fork = Mockito.mock(Fork.class); Mockito.doReturn( Json.createObjectBuilder() .add("organization", "OrganizationName") .build() ).when(fork).json(); final Fork.Smart smart = new Fork.Smart(fork); MatcherAssert.assertThat( smart.organization(), Matchers.equalTo("OrganizationName") ); }
Source:
protected static <R> R runAndCleanupTransactionContext(Supplier<R> supplier) { try { return supplier.get(); } finally { if (!TransactionHelper.isNoTransaction()) { try { TransactionHelper.commitOrRollbackTransaction(); } catch (TransactionRuntimeException e) { log.error("Failed to commit/rollback", e); } } } }

Target:
protected static <R> R runAndCleanupTransactionContext(Supplier<R> supplier) { try { return supplier.get(); } finally { if (!isNoTransaction()) { try { commitOrRollbackTransaction(); } catch (TransactionRuntimeException e) { log.error("Failed to commit/rollback", e); } } } }
Source:
public NamespaceNameTree namespaceName(List<Tuple<InternalSyntaxToken, InternalSyntaxToken>> tuples) { NameIdentifierTree lastPart = new NameIdentifierTreeImpl(tuples.get(0).second()); return namespaceName(lastPart, tuples.get(0).first(), tuples.subList(1, tuples.size())); }

Target:
public NamespaceNameTree namespaceName(List<Tuple<InternalSyntaxToken, InternalSyntaxToken>> tuples) { NameIdentifierTree lastPartIfOneTuple = new NameIdentifierTreeImpl(tuples.get(0).second()); return namespaceName(lastPartIfOneTuple, tuples.get(0).first(), tuples.subList(1, tuples.size())); }
Source:
public void getSegmentFiles(final DataSegment segment, final File outDir) throws SegmentLoadingException { Map<String, Object> loadSpec = segment.getLoadSpec(); String region = MapUtils.getString(loadSpec, "region"); String container = MapUtils.getString(loadSpec, "container"); String path = MapUtils.getString(loadSpec, "path"); log.info("Pulling index at path[%s] to outDir[%s]", path, outDir); prepareOutDir(outDir); getSegmentFiles(region, container, path, outDir); }

Target:
public void getSegmentFiles(final DataSegment segment, final File outDir) throws SegmentLoadingException { final Map<String, Object> loadSpec = segment.getLoadSpec(); final String region = MapUtils.getString(loadSpec, "region"); final String container = MapUtils.getString(loadSpec, "container"); final String path = MapUtils.getString(loadSpec, "path"); log.info("Pulling index at path[%s] to outDir[%s]", path, outDir); prepareOutDir(outDir); getSegmentFiles(region, container, path, outDir); }
Source:
public boolean hasConflicts() { return this.conflictStatus > 0; }

Target:
public boolean hasConflicts() { return conflictStatus != null && conflictStatus > 0; }
Source:
public void drawString(String s, float x, float y, float scale, TextAlignment align, boolean centered, Color tint) { drawer.drawString(s, x, y, scale * FONT_SIZE * FONT_SIZE_MULTIPLIER / displayDimensions.getHeight(), align, centered, tint); }

Target:
public void drawString(String s, float x, float y, float scale, TextAlignment align, boolean centered, Color tint) { drawer.drawString(s, x, y, scale * fontSize, align, centered, tint); }
Source:
public int calculateTransactionAmount(double price, ArrayList<Order> sellOrders, ArrayList<Order> buyOrders) { int sellers = 0; int buyers = 0; int transactions = 0; for (Order o : sellOrders) { if (o.getPrice() <= price || o.isMarketOrder) sellers += o.getSize(); } for (Order o : buyOrders) { if (o.getPrice() >= price || o.isMarketOrder) buyers += o.getSize(); } transactions = buyers > sellers ? sellers : buyers; return transactions; }

Target:
public int calculateTransactionAmount(double price, ArrayList<Order> sellOrders, ArrayList<Order> buyOrders) { int buyers = 0; int sellers = 0; buyers = getTotalSellAmount(sellOrders); sellers = getTotalBuyAmount(buyOrders); return getTransaction(buyers, sellers); }
Source:
public void initialize() { move.initialize(); }

Target:
public void initialize() { move.schedule(); }
Source:
private JButton getBtnOk() { if (btnOk == null) { btnOk = new JButton(); btnOk.setText(Constant.messages.getString("alert.add.button.save")); btnOk.addActionListener(new java.awt.event.ActionListener() { @Override public void actionPerformed(java.awt.event.ActionEvent e) { Alert alert = alertViewPanel.getAlert(); try { ExtensionAlert extAlert = (ExtensionAlert) Control.getSingleton().getExtensionLoader().getExtension(ExtensionAlert.NAME); if (alert.getAlertId() >= 0) { if (extAlert != null) { extAlert.updateAlert(alert); extAlert.displayAlert(alert); } else if (historyRef != null) { historyRef.updateAlert(alert); extension.notifyHistoryItemChanged(historyRef); } } else { if (httpMessage != null) { historyRef = new HistoryReference(Model.getSingleton().getSession(), historyType, httpMessage); } alert.setSource(Alert.Source.MANUAL); if (extAlert != null) { extAlert.alertFound(alert, historyRef); } else { historyRef.addAlert(alert); extension.notifyHistoryItemChanged(historyRef); } } } catch (Exception ex) { logger.error(ex.getMessage(), ex); } clearAndCloseDialog(); } }); } return btnOk; }

Target:
private JButton getBtnOk() { if (btnOk == null) { btnOk = new JButton(); btnOk.setText(Constant.messages.getString("alert.add.button.save")); btnOk.addActionListener(new java.awt.event.ActionListener() { @Override public void actionPerformed(java.awt.event.ActionEvent e) { Alert alert = alertViewPanel.getAlert(); try { ExtensionAlert extAlert = (ExtensionAlert) Control.getSingleton().getExtensionLoader().getExtension(ExtensionAlert.NAME); if (alert.getAlertId() >= 0) { if (extAlert != null) { extAlert.updateAlert(alert); } else if (historyRef != null) { historyRef.updateAlert(alert); extension.notifyHistoryItemChanged(historyRef); } } else { if (httpMessage != null) { historyRef = new HistoryReference(Model.getSingleton().getSession(), historyType, httpMessage); } alert.setSource(Alert.Source.MANUAL); if (extAlert != null) { extAlert.alertFound(alert, historyRef); } else { historyRef.addAlert(alert); extension.notifyHistoryItemChanged(historyRef); } } } catch (Exception ex) { logger.error(ex.getMessage(), ex); } clearAndCloseDialog(); } }); } return btnOk; }
Source:
public void catch_class_cast_exception() throws Exception { Map<Symbol.MethodSymbol, MethodBehavior> behaviorCache = createSymbolicExecutionVisitor("src/test/files/se/XProcCatchClassCastException.java").behaviorCache; assertThat(behaviorCache.values()).hasSize(1); MethodBehavior methodBehavior = behaviorCache.values().iterator().next(); assertThat(methodBehavior.yields()).hasSize(2); MethodYield[] expected = new MethodYield[] { buildMethodYield(0, null, (Constraint) null), buildMethodYield(-1, new ObjectConstraint(true, false, null), (Constraint) null)}; assertThat(methodBehavior.yields()).contains((Object[]) expected); }

Target:
public void catch_class_cast_exception() throws Exception { Map<Symbol.MethodSymbol, MethodBehavior> behaviorCache = createSymbolicExecutionVisitor("src/test/files/se/XProcCatchClassCastException.java").behaviorCache; assertThat(behaviorCache.values()).hasSize(1); MethodBehavior methodBehavior = behaviorCache.values().iterator().next(); assertThat(methodBehavior.yields()).hasSize(2); MethodYield[] expected = new MethodYield[] { buildMethodYield(0, null), buildMethodYield(-1, ObjectConstraint.nullConstraint())}; assertThat(methodBehavior.yields()).contains((Object[]) expected); }
Source:
private static void replacePing(JGroupsProtocolCfg jgroupsCfg) { if (!jgroupsCfg.containsProtocol(LOCAL_PING)) { ProtocolType[] pingProtocols = new ProtocolType[]{MPING}; boolean found = false; for (ProtocolType protocol : pingProtocols) { found = jgroupsCfg.containsProtocol(MPING); if (found) { break; } } if (!found) { throw new IllegalStateException(String.format( "You should one of %s protocol configured.", Arrays.toString(pingProtocols))); } jgroupsCfg.replaceProtocol(MPING, new ProtocolConfiguration(LOCAL_PING.name(), new HashMap<>())); } }

Target:
private static void replacePing(JGroupsProtocolCfg jgroupsCfg) { if (!jgroupsCfg.containsProtocol(LOCAL_PING)) { ProtocolType[] pingProtocols = new ProtocolType[]{MPING, PING}; ProtocolType pingProtocolToBeReplaced = null; for (ProtocolType protocol : pingProtocols) { if (jgroupsCfg.containsProtocol(protocol)) { pingProtocolToBeReplaced = protocol; break; } } if (pingProtocolToBeReplaced == null) { throw new IllegalStateException("Can't replace the ping protocol with LOCAL_PING"); } jgroupsCfg.replaceProtocol(pingProtocolToBeReplaced, new ProtocolConfiguration(LOCAL_PING.name(), new HashMap<>())); } }
Source:
private Path relativize(Path path) { List<Path> fileDirectories = getFileDirectoriesAsPaths(); if (!path.isAbsolute()) { return path; } for (Path directory : fileDirectories) { if (path.startsWith(directory)) { return directory.relativize(path); } } return path; }

Target:
private Path relativize(Path path) { List<Path> fileDirectories = getFileDirectoriesAsPaths(); return FileHelper.relativize(path, fileDirectories); }
Source:
private static Object[][] vcfFileAndWrapperCombinations(){ return new Object[][] { {VCF, VCF_INDEX, null, null}, {MANGLED_VCF, MANGLED_VCF_INDEX, WRAPPER, WRAPPER}, {VCF, MANGLED_VCF_INDEX, null, WRAPPER}, {MANGLED_VCF, VCF_INDEX, WRAPPER, null}, {MANGLED_VCF_TABIX, MANGLED_VCF_TABIX_INDEX, WRAPPER, WRAPPER}, {VCF_TABIX, MANGLED_VCF_TABIX_INDEX, null, WRAPPER}, {MANGLED_VCF_TABIX, VCF_TABIX_INDEX, WRAPPER, null}, {VCF_TABIX, VCF_TABIX_INDEX, null, null}, }; }

Target:
private static Object[][] vcfFileAndWrapperCombinations(){ return new Object[][] { {VCF, VCF_INDEX, null, null}, {MANGLED_VCF, MANGLED_VCF_INDEX, WRAPPER, WRAPPER}, {VCF, MANGLED_VCF_INDEX, null, WRAPPER}, {MANGLED_VCF, VCF_INDEX, WRAPPER, null}, {MANGLED_VCF_TABIX_BLOCK_GZIPPED, MANGLED_VCF_TABIX_INDEX, WRAPPER, WRAPPER}, {VCF_TABIX_BLOCK_GZIPPED, MANGLED_VCF_TABIX_INDEX, null, WRAPPER}, {MANGLED_VCF_TABIX_BLOCK_GZIPPED, VCF_TABIX_INDEX, WRAPPER, null}, {VCF_TABIX_BLOCK_GZIPPED, VCF_TABIX_INDEX, null, null}, }; }
Source:
public boolean hasModeType(String modeType) { if(!hasModes()) { return false; } List<EquipmentMode> threadSafeModes = Collections.synchronizedList(modes); synchronized(threadSafeModes) { for(EquipmentMode mode : threadSafeModes) { if(mode.getName().equals(modeType)) { return true; } } } return false; }

Target:
public boolean hasModeType(String modeType) { if(!hasModes()) { return false; } for(EquipmentMode mode : modes) { if(mode.getName().equals(modeType)) { return true; } } return false; }
Source:
private RowDataToJsonConverter createMapConverter( String typeSummary, LogicalType keyType, LogicalType valueType) { if (!LogicalTypeChecks.hasFamily(keyType, LogicalTypeFamily.CHARACTER_STRING)) { throw new UnsupportedOperationException( "JSON format doesn't support non-string as key type of map. " + "The type is: " + typeSummary); } final RowDataToJsonConverter valueConverter = createConverter(valueType); final ArrayData.ElementGetter valueGetter = ArrayData.createElementGetter(valueType); return (mapper, reuse, object) -> { ObjectNode node; if (reuse == null || reuse.isNull()) { node = mapper.createObjectNode(); } else { node = (ObjectNode) reuse; node.removeAll(); } MapData map = (MapData) object; ArrayData keyArray = map.keyArray(); ArrayData valueArray = map.valueArray(); int numElements = map.size(); for (int i = 0; i < numElements; i++) { boolean isFieldNameNull = keyArray.isNullAt(i); String fieldName = null; if (isFieldNameNull) { switch (mapNullKeyMode) { case LITERAL: fieldName = mapNullKeyLiteral; break; case DROP: continue; case FAIL: throw new RuntimeException("Map key is null, please have a check." + " You can setup null key handling mode to drop entry or replace with a no-null literal."); default: throw new RuntimeException("Unsupported map null key mode. Validator should have checked that."); } } else { fieldName = keyArray.getString(i).toString(); } Object value = valueGetter.getElementOrNull(valueArray, i); node.set(fieldName, valueConverter.convert(mapper, node.get(fieldName), value)); } return node; }; }

Target:
private RowDataToJsonConverter createMapConverter( String typeSummary, LogicalType keyType, LogicalType valueType) { if (!LogicalTypeChecks.hasFamily(keyType, LogicalTypeFamily.CHARACTER_STRING)) { throw new UnsupportedOperationException( "JSON format doesn't support non-string as key type of map. " + "The type is: " + typeSummary); } final RowDataToJsonConverter valueConverter = createConverter(valueType); final ArrayData.ElementGetter valueGetter = ArrayData.createElementGetter(valueType); return (mapper, reuse, object) -> { ObjectNode node; if (reuse == null || reuse.isNull()) { node = mapper.createObjectNode(); } else { node = (ObjectNode) reuse; node.removeAll(); } MapData map = (MapData) object; ArrayData keyArray = map.keyArray(); ArrayData valueArray = map.valueArray(); int numElements = map.size(); for (int i = 0; i < numElements; i++) { String fieldName = null; if (keyArray.isNullAt(i)) { switch (mapNullKeyMode) { case LITERAL: fieldName = mapNullKeyLiteral; break; case DROP: continue; case FAIL: throw new RuntimeException(String.format( "JSON format doesn't support to serialize map data with null keys. " + "You can drop null key entries or encode null in literals by specifying %s option.", JsonOptions.MAP_NULL_KEY_MODE.key())); default: throw new RuntimeException("Unsupported map null key mode. Validator should have checked that."); } } else { fieldName = keyArray.getString(i).toString(); } Object value = valueGetter.getElementOrNull(valueArray, i); node.set(fieldName, valueConverter.convert(mapper, node.get(fieldName), value)); } return node; }; }
Source:
public static @CheckForNull Fingerprint of(@Nonnull String id) throws IOException { final Jenkins jenkins = Jenkins.getInstance(); return jenkins != null ? jenkins.getFingerprintMap().get(getFingerprintHash(id)) : null; }

Target:
public static @CheckForNull Fingerprint of(@Nonnull String id) throws IOException { return Jenkins.getInstance().getFingerprintMap().get(getFingerprintHash(id)); }
Source:
public void testMd5DigestSecretGeneration03() { Map<String, Object> conf = new HashMap<>(); conf.put(Config.STORM_ZOOKEEPER_AUTH_SCHEME, "anything"); Map<String, Object> result = StormSubmitter.prepareZookeeperAuthentication(conf); Object actualPayload = result.get(Config.STORM_ZOOKEEPER_TOPOLOGY_AUTH_PAYLOAD); Object actualScheme = result.get(Config.STORM_ZOOKEEPER_TOPOLOGY_AUTH_SCHEME); assertThat(Strings.isNullOrEmpty((String)actualPayload), is(false)); assertThat(actualScheme, is("digest")); }

Target:
public void testMd5DigestSecretGeneration03() { Map<String, Object> conf = new HashMap<>(); conf.put(Config.STORM_ZOOKEEPER_AUTH_SCHEME, "anything"); Map<String, Object> result = StormSubmitter.prepareZookeeperAuthentication(conf); Object actualPayload = result.get(Config.STORM_ZOOKEEPER_TOPOLOGY_AUTH_PAYLOAD); Object actualScheme = result.get(Config.STORM_ZOOKEEPER_TOPOLOGY_AUTH_SCHEME); assertFalse(StringUtils.isBlank((String)actualPayload)); assertEquals("digest", actualScheme); }
Source:
public Set<User> getUsersById(Set<String> userIds) { Set<User> result = new HashSet<User>(); if (userIds != null) { for (String userId : userIds) { User user = getCache().get(userId); if (user != null) { result.add(user); } else { result.add(new User(userId)); } if (this.eventService != null) { this.eventService.fireEvent(new EventUserUpdate(user)); } } } return result; }

Target:
public Set<User> getUsersById(Set<String> userIds) { Set<User> result = new HashSet<User>(); if (userIds != null) { for (String userId : userIds) { User user = getCache().get(userId); if (user != null) { result.add(user); } else { result.add(new User(userId)); } } } return result; }
Source:
public Manifest getManifest(MavenArtifact artifact) throws IOException { Manifest manifest; File f = artifact.resolve(); try { JarFile jar = new JarFile(f); ZipEntry e = jar.getEntry("META-INF/MANIFEST.MF"); manifest = jar.getManifest(); jar.close(); } catch (IOException x) { throw new IOException("Failed to open "+f, x); } return manifest; }

Target:
public Manifest getManifest(MavenArtifact artifact) throws IOException { try (InputStream is = getZipFileEntry(artifact, "META-INF/MANIFEST.MF")) { return new Manifest(is); } catch (IOException x) { throw new IOException("Failed to read manifest from "+artifact, x); } }
Source:
private static Map<String, String> readProperties() { try { File file = new File(AndroidLocation.getFolder(), PATH_FIRST_RUN_PROPERTIES); if (file.isFile()) { Map<String, String> properties = Maps.newHashMap(); try { final List<String> lines = Files.readLines(file, Charsets.UTF_16LE); for (String line : lines) { int keyValueSeparator = line.indexOf('='); if (keyValueSeparator < 0) { continue; } final String key = line.substring(0, keyValueSeparator).trim(); final String value = line.substring(keyValueSeparator + 1).trim(); if (key == "") { continue; } properties.put(key, value); } } catch (IOException e) { Logger.getInstance(InstallerData.class).error(e); } return properties; } } catch (AndroidLocation.AndroidLocationException e) { Logger.getInstance(InstallerData.class).error(e); } return null; }

Target:
private static Map<String, String> readProperties() { try { File file = new File(AndroidLocation.getFolder(), PATH_FIRST_RUN_PROPERTIES); if (file.isFile()) { Map<String, String> properties = Maps.newHashMap(); try { final List<String> lines = Files.readLines(file, Charsets.UTF_16LE); for (String line : lines) { int keyValueSeparator = line.indexOf('='); if (keyValueSeparator < 0) { continue; } final String key = line.substring(0, keyValueSeparator).trim(); final String value = line.substring(keyValueSeparator + 1).trim(); if (key.isEmpty()) { continue; } properties.put(key, value); } } catch (IOException e) { Logger.getInstance(InstallerData.class).error(e); } return properties; } } catch (AndroidLocation.AndroidLocationException e) { Logger.getInstance(InstallerData.class).error(e); } return null; }
Source:
@Override public Result implement(EnumerableRelImplementor implementor, Prefer pref) { final BlockBuilder builder = new BlockBuilder(); final EnumerableRel child = (EnumerableRel) this.getInput(); final Result result = implementor.visitChild(this, 0, child, pref); final PhysType physType = PhysTypeImpl.of( implementor.getTypeFactory(), this.getRowType(), result.format); Expression childExp = builder.append("child", result.block); PhysType inputPhysType = result.physType; final Pair<Expression, Expression> pair = inputPhysType.generateCollationKey(this.collation.getFieldCollations()); Expression fetchVal; if (this.fetch == null) { fetchVal = Expressions.constant(Integer.valueOf(Integer.MAX_VALUE)); } else { fetchVal = getExpression(this.fetch); } Expression offsetVal = this.offset == null ? Expressions.constant(Integer.valueOf(0)) : getExpression(this.offset); builder.add( Expressions.return_( null, Expressions.call( BuiltInMethod.ORDER_BY_WITH_FETCH_AND_OFFSET.method, Expressions.list( childExp, builder.append("keySelector", pair.left)) .appendIfNotNull(builder.appendIfNotNull("comparator", pair.right)) .appendIfNotNull( builder.appendIfNotNull("offset", Expressions.constant(offsetVal))) .appendIfNotNull( builder.appendIfNotNull("fetch", Expressions.constant(fetchVal))) ))); return implementor.result(physType, builder.toBlock()); }

Target:
@Override public Result implement(EnumerableRelImplementor implementor, Prefer pref) { final BlockBuilder builder = new BlockBuilder(); final EnumerableRel child = (EnumerableRel) this.getInput(); final Result result = implementor.visitChild(this, 0, child, pref); final PhysType physType = PhysTypeImpl.of( implementor.getTypeFactory(), this.getRowType(), result.format); final Expression childExp = builder.append("child", result.block); final PhysType inputPhysType = result.physType; final Pair<Expression, Expression> pair = inputPhysType.generateCollationKey(this.collation.getFieldCollations()); final Expression fetchVal; if (this.fetch == null) { fetchVal = Expressions.constant(Integer.valueOf(Integer.MAX_VALUE)); } else { fetchVal = getExpression(this.fetch); } final Expression offsetVal = this.offset == null ? Expressions.constant(Integer.valueOf(0)) : getExpression(this.offset); builder.add( Expressions.return_( null, Expressions.call( BuiltInMethod.ORDER_BY_WITH_FETCH_AND_OFFSET.method, Expressions.list( childExp, builder.append("keySelector", pair.left)) .appendIfNotNull(builder.appendIfNotNull("comparator", pair.right)) .appendIfNotNull( builder.appendIfNotNull("offset", Expressions.constant(offsetVal))) .appendIfNotNull( builder.appendIfNotNull("fetch", Expressions.constant(fetchVal))) ))); return implementor.result(physType, builder.toBlock()); }
Source:
public void start() { log.info("Starting KafkaConfigBackingStore"); configLog.start(); int partitionCount = configLog.getPartitionCount(); if (partitionCount > 1) { throw new ConfigException("KafkaConfigBackingStore must have exactly 1 partition but found " + partitionCount + ", check topic set by " + DistributedConfig.CONFIG_TOPIC_CONFIG); } started = true; log.info("Started KafkaConfigBackingStore"); }

Target:
public void start() { log.info("Starting KafkaConfigBackingStore"); configLog.start(); int partitionCount = configLog.partitionCount(); if (partitionCount > 1) { String msg = String.format("Topic '%s' supplied via the '%s' property is required " + "to have a single partition in order to guarantee consistency of " + "connector configurations, but found %d partitions.", topic, DistributedConfig.CONFIG_TOPIC_CONFIG, partitionCount); throw new ConfigException(msg); } started = true; log.info("Started KafkaConfigBackingStore"); }
Source:
public java.io.File toLocalFile(int options, IProgressMonitor monitor) throws CoreException { SubMonitor subMonitor = SubMonitor.convert(monitor); if (options != EFS.CACHE) return null; return FileCache.getCache().cache(this, subMonitor); }

Target:
public java.io.File toLocalFile(int options, IProgressMonitor monitor) throws CoreException { if (options != EFS.CACHE) return null; return FileCache.getCache().cache(this, monitor); }
Source:
protected ItemRest put(Context context, HttpServletRequest request, String apiCategory, String model, UUID uuid, JsonNode jsonNode) throws RepositoryMethodNotImplementedException, SQLException, AuthorizeException { HttpServletRequest req = getRequestService().getCurrentRequest().getHttpServletRequest(); ObjectMapper mapper = new ObjectMapper(); ItemRest itemRest = null; try { itemRest = mapper.readValue(jsonNode.toString(), ItemRest.class); } catch (IOException e1) { throw new UnprocessableEntityException("Error parsing request body: " + e1.toString()); } Item item = itemService.find(context, uuid); if (item == null) { throw new ResourceNotFoundException(apiCategory + "." + model + " with id: " + uuid + " not found"); } if (StringUtils.equals(uuid.toString(), itemRest.getId())) { List<MetadataEntryRest> metadataEntryRestList = itemRest.getMetadata(); item = (Item) dspaceObjectUtils.replaceMetadataValues(context, item, metadataEntryRestList); } else { throw new IllegalArgumentException("The UUID in the Json and the UUID in the url do not match: " + uuid + ", " + itemRest.getId()); } return converter.fromModel(item); }

Target:
protected ItemRest put(Context context, HttpServletRequest request, String apiCategory, String model, UUID uuid, JsonNode jsonNode) throws RepositoryMethodNotImplementedException, SQLException, AuthorizeException { HttpServletRequest req = getRequestService().getCurrentRequest().getHttpServletRequest(); ObjectMapper mapper = new ObjectMapper(); ItemRest itemRest = null; try { itemRest = mapper.readValue(jsonNode.toString(), ItemRest.class); } catch (IOException e1) { throw new UnprocessableEntityException("Error parsing request body", e1); } Item item = itemService.find(context, uuid); if (item == null) { throw new ResourceNotFoundException(apiCategory + "." + model + " with id: " + uuid + " not found"); } if (StringUtils.equals(uuid.toString(), itemRest.getId())) { List<MetadataEntryRest> metadataEntryRestList = itemRest.getMetadata(); item = (Item) dspaceObjectUtils.replaceMetadataValues(context, item, metadataEntryRestList); } else { throw new IllegalArgumentException("The UUID in the Json and the UUID in the url do not match: " + uuid + ", " + itemRest.getId()); } return converter.fromModel(item); }
Source:
} catch (URISyntaxException e) { throw new RuntimeException(e); }

Target:
} catch (URISyntaxException e) { throw new IllegalArgumentException(e); }
Source:
public BuilderInterceptorInstance create(CreationalContext<BuilderInterceptorInstance> creationalContext) { BuilderInterceptorInstance interceptorInstance; if (this.interceptorMetadataFunction != null) { WeldCreationalContext<?> interceptorContext = getParentCreationalContext(creationalContext); Contextual<?> interceptedContextual = interceptorContext.getContextual(); if (interceptedContextual instanceof Bean<?>) { Bean<?> bean = (Bean<?>) interceptedContextual; interceptorInstance = new BuilderInterceptorInstance(bean); return interceptorInstance; } else { return null; } } else { interceptorInstance = new BuilderInterceptorInstance(); return interceptorInstance; } }

Target:
public BuilderInterceptorInstance create(CreationalContext<BuilderInterceptorInstance> creationalContext) { BuilderInterceptorInstance interceptorInstance; if (this.interceptorMetadataFunction != null) { WeldCreationalContext<?> interceptorContext = getParentCreationalContext(creationalContext); Contextual<?> interceptedContextual = interceptorContext.getContextual(); if (interceptedContextual instanceof Bean<?>) { Bean<?> bean = (Bean<?>) interceptedContextual; interceptorInstance = new BuilderInterceptorInstance(bean, beanManager.getContextId()); return interceptorInstance; } else { throw BeanLogger.LOG.cannotCreateContextualInstanceOfBuilderInterceptor(this); } } else { interceptorInstance = new BuilderInterceptorInstance(); return interceptorInstance; } }
Source:
public String getContentAsString() { String content; try { final InputStream contentStream = Samples.class.getResourceAsStream(filePath); content = StreamUtils.readToString(contentStream, StreamUtils.UTF_8); } catch (Throwable e) { e.printStackTrace(); throw new RuntimeException("Could not read file " + filePath + ": " + e.getMessage()); } return content; }

Target:
public String getContentAsString() { String content = null; try { final InputStream contentStream = Samples.class.getResourceAsStream(filePath); content = StreamUtils.readToString(contentStream, StreamUtils.UTF_8); } catch (Throwable e) { e.printStackTrace(); throw new RuntimeException("Could not read file " + filePath + ": " + e.getMessage()); } return content; }
Source:
public void handshakeTest() throws URISyntaxException, SSLException { try { assertTrue(primaryClient.handhshake()); logger.info("Handshake test completed."); } catch (InterruptedException e) { logger.error("Handshake interruption."); assertTrue(false); } }

Target:
public void handshakeTest() throws URISyntaxException, SSLException, InterruptedException { assertTrue(primaryClient.handhshake()); logger.info("Handshake test completed."); }
Source:
public void onCustomizedViewChange(List<CustomizedView> customizedViewList, NotificationContext changeContext) { _routerUpdater.queueEvent(changeContext, ClusterEventType.CustomizedViewChange, HelixConstants.ChangeType.CUSTOMIZED_VIEW); }

Target:
public void onCustomizedViewChange(List<CustomizedView> customizedViewList, NotificationContext changeContext) { if (_sourceDataTypeMap.containsKey(PropertyType.CUSTOMIZEDVIEW)) { _routerUpdater.queueEvent(changeContext, ClusterEventType.CustomizedViewChange, HelixConstants.ChangeType.CUSTOMIZED_VIEW); } else { logger.warn( "RoutingTableProvider does not use CurrentStates as source, ignore CurrentState changes!"); } }
Source:
private static LogDelegateFactory loadClass(String className, ClassLoader classLoader) { try { Class<?> clz = classLoader.loadClass(className); return (LogDelegateFactory) clz.newInstance(); } catch (Exception e) { throw new IllegalArgumentException("Error instantiating transformer class \"" + className + "\"", e); } }

Target:
private static LogDelegateFactory loadClass(String className, ClassLoader classLoader) { try { Class<?> clz = classLoader.loadClass(className); return (LogDelegateFactory) clz.newInstance(); } catch (Exception e) { throw new IllegalArgumentException("Error instantiating LogDelegateFactory implemention: \"" + className + "\"", e); } }
Source:
public static boolean updateWrenchStatus() { EntityPlayer player = Minecraft.getMinecraft().thePlayer; Item equipped = player.getCurrentEquippedItem() != null ? player.getCurrentEquippedItem().getItem() : null; if (equipped != null) { return (player.getHeldItem() != null && player.getHeldItem().getItem() instanceof IPipeWrench && ((IPipeWrench) equipped).canWrench(player, (int) player.posX, (int) player.posY, (int) player.posZ) && !player.isSneaking()); } return false; }

Target:
public static boolean updateWrenchStatus() { EntityPlayer player = Minecraft.getMinecraft().thePlayer; Item equipped = player.getCurrentEquippedItem() != null ? player.getCurrentEquippedItem().getItem() : null; Item held = player.getHeldItem().getItem(); return equipped != null && held != null && held instanceof IPipeWrench && ((IPipeWrench) equipped).canWrench(player, (int) player.posX, (int) player.posY, (int) player.posZ) && !player.isSneaking(); }
Source:
public Set<String> getSplitComment() { Set<String> splitComment = new HashSet<>(); for (String part : ParseUtils.splitCommaDelimitedString(this.comment)) { splitComment.add(part.replaceAll("\\s", "").toLowerCase()); } return splitComment; }

Target:
public Set<String> getSplitComment() { Set<String> splitComment = new HashSet<>(); for (String part : ParseUtils.splitCommaDelimitedString(comment)) { splitComment.add(part.replaceAll("\\s", "").toLowerCase()); } return splitComment; }
Source:
public GroupDetail call() throws Exception { final AccountGroup.Id a = findGroup(groupName); final GroupMemberResult result = addGroupIncludeFactory.create(groupId, Collections.singleton(a)).call(); if (!result.getErrors().isEmpty()) { final GroupMemberResult.Error error = result.getErrors().get(0); switch (error.getType()) { case ADD_NOT_PERMITTED: throw new NoSuchEntityException(); default: throw new IllegalStateException(); } } return result.getGroup(); }

Target:
public GroupDetail call() throws Exception { final AccountGroup.Id a = findGroup(groupName); final GroupMemberResult result = addGroupIncludeFactory.create(groupId, Collections.singleton(a)).call(); if (!result.getErrors().isEmpty()) { switch (result.getErrors().get(0).getType()) { case ADD_NOT_PERMITTED: throw new NoSuchEntityException(); default: throw new IllegalStateException(); } } return result.getGroup(); }
Source:
protected void handleUpstream1(ChannelHandlerContext ctx, ChannelEvent evt) throws Exception { ChannelEventKind eventAsKind = asEventKind(evt); ChannelFuture handlerFuture = getHandlerFuture(); assert handlerFuture != null; if (handlerFuture.isDone() || !interestEvents.contains(eventAsKind)) { ctx.sendUpstream(evt); } else if (!expectedEvents.contains(eventAsKind)) { handleUnexpectedEvent(ctx, evt); } else { ChannelFuture pipelineFuture = getPipelineFuture(); super.handleUpstream1(ctx, evt); } }

Target:
protected void handleUpstream1(ChannelHandlerContext ctx, ChannelEvent evt) throws Exception { ChannelEventKind eventAsKind = asEventKind(evt); ChannelFuture handlerFuture = getHandlerFuture(); assert handlerFuture != null; if (handlerFuture.isDone() || !interestEvents.contains(eventAsKind)) { ctx.sendUpstream(evt); } else if (!expectedEvents.contains(eventAsKind)) { handleUnexpectedEvent(ctx, evt); } else { super.handleUpstream1(ctx, evt); } }
Source:
public void initialize() { move.initialize(); initialAngle = imu.getYaw(); try { motionController.resetSafely(); } catch (final InvalidSensorException e) { move.cancel(); cancel(); if (fallbackCommand != null) { fallbackCommand.initialize(); } return; } }

Target:
public void initialize() { move.schedule(); initialAngle = imu.getYaw(); try { motionController.resetSafely(); } catch (final InvalidSensorException e) { move.cancel(); cancel(); if (fallbackCommand != null) { fallbackCommand.schedule(); } return; } }
Source:
public void testXMLConfiguration() throws Exception { Set<String> shortcutsName = publisherService.getShortcutsName(); int size = shortcutsName.size(); deployTestContrib(OSGI_BUNDLE_NAME, "management-tests-service.xml"); deployTestContrib(OSGI_BUNDLE_NAME, "management-tests-contrib.xml"); applyInlineDeployments(); postSetUp(); publisherService.bindResources(); String qualifiedName = ObjectNameFactory.formatTypeQuery("service"); Set<ObjectName> registeredNames = doQuery(qualifiedName); assertNotNull(registeredNames); assertEquals(4, registeredNames.size()); shortcutsName = publisherService.getShortcutsName(); assertNotNull(shortcutsName); assertEquals(size + 4, shortcutsName.size()); assertTrue(shortcutsName.contains("dummy")); }

Target:
public void testXMLConfiguration() throws Exception { Set<String> shortcutsName = publisherService.getShortcutsName(); int size = shortcutsName.size(); pushInlineDeployments("org.nuxeo.runtime.test.tests:management-tests-service.xml", "org.nuxeo.runtime.test.tests:management-tests-contrib.xml"); publisherService.bindResources(); String qualifiedName = ObjectNameFactory.formatTypeQuery("service"); Set<ObjectName> registeredNames = doQuery(qualifiedName); assertNotNull(registeredNames); assertEquals(4, registeredNames.size()); shortcutsName = publisherService.getShortcutsName(); assertNotNull(shortcutsName); assertEquals(size + 4, shortcutsName.size()); assertTrue(shortcutsName.contains("dummy")); }
Source:
public <T> T executeReadWriteTransaction(SessionWork<T> sessionWork, boolean readOnlyEntities) { Exception lastException = null; int dampingFactor = PASchedulerProperties.SCHEDULER_DB_TRANSACTION_DAMPING_FACTOR.getValueAsInt(); int delay = PASchedulerProperties.SCHEDULER_DB_TRANSACTION_SLEEP_DELAY.getValueAsInt(); int maximumNumberOfRetries = Math.max(PASchedulerProperties.SCHEDULER_DB_TRANSACTION_MAXIMUM_RETRIES.getValueAsInt(), 1); for (int i = 1; i <= maximumNumberOfRetries; i++) { try { return tryExecuteTransaction(sessionWork, true, readOnlyEntities); } catch (LockAcquisitionException exception) { lastException = exception; logger.warn( String.format( "Database operation failed. Automatic retry in %d ms (attempt %d)", delay, i), exception); new Sleeper(delay, logger).sleep(); delay *= dampingFactor; } catch (Throwable throwable) { logger.warn("Database operation failed", throwable); throw new DatabaseManagerException(throwable); } } logger.warn( "Maximum number of transaction retries exceeded, giving up. Last exception is: ", lastException); return null; }

Target:
public <T> T executeReadWriteTransaction(SessionWork<T> sessionWork, boolean readOnlyEntities) { return tryExecuteTransactionLoop(sessionWork, true, readOnlyEntities); }
Source:
protected Optional<ManagementClient> getOrchestrator(){ return Optional.of(runtime.getLayoutView() .getRuntimeLayout().getManagementClient(nodeForWorkflow)); }

Target:
protected Optional<ManagementClient> getOrchestrator() { runtime.invalidateLayout(); Layout layout = new Layout(runtime.getLayoutView().getLayout()); BaseClient baseClient = runtime.getLayoutView().getRuntimeLayout(layout).getBaseClient(nodeForWorkflow); for (int i = 0; i < pingRetries; i++) { if (baseClient.pingSync()) { log.info("getOrchestrator: orchestrator selected {}", nodeForWorkflow); return Optional.of(runtime.getLayoutView() .getRuntimeLayout(layout).getManagementClient(nodeForWorkflow)); } Sleep.sleepUninterruptibly(pingInterval); log.info("Retrying to ping a current base server times.", i); } log.warn("getOrchestrator: a server is not responding to pings", nodeForWorkflow); return Optional.empty(); }
Source:
private boolean isRunVmSucceeded() { RunVmParams runVmParams = getChildRunVmParameters(); return runVmParams == null || getCommandCoordinatorUtil().getCommandEntity(runVmParams.getCommandId()).getReturnValue().getSucceeded(); }

Target:
private boolean isRunVmSucceeded() { RunVmParams runVmParams = getChildRunVmParameters(); return runVmParams == null || commandCoordinatorUtil.getCommandEntity(runVmParams.getCommandId()).getReturnValue().getSucceeded(); }
Source:
public void start() { SshSessionFactory.setInstance(new JschConfigSessionFactory() { @Override protected void configure(OpenSshConfig.Host hc, Session session) { } }); WindowCacheConfig cfg = new WindowCacheConfig(); cfg.fromConfig(serverConfig); if (serverConfig.getString("core", null, "streamFileThreshold") == null) { long limit = Math.min( Runtime.getRuntime().maxMemory() / 4, Integer.MAX_VALUE); log.info(String.format( "Defaulting core.streamFileThreshold to %d", limit)); cfg.setStreamFileThreshold((int) limit); } cfg.install(); }

Target:
public void start() { SshSessionFactory.setInstance(new JschConfigSessionFactory() { @Override protected void configure(OpenSshConfig.Host hc, Session session) { } }); WindowCacheConfig cfg = new WindowCacheConfig(); cfg.fromConfig(serverConfig); if (serverConfig.getString("core", null, "streamFileThreshold") == null) { long mx = Runtime.getRuntime().maxMemory(); int limit = (int) Math.min( mx / 4, 2047 << 20); if ((5 << 20) < limit && limit % (1 << 20) != 0) { limit = ((limit / (1 << 20)) + 1) << 20; } String desc; if (limit % (1 << 20) == 0) { desc = String.format("%dm", limit / (1 << 20)); } else if (limit % (1 << 10) == 0) { desc = String.format("%dk", limit / (1 << 10)); } else { desc = String.format("%d", limit); } log.info(String.format( "Defaulting core.streamFileThreshold to %s", desc)); cfg.setStreamFileThreshold(limit); } cfg.install(); }
Source:
public boolean onTouch(ImageView imageView, MotionEvent event, CoordinateInterface coordinateInterface) { if (event.getPointerId(0) == 0) { float currentX = event.getRawX(); float currentY = event.getRawY(); switch (event.getAction()) { case MotionEvent.ACTION_DOWN: setMode(Mode.TAP); previousX = currentX; previousY = currentY; startX = currentX; startY = currentY; break; case MotionEvent.ACTION_CANCEL: case MotionEvent.ACTION_UP: if (Math.abs(currentX - startX) < 10 && Math.abs(currentY - startY) < 10) { long delayTime = SystemClock.elapsedRealtime() - lastTimeMove; switch (mode) { case TAP: imageView.setX(event.getX() - (float) imageView.getWidth() / 2); imageView.setY(event.getY() - (float) imageView.getHeight() / 2); break; case MOVE: if (delayTime > 100) { imageView.setX(event.getX() - (float) imageView.getWidth() / 2); imageView.setY(event.getY() - (float) imageView.getHeight() / 2); } break; } } else { lastTimeMove = SystemClock.elapsedRealtime(); } break; case MotionEvent.ACTION_MOVE: setMode(Mode.MOVE); float dX = currentX - previousX; float dY = currentY - previousY; imageView.setX(imageView.getX() + dX); imageView.setY(imageView.getY() + dY); previousX = currentX; previousY = currentY; break; } coordinateInterface.setXCoordinate(imageView.getX()); coordinateInterface.setYCoordinate(-imageView.getY()); return true; } else { return false; } }

Target:
public boolean onTouch(ImageView imageView, MotionEvent event, CoordinateInterface coordinateInterface) { if (event.getPointerId(0) == 0) { float currentX = event.getRawX(); float currentY = event.getRawY(); switch (event.getAction()) { case MotionEvent.ACTION_DOWN: setMode(Mode.TAP); previousX = currentX; previousY = currentY; lastTimeMove = SystemClock.elapsedRealtime(); break; case MotionEvent.ACTION_CANCEL: case MotionEvent.ACTION_UP: if (mode == Mode.TAP) { imageView.setX(event.getX() - (float) imageView.getWidth() / 2); imageView.setY(event.getY() - (float) imageView.getHeight() / 2); } break; case MotionEvent.ACTION_MOVE: long delayTime = SystemClock.elapsedRealtime() - lastTimeMove; if (delayTime > 100) { setMode(Mode.MOVE); float dX = currentX - previousX; float dY = currentY - previousY; imageView.setX(imageView.getX() + dX); imageView.setY(imageView.getY() + dY); previousX = currentX; previousY = currentY; } break; } coordinateInterface.setXCoordinate(imageView.getX()); coordinateInterface.setYCoordinate(-imageView.getY()); return true; } else { return false; } }
Source:
public String getPreferenceKey() { return fId; }

Target:
public String getPreferenceKey() { return fId + '.' + super.getPreferenceKey(); }
Source:
private void deleteCleanupFiles(Model m) { List<String> cleanupPaths = new ArrayList<>(); NodeIterator it = m.listObjectsOfProperty(CdrDeposit.cleanupLocation); try { while (it.hasNext()) { RDFNode n = it.nextNode(); URI cleanupUri = URI.create(n.asLiteral().getString()); CleanupPolicy cleanupPolicy = stagingManager.getCleanupPolicy(cleanupUri); switch (cleanupPolicy) { case DELETE_INGESTED_FILES: case DELETE_INGESTED_FILES_EMPTY_FOLDERS: cleanupPaths.add(cleanupUri.getPath()); break; default: break; } } } finally { it.close(); } Collections.sort(cleanupPaths, Collections.reverseOrder()); for (String pathString : cleanupPaths) { File cleanupFile = new File(pathString); try { if (cleanupFile.exists()) { Files.delete(cleanupFile.toPath()); LOG.info("Deleted cleanup file: {}", cleanupFile.getAbsoluteFile()); } } catch (IOException e) { if (cleanupFile.isDirectory()) { LOG.warn("Failed to delete cleanup directory {}, it may not be empty", pathString); } else { LOG.error("Failed to delete cleanup file {}", pathString, e); } } } }

Target:
private void deleteCleanupFiles(Model m) { List<String> cleanupPaths = new ArrayList<>(); NodeIterator it = m.listObjectsOfProperty(CdrDeposit.cleanupLocation); try { while (it.hasNext()) { RDFNode n = it.nextNode(); URI cleanupUri = URI.create(n.asLiteral().getString()); CleanupPolicy cleanupPolicy = stagingPolicyManager.getCleanupPolicy(cleanupUri); if (cleanupPolicy.equals(DELETE_INGESTED_FILES) || cleanupPolicy.equals(DELETE_INGESTED_FILES_EMPTY_FOLDERS)) { cleanupPaths.add(cleanupUri.getPath()); } } } finally { it.close(); } Collections.sort(cleanupPaths, Collections.reverseOrder()); for (String pathString : cleanupPaths) { File cleanupFile = new File(pathString); try { Files.delete(cleanupFile.toPath()); LOG.info("Deleted cleanup file: {}", cleanupFile.getAbsoluteFile()); } catch (NoSuchFileException e) { LOG.info("Cleanup file does not exist, skipping", pathString); } catch (DirectoryNotEmptyException e) { LOG.warn("Cleanup directory not removed because it was not empty", pathString); } catch (IOException e) { LOG.error("Failed to delete cleanup file {}", pathString, e); } } }