auphong2707/dl4se-code-review-dataset huggingface dataset:
Source:
<code>public boolean isInteresting(String project, String branch, String topic, List<String> files) { if (compareType.matches(pattern, project)) { for (Branch b : branches) { boolean foundInterestingForbidden = false; <START> boolean foundInterestingTopicOrFile = false; <END> if (b.isInteresting(branch)) { if (forbiddenFilePaths != null) { Iterator<String> i = files.iterator(); while (i.hasNext()) { String file = i.next(); for (FilePath ffp : forbiddenFilePaths) { if (ffp.isInteresting(file)) { if (!disableStrictForbiddenFileVerification) { return false; } else { i.remove(); break; } } } } } return isInterestingTopic(topic) && !files.isEmpty() && isInterestingFile(files); } } } return false; }</code><technical_language>I more</technical_language>

Target:
public boolean isInteresting(String project, String branch, String topic, List<String> files) { if (compareType.matches(pattern, project)) { for (Branch b : branches) { boolean foundInterestingForbidden = false; if (b.isInteresting(branch)) { if (forbiddenFilePaths != null) { Iterator<String> i = files.iterator(); while (i.hasNext()) { String file = i.next(); for (FilePath ffp : forbiddenFilePaths) { if (ffp.isInteresting(file)) { if (!disableStrictForbiddenFileVerification) { return false; } else { foundInterestingForbidden = true; i.remove(); break; } } } } } if (foundInterestingForbidden && files.isEmpty()) { return false; } return isInterestingTopic(topic) && isInterestingFile(files); } } } return false; }
Source:
<code>public List<WorkspaceImpl> getWorkspaces(String user) throws ServerException { <START> requireNonNull(user, "Required non-null workspace namespace"); <END> final List<WorkspaceImpl> workspaces = workspaceDao.getWorkspaces(user); workspaces.forEach(this::normalizeState); return workspaces; }</code><technical_language>fix namespace</technical_language>

Target:
public List<WorkspaceImpl> getWorkspaces(String user) throws ServerException { requireNonNull(user, "Required non-null user id"); final List<WorkspaceImpl> workspaces = workspaceDao.getWorkspaces(user); workspaces.forEach(this::normalizeState); return workspaces; }
Source:
<code>public void testHeartbeatUnknownMemberResponseDuringRebalancing() throws InterruptedException { setupCoordinator(); mockClient.prepareResponse(groupCoordinatorResponse(node, Errors.NONE)); final int generation = 1; mockClient.prepareResponse(joinGroupFollowerResponse(generation, memberId, JoinGroupRequest.UNKNOWN_MEMBER_ID, Errors.NONE)); mockClient.prepareResponse(syncGroupResponse(Errors.NONE)); coordinator.ensureActiveGroup(); final AbstractCoordinator.Generation currGen = coordinator.generation(); mockTime.sleep(HEARTBEAT_INTERVAL_MS); long startMs = System.currentTimeMillis(); <START> while (System.currentTimeMillis() - startMs < 1000 && !coordinator.heartbeat().hasInflight()) { <END> Thread.sleep(10); } assertTrue(coordinator.heartbeat().hasInflight()); mockClient.respond(heartbeatResponse(Errors.UNKNOWN_MEMBER_ID)); coordinator.requestRejoin(); startMs = System.currentTimeMillis(); while (System.currentTimeMillis() - startMs < 1000 && coordinator.heartbeat().hasInflight()) { Thread.sleep(10); coordinator.ensureActiveGroup(new MockTime(1L).timer(100L)); } assertFalse(coordinator.heartbeat().hasInflight()); assertEquals(AbstractCoordinator.Generation.NO_GENERATION, coordinator.generation()); mockClient.respond(joinGroupFollowerResponse(generation, memberId, JoinGroupRequest.UNKNOWN_MEMBER_ID, Errors.NONE)); mockClient.prepareResponse(syncGroupResponse(Errors.NONE)); coordinator.ensureActiveGroup(); assertEquals(currGen, coordinator.generation()); }</code><technical_language>nit: replace this TestUtils.waitForCondition</technical_language>

Target:
public void testHeartbeatUnknownMemberResponseDuringRebalancing() throws InterruptedException { setupCoordinator(); mockClient.prepareResponse(groupCoordinatorResponse(node, Errors.NONE)); final int generation = 1; mockClient.prepareResponse(joinGroupFollowerResponse(generation, memberId, JoinGroupRequest.UNKNOWN_MEMBER_ID, Errors.NONE)); mockClient.prepareResponse(syncGroupResponse(Errors.NONE)); coordinator.ensureActiveGroup(); final AbstractCoordinator.Generation currGen = coordinator.generation(); mockTime.sleep(HEARTBEAT_INTERVAL_MS); TestUtils.waitForCondition(() -> coordinator.heartbeat().hasInflight(), 2000, "The heartbeat request was not sent in time after 2000ms elapsed"); assertTrue(coordinator.heartbeat().hasInflight()); mockClient.respond(heartbeatResponse(Errors.UNKNOWN_MEMBER_ID)); coordinator.requestRejoin(); TestUtils.waitForCondition(() -> { coordinator.ensureActiveGroup(new MockTime(1L).timer(100L)); return !coordinator.heartbeat().hasInflight(); }, 2000, "The heartbeat response was not been received in time after 2000ms elapsed"); assertFalse(coordinator.heartbeat().hasInflight()); assertEquals(AbstractCoordinator.Generation.NO_GENERATION, coordinator.generation()); mockClient.respond(joinGroupFollowerResponse(generation, memberId, JoinGroupRequest.UNKNOWN_MEMBER_ID, Errors.NONE)); mockClient.prepareResponse(syncGroupResponse(Errors.NONE)); coordinator.ensureActiveGroup(); assertEquals(currGen, coordinator.generation()); }
Source:
<code>public boolean isToBeProcessed(CtLiteral candidate) { <START> CtMethod parent = candidate.getParent(CtMethod.class); <END> if (parent == null) { return false; } if (candidate.getValue() instanceof Boolean) { return false; } else if (candidate.getValue() instanceof Number) { if (candidate.getValue().equals(1) || candidate.getValue().equals(0) || candidate.getValue().equals(-1)) { return false; } } if (candidate.getParent(CtLocalVariable.class) != null) { return false; } if (candidate.getParent(CtAssignment.class) != null) { return false; } if (candidate.getParent(CtField.class) != null) { return false; } if (candidate.getParent(CtThrow.class) != null) { return false; } Object value = candidate.getValue(); if (value == null) { return false; } return Long.class.isAssignableFrom(value.getClass()) || Integer.class.isAssignableFrom(value.getClass()); }</code><technical_language>care parent, remove tests</technical_language>

Target:
public boolean isToBeProcessed(CtLiteral candidate) { if (candidate.getValue() instanceof Boolean) { return false; } Object value = candidate.getValue(); if (value == null) { return false; } return Long.class.isAssignableFrom(value.getClass()) || Integer.class.isAssignableFrom(value.getClass()); }
Source:
<code>public Permission atLevels(Scope... levels) { <START> Collection<Scope> l = asList(levels); <END> if (operations.contains(IMPORT) && l.size() != 1) { throw new IllegalArgumentException(IMPORT + " operation is only compatible with one of " + Arrays.toString(Scope.values())); } return new Permission(clusterStates, operations, l); }</code><technical_language>while here, change l more readable</technical_language>

Target:
public Permission atLevels(Scope... levels) { Collection<Scope> levelList = asList(levels); if (operations.contains(IMPORT) && levelList.size() != 1) { throw new IllegalArgumentException(IMPORT + " operation is only compatible with one of " + Arrays.toString(Scope.values())); } return new Permission(clusterStates, operations, levelList); }
Source:
<code>private void init(Context context, @Nullable AttributeSet attrs) { if (isInEditMode()) { return; } Preconditions.checkNotNull( sDraweeControllerBuilderSupplier, "SimpleDraweeView was not initialized!"); mSimpleDraweeControllerBuilder = sDraweeControllerBuilderSupplier.get(); if (attrs != null) { TypedArray gdhAttrs = context.obtainStyledAttributes( attrs, R.styleable.SimpleDraweeView); try { final int indexCount = gdhAttrs.getIndexCount(); <START> for (int i = 0; i < indexCount; i++) { <END> final int attr = gdhAttrs.getIndex(i); if (attr == R.styleable.SimpleDraweeView_imageUri) { setImageURI(Uri.parse(gdhAttrs.getString(R.styleable.SimpleDraweeView_imageUri)),null); } } } finally { gdhAttrs.recycle(); } } }</code><technical_language>handle a single attribute, get SimpleDraweeView_imageUri instead of looping of them</technical_language>

Target:
private void init(Context context, @Nullable AttributeSet attrs) { if (isInEditMode()) { return; } Preconditions.checkNotNull( sDraweeControllerBuilderSupplier, "SimpleDraweeView was not initialized!"); mSimpleDraweeControllerBuilder = sDraweeControllerBuilderSupplier.get(); if (attrs != null) { TypedArray gdhAttrs = context.obtainStyledAttributes( attrs, R.styleable.SimpleDraweeView); try { if(gdhAttrs.hasValue(R.styleable.SimpleDraweeView_actualImageUri)) { setImageURI(Uri.parse(gdhAttrs.getString(R.styleable.SimpleDraweeView_actualImageUri)), null); } } finally { gdhAttrs.recycle(); } } }
Source:
<code>private void testGlusterNetworkInUseAndUnset(boolean glusterNetworkBefore, boolean glusterNetworkAfter, boolean glusterService, boolean hasBricks, Matcher<ValidationResult> expectedResult) { when(oldNetworkCluster.isGluster()).thenReturn(glusterNetworkBefore); when(networkCluster.isGluster()).thenReturn(glusterNetworkAfter); when(cluster.supportsGlusterService()).thenReturn(glusterService); doReturn(brickDao).when(validator).getGlusterBrickDao(); ArrayList<GlusterBrickEntity> list = new ArrayList<>(); if (hasBricks) { <START> list.add(Mockito.mock(GlusterBrickEntity.class)); <END> } when(brickDao.getAllByClusterAndNetworkId(any(Guid.class), any(Guid.class))).thenReturn(list); assertThat(validator.glusterNetworkInUseAndUnset(cluster), expectedResult); }</code><technical_language>please statically import mock</technical_language>

Target:
private void testGlusterNetworkInUseAndUnset(boolean glusterNetworkBefore, boolean glusterNetworkAfter, boolean glusterService, boolean hasBricks, Matcher<ValidationResult> expectedResult) { when(oldNetworkCluster.isGluster()).thenReturn(glusterNetworkBefore); when(networkCluster.isGluster()).thenReturn(glusterNetworkAfter); when(cluster.supportsGlusterService()).thenReturn(glusterService); doReturn(brickDao).when(validator).getGlusterBrickDao(); ArrayList<GlusterBrickEntity> list = new ArrayList<>(); if (hasBricks) { list.add(mock(GlusterBrickEntity.class)); } when(brickDao.getAllByClusterAndNetworkId(any(Guid.class), any(Guid.class))).thenReturn(list); assertThat(validator.glusterNetworkInUseAndUnset(cluster), expectedResult); }
Source:
<code>private void downloadSourceFiles(Path lib_root) throws IOException { Files.createDirectories(lib_root); Path handle_dir = lib_root.resolve("AbstractHandle"); Files.createDirectories(handle_dir); String handle_repo_prefix = "<LINK_1>"; String handle_impl_files = {"__init__.py", "AbstractHandleImpl.py", "AbstractHandleServer.py", "authclient.py", "baseclient.py"}; for (String file_name : handle_impl_files) { FileUtils.copyURLToFile(new URL(handle_repo_prefix + file_name), handle_dir.resolve(file_name).toFile()); } Path handle_utils_dir = handle_dir.resolve("Utils"); Files.createDirectories(handle_utils_dir); String handle_util_files = {"__init__.py", "Handler.py", "MongoUtil.py", "ShockUtil.py", "TokenCache.py"}; for (String file_name : handle_util_files) { FileUtils.copyURLToFile(new URL(handle_repo_prefix + "Utils/" + file_name), handle_utils_dir.resolve(file_name).toFile()); } Path biokbase_dir = lib_root.resolve("biokbase"); Files.createDirectories(biokbase_dir); String biokbase_repo_prefix = "<LINK_0>"; String biokbase_files = {"log.py"}; for (String file_name : biokbase_files) { FileUtils.copyURLToFile(new URL(biokbase_repo_prefix + file_name), biokbase_dir.resolve(file_name).toFile()); } Path log_file = null; Stream <String> lines = null; List <String> replaced = null; log_file = handle_dir.resolve("AbstractHandleServer.py"); lines = Files.lines(log_file); <START> replaced = lines.map(line -> line.replaceAll("loads\\(request_body\\)", <END> "loads(request_body.decode('utf-8'))")).collect(Collectors.toList()); Files.write(log_file, replaced); lines.close(); }</code><technical_language>is this happening? Patching server for tests of want do - want test server run in production</technical_language>

Target:
private void downloadSourceFiles(Path lib_root) throws IOException { Files.createDirectories(lib_root); Path handle_dir = lib_root.resolve("AbstractHandle"); Files.createDirectories(handle_dir); String handle_repo_prefix = "<LINK_1>"; String handle_impl_files = {"__init__.py", "AbstractHandleImpl.py", "AbstractHandleServer.py", "authclient.py", "baseclient.py"}; for (String file_name : handle_impl_files) { FileUtils.copyURLToFile(new URL(handle_repo_prefix + file_name), handle_dir.resolve(file_name).toFile()); } Path handle_utils_dir = handle_dir.resolve("Utils"); Files.createDirectories(handle_utils_dir); String handle_util_files = {"__init__.py", "Handler.py", "MongoUtil.py", "ShockUtil.py", "TokenCache.py"}; for (String file_name : handle_util_files) { FileUtils.copyURLToFile(new URL(handle_repo_prefix + "Utils/" + file_name), handle_utils_dir.resolve(file_name).toFile()); } Path biokbase_dir = lib_root.resolve("biokbase"); Files.createDirectories(biokbase_dir); String biokbase_repo_prefix = "<LINK_0>"; String biokbase_files = {"log.py"}; for (String file_name : biokbase_files) { FileUtils.copyURLToFile(new URL(biokbase_repo_prefix + file_name), biokbase_dir.resolve(file_name).toFile()); } }
Source:
<code>public void notifySuperUsers(String messageCode, Exception cause, Object... messageArguments) { String message = Context.getMessageSourceService().getMessage(messageCode, messageArguments, Context.getLocale()); if (cause != null) { StringBuilder stackTrace = new StringBuilder(); for (StackTraceElement traceElement : cause.getStackTrace()) { stackTrace.append(traceElement); stackTrace.append("\n"); if (stackTrace.length() >= Alert.TEXT_MAX_LENGTH) { break; } } message = message + ":" + stackTrace; message = message.substring(0, Math.min(message.length(), Alert.TEXT_MAX_LENGTH)); } Alert alert = new Alert(message, Context.getUserService().getUsersByRole(new Role(RoleConstants.SUPERUSER))); alert.setSatisfiedByAny(true); if (alert.getCreator() == null) { <START> alert.setCreator(new User(1)); <END> } Context.getAlertService().saveAlert(alert); }</code><technical_language>this is some whitespace, please remove this file changing commit</technical_language>

Target:
public void notifySuperUsers(String messageCode, Exception cause, Object... messageArguments) { String message = Context.getMessageSourceService().getMessage(messageCode, messageArguments, Context.getLocale()); if (cause != null) { StringBuilder stackTrace = new StringBuilder(); for (StackTraceElement traceElement : cause.getStackTrace()) { stackTrace.append(traceElement); stackTrace.append("\n"); if (stackTrace.length() >= Alert.TEXT_MAX_LENGTH) { break; } } message = message + ":" + stackTrace; message = message.substring(0, Math.min(message.length(), Alert.TEXT_MAX_LENGTH)); } Alert alert = new Alert(message, Context.getUserService().getUsersByRole(new Role(RoleConstants.SUPERUSER))); alert.setSatisfiedByAny(true); if (alert.getCreator() == null) { User daemonUser = Context.getUserService().getUserByUuid(Daemon.getDaemonUserUuid()); alert.setCreator(daemonUser); } Context.getAlertService().saveAlert(alert); }
Source:
<code>private void validateByType(ModuleOption option, String value) { <START> if (value == null || option == null || option.getType() == null) { <END> return; } try { if (int.class.isAssignableFrom(option.getType()) || Integer.class.isAssignableFrom(option.getType())) { Integer.parseInt(value); } else if (boolean.class.isAssignableFrom(option.getType()) || Boolean.class.isAssignableFrom(option.getType())) { Boolean.parseBoolean(value); } else if (float.class.isAssignableFrom(option.getType()) || Float.class.isAssignableFrom(option.getType())) { Float.parseFloat(value); } else if (double.class.isAssignableFrom(option.getType()) || Double.class.isAssignableFrom(option.getType())) { Double.parseDouble(value); } else if (short.class.isAssignableFrom(option.getType()) || Short.class.isAssignableFrom(option.getType())) { Short.parseShort(value); } } catch (Exception e) { throw new RuntimeException(String.format( "The value '%s' is the wrong type for option '%s'. The required type is %s.", value, option.getName(), option.getType().getSimpleName())); } }</code><technical_language>option null (per L74)</technical_language>

Target:
private void validateByType(ModuleOption option, String value) { if (value == null || option.getType() == null) { return; } if (boolean.class.isAssignableFrom(option.getType()) || Boolean.class.isAssignableFrom(option.getType())) { if (!(value.equalsIgnoreCase("true") || value.equalsIgnoreCase("false") || value.equals("1") || value.equals("0"))) { throw new RuntimeException(String.format( "The value '%s' is the wrong type for option '%s'. The required type is %s.", value, option.getName(), option.getType().getSimpleName())); } } else { try { if (int.class.isAssignableFrom(option.getType()) || Integer.class.isAssignableFrom(option.getType())) { Integer.parseInt(value); } else if (float.class.isAssignableFrom(option.getType()) || Float.class.isAssignableFrom(option.getType())) { Float.parseFloat(value); } else if (double.class.isAssignableFrom(option.getType()) || Double.class.isAssignableFrom(option.getType())) { Double.parseDouble(value); } else if (short.class.isAssignableFrom(option.getType()) || Short.class.isAssignableFrom(option.getType())) { Short.parseShort(value); } } catch (NumberFormatException e) { throw new RuntimeException(String.format( "The value '%s' is the wrong type for option '%s'. The required type is %s.", value, option.getName(), option.getType().getSimpleName())); } } }
Source:
<code>public OrcOutputBuffer(CompressionKind compression, int maxBufferSize) { requireNonNull(compression, "compression is null"); checkArgument(maxBufferSize > 0, "maximum buffer size should be greater than 0"); this.maxBufferSize = maxBufferSize; this.buffer = new byte[INITIAL_BUFFER_SIZE]; this.slice = wrappedBuffer(buffer); compressedOutputStream = new ChunkedSliceOutput(MINIMUM_OUTPUT_BUFFER_CHUNK_SIZE, MAXIMUM_OUTPUT_BUFFER_CHUNK_SIZE); <START> this.compressionBuffer = new byte[0]; <END> if (compression == CompressionKind.NONE) { this.compressor = null; } else if (compression == CompressionKind.SNAPPY) { this.compressor = new SnappyCompressor(); } else if (compression == CompressionKind.ZLIB) { this.compressor = new DeflateCompressor(); } else if (compression == CompressionKind.LZ4) { this.compressor = new Lz4Compressor(); } else { throw new IllegalArgumentException("Unsupported compression " + compression); } }</code><technical_language>put this in field declaration</technical_language>

Target:
public OrcOutputBuffer(CompressionKind compression, int maxBufferSize) { requireNonNull(compression, "compression is null"); checkArgument(maxBufferSize > 0, "maximum buffer size should be greater than 0"); this.maxBufferSize = maxBufferSize; this.buffer = new byte[INITIAL_BUFFER_SIZE]; this.slice = wrappedBuffer(buffer); compressedOutputStream = new ChunkedSliceOutput(MINIMUM_OUTPUT_BUFFER_CHUNK_SIZE, MAXIMUM_OUTPUT_BUFFER_CHUNK_SIZE); if (compression == CompressionKind.NONE) { this.compressor = null; } else if (compression == CompressionKind.SNAPPY) { this.compressor = new SnappyCompressor(); } else if (compression == CompressionKind.ZLIB) { this.compressor = new DeflateCompressor(); } else if (compression == CompressionKind.LZ4) { this.compressor = new Lz4Compressor(); } else { throw new IllegalArgumentException("Unsupported compression " + compression); } }
Source:
<code>public void testTupleSaving() throws Exception { String script = "REGISTER "+ Provisioner.ESHADOOP_TESTING_JAR + ";" + "answers = LOAD 'src/itest/resources/tuple.txt' using PigStorage(',') as (id:int, parentId:int, score:int);" + "grouped = GROUP answers by id;" + "ILLUSTRATE grouped;" + <START> "STORE grouped into '"+resource("pig-test-tuple-structure", "data")+"' using org.elasticsearch.hadoop.pig.EsStorage('es.mapping.pig.tuple.use.field.names = true');"; <END> pig.executeScript(script); String string = RestUtils.get("pig-test-tuple-structure/_search"); assertThat(string, containsString("parentId")); }</code><technical_language>nit: String.format allow this read ? (opinion)</technical_language>

Target:
public void testTupleSaving() throws Exception { String script = "REGISTER "+ Provisioner.ESHADOOP_TESTING_JAR + ";" + "answers = LOAD 'src/itest/resources/tuple.txt' using PigStorage(',') as (id:int, parentId:int, score:int);" + "grouped = GROUP answers by id;" + "ILLUSTRATE grouped;" + "STORE grouped into '"+resource("pig-test-tuple-structure", "data", VERSION)+"' using org.elasticsearch.hadoop.pig.EsStorage('es.mapping.pig.tuple.use.field.names = true');"; pig.executeScript(script); String string = RestUtils.get("pig-test-tuple-structure/_search"); assertThat(string, containsString("parentId")); }
Source:
<code>public void emptyChangeSet_findAllAsync(){ Realm realm = looperThread.realm; populateData(realm, 10); final RealmResults<AllTypes> results = realm.where(AllTypes.class).findAllSortedAsync(AllTypes.FIELD_LONG); results.addChangeListener(new OrderedRealmCollectionChangeListener<RealmResults<AllTypes>>() { @Override public void onChange(RealmResults<AllTypes> collection, OrderedCollectionChangeSet changes) { assertSame(collection, results); assertEquals(9, collection.size()); assertNull(changes); looperThread.testComplete(); } }); final CountDownLatch bgDeletionLatch = new CountDownLatch(1); <START> new Thread(new Runnable() { <END> @Override public void run() { Realm realm = Realm.getInstance(looperThread.realmConfiguration) ; realm.beginTransaction(); realm.where(AllTypes.class).equalTo(AllTypes.FIELD_LONG, 0).findFirst().deleteFromRealm(); realm.commitTransaction(); realm.close(); bgDeletionLatch.countDown(); } }).start(); TestHelper.awaitOrFail(bgDeletionLatch); }</code><technical_language>reason this is running in a seperate thread</technical_language>

Target:
public void emptyChangeSet_findAllAsync(){ Realm realm = looperThread.realm; populateData(realm, 10); final RealmResults<AllTypes> results = realm.where(AllTypes.class).findAllSortedAsync(AllTypes.FIELD_LONG); results.addChangeListener(new OrderedRealmCollectionChangeListener<RealmResults<AllTypes>>() { @Override public void onChange(RealmResults<AllTypes> collection, OrderedCollectionChangeSet changeSet) { assertSame(collection, results); assertEquals(9, collection.size()); assertNull(changeSet); looperThread.testComplete(); } }); final CountDownLatch bgDeletionLatch = new CountDownLatch(1); new Thread(new Runnable() { @Override public void run() { Realm realm = Realm.getInstance(looperThread.realmConfiguration) ; realm.beginTransaction(); realm.where(AllTypes.class).equalTo(AllTypes.FIELD_LONG, 0).findFirst().deleteFromRealm(); realm.commitTransaction(); realm.close(); bgDeletionLatch.countDown(); } }).start(); TestHelper.awaitOrFail(bgDeletionLatch); }
Source:
<code>public AllelicCountCollection(final File inputFile) { Utils.nonNull(inputFile); Utils.regularReadableUserFile(inputFile); <START> try (final TableReader<AllelicCount> reader = TableUtils.reader(inputFile, <END> (columns, formatExceptionFactory) -> { if (columns.containsAll(AllelicCountTableColumns.FULL_COLUMN_NAME_ARRAY)) { return AllelicCount.fullParser; } if (columns.containsAll(AllelicCountTableColumns.INTERMEDIATE_COLUMN_NAME_ARRAY)) { return AllelicCount.intermediateParser; } if (columns.containsAll(AllelicCountTableColumns.BASIC_COLUMN_NAME_ARRAY)) { return AllelicCount.basicParser; } throw formatExceptionFactory.apply("The AllelicCountCollection input file does not have the" + " mandatory colums. Required: " + StringUtils.join( AllelicCountTableColumns.BASIC_COLUMN_NAME_ARRAY, ", ")); })) { counts = reader.stream().collect(Collectors.toList()); } catch (final IOException | UncheckedIOException e) { throw new UserException.CouldNotReadInputFile(inputFile, e); } }</code><technical_language>Instead of inlined I create a proper class called AllelicCountReader extends TableReader<AllelicCount>. a substantial amount of code for class worth hassle. this this try-catch more natural; right is grown large "tumor" in resource initializer statement</technical_language>

Target:
public AllelicCountCollection(final File inputFile) { Utils.nonNull(inputFile); Utils.regularReadableUserFile(inputFile); try (final AllelicCountReader reader = new AllelicCountReader(inputFile)) { counts = reader.stream().collect(Collectors.toList()); } catch (final IOException | UncheckedIOException e) { throw new UserException.CouldNotReadInputFile(inputFile, e); } }
Source:
<code>public boolean onTouchEvent(MotionEvent ev) { <START> return getAdapter() == null || super.onTouchEvent(ev); <END> }</code><technical_language>getAdapter() mAdapter</technical_language>

Target:
public boolean onTouchEvent(MotionEvent ev) { return mAdapter == null || super.onTouchEvent(ev); }
Source:
<code><START> public static synchronized void initXmlParser() throws Exception { <END> xmlParser = DocumentBuilderFactory.newInstance().newDocumentBuilder(); attributeNames = ImmutableList.of("columns", "foreign-keys", "indexes", "primary-keys", "sequences", "tables", "unique-constraints", "views"); }</code><technical_language>this is a false positive. @BeforeClass methods invoked class, this is guaranteed JUnit. I moved variable assignments this method declaration</technical_language>

Target:
public static void initXmlParser() throws Exception { xmlParser = DocumentBuilderFactory.newInstance().newDocumentBuilder(); attributeNames = ImmutableList.of("columns", "foreign-keys", "indexes", "primary-keys", "sequences", "tables", "unique-constraints", "views"); }
Source:
<code>default CompletableFuture<Void> applyToAll(Consumer<Subject> action, Set<String> identifiers) { Preconditions.checkNotNull(action, "action"); Preconditions.checkNotNull(identifiers, "identifiers"); return CompletableFuture.runAsync(() -> { for (String id : identifiers) { try { Subject s = loadSubject(id).get(); action.accept(s); suggestUnload(s.getIdentifier()); } catch (Exception e) { <START> e.printStackTrace(); <END> } } }); }</code><technical_language>is wise print stack console. log slf4j a Logging framework cancel execution. I fine if a reference exception happened add others suppressed invocation propagate exception up</technical_language>

Target:
default CompletableFuture<Void> applyToAll(Consumer<Subject> action, Set<String> identifiers) { Preconditions.checkNotNull(action, "action"); Preconditions.checkNotNull(identifiers, "identifiers"); return CompletableFuture.runAsync(() -> { for (String id : identifiers) { Subject subject = loadSubject(id).join(); action.accept(subject); suggestUnload(subject.getIdentifier()); } }); }
Source:
<code>public byte[] rawValue(final V value) { try { return valueSerde.serializer().serialize(topic, value); } catch (final ClassCastException e) { final String valueClass; final Class<? extends Serializer> serializerClass; if (valueSerializer() instanceof ValueAndTimestampSerializer) { serializerClass = ((ValueAndTimestampSerializer) valueSerializer()).valueSerializer.getClass(); valueClass = value == null ? "unknown because value is null" : ((ValueAndTimestamp) value).value().getClass().getName(); } else { serializerClass = valueSerializer().getClass(); valueClass = value == null ? "unknown because value is null" : value.getClass().getName(); <START> } <END> throw new StreamsException( String.format("A serializer (value: %s) is not compatible to the actual value type " + "(value type: %s). Change the default Serdes in StreamConfig or " + "provide correct Serdes via method parameters.", serializerClass.getName(), valueClass), e); } }</code><technical_language>nit: I felt remove in (value: %s) below</technical_language>

Target:
public byte[] rawValue(final V value) { try { return valueSerde.serializer().serialize(topic, value); } catch (final ClassCastException e) { final String valueClass; final Class<? extends Serializer> serializerClass; if (valueSerializer() instanceof ValueAndTimestampSerializer) { serializerClass = ((ValueAndTimestampSerializer) valueSerializer()).valueSerializer.getClass(); valueClass = value == null ? "unknown because value is null" : ((ValueAndTimestamp) value).value().getClass().getName(); } else { serializerClass = valueSerializer().getClass(); valueClass = value == null ? "unknown because value is null" : value.getClass().getName(); } throw new StreamsException( String.format("A serializer (%s) is not compatible to the actual value type " + "(value type: %s). Change the default Serdes in StreamConfig or " + "provide correct Serdes via method parameters.", serializerClass.getName(), valueClass), e); } }
Source:
<code>public String processElement(ParserContext handlerManager, Element element) throws ConfigurationException { <START> String executeAfterId = element.getTextContent(); <END> return executeAfterId; }</code><technical_language>Need throw a validation exception if this is missing. (Like existing handlers.)</technical_language>

Target:
public String processElement(ParserContext handlerManager, Element element) throws ConfigurationException { String executeAfterId = element.getTextContent(); if(executeAfterId == null || executeAfterId.equals("")) { throw new WindupXMLRulesetParsingException("The '" + EXECUTE_AFTER_ELEMENT + "' must contain non-empty text value"); } return executeAfterId; }
Source:
<code>public DataSection genesBody(Patient patient) throws Exception { String sectionName = "genes"; Set<String> present = this.enabledHeaderIdsBySection.get(sectionName); if (present == null || present.isEmpty()) { return null; } DataSection section = new DataSection(sectionName); <START> int Y = 0; <END> if (present.contains("candidate")) { PatientData<Map<String, String>> candidateGenes = patient.getData("genes"); if (candidateGenes != null && candidateGenes.isIndexed()) { for (Map<String, String> candidateGene : candidateGenes) { DataCell cell = new DataCell("candidate", 0, Y); section.addCell(cell); String geneName = candidateGene.get("gene"); cell = new DataCell(geneName, 1, Y); section.addCell(cell); if (present.contains("comments")) { String comment = candidateGene.get("comments"); cell = new DataCell(comment, 2, Y); section.addCell(cell); } Y++; } } } if (present.contains("rejected")) { PatientData<Map<String, String>> rejectedGenes = patient.getData("rejectedGenes"); if (rejectedGenes != null && rejectedGenes.isIndexed()) { for (Map<String, String> rejectedGene : rejectedGenes) { DataCell cell = new DataCell("Previously tested", 0, Y); section.addCell(cell); String geneName = rejectedGene.get("gene"); cell = new DataCell(geneName, 1, Y); section.addCell(cell); if (present.contains("rejected_comments")) { String comment = rejectedGene.get("comments"); cell = new DataCell(comment, 2, Y); section.addCell(cell); } Y++; } } } return section; }</code><technical_language>int y</technical_language>

Target:
public DataSection genesBody(Patient patient) throws Exception { String sectionName = "genes"; Set<String> present = this.enabledHeaderIdsBySection.get(sectionName); if (present == null || present.isEmpty()) { return null; } DataSection section = new DataSection(sectionName); int y = 0; if (present.contains("candidate")) { PatientData<Map<String, String>> candidateGenes = patient.getData("genes"); if (candidateGenes != null && candidateGenes.isIndexed()) { DataCell cell = new DataCell("Candidate", 0, y); section.addCell(cell); for (Map<String, String> candidateGene : candidateGenes) { String geneName = candidateGene.get("gene"); cell = new DataCell(geneName, 1, y); section.addCell(cell); if (present.contains("comments")) { String comment = candidateGene.get("comments"); cell = new DataCell(comment, 2, y); section.addCell(cell); } y++; } } } if (present.contains("rejected")) { PatientData<Map<String, String>> rejectedGenes = patient.getData("rejectedGenes"); if (rejectedGenes != null && rejectedGenes.isIndexed()) { DataCell cell = new DataCell("Previously tested", 0, y, StyleOption.YES_NO_SEPARATOR); section.addCell(cell); for (Map<String, String> rejectedGene : rejectedGenes) { String geneName = rejectedGene.get("gene"); cell = new DataCell(geneName, 1, y); section.addCell(cell); if (present.contains("rejected_comments")) { String comment = rejectedGene.get("comments"); cell = new DataCell(comment, 2, y); section.addCell(cell); } y++; } } } return section; }
Source:
<code>private static int getFileLength(File file) throws IOException { int lines = 0; <START> BufferedReader reader = Files.newBufferedReader(file.toPath(), UTF_8); <END> while (reader.readLine() != null) { lines++; } reader.close(); return lines; }</code><technical_language>try-with-resources, code more concise ensure reader is closed if exception is thrown</technical_language>

Target:
private static int getFileLength(File file) throws IOException { int lines = 0; try (BufferedReader reader = Files.newBufferedReader(file.toPath(), UTF_8)) { while (reader.readLine() != null) { lines++; } } return lines; }
Source:
<code>private File convertInputStreamToFile(InputStream inputStream, Long size) throws IOException { OutputStream out = null; try { File file = new File(fileNameOrId); out = new FileOutputStream(file); <START> byte[] bytes = new byte[size.intValue()]; <END> int read = 0; while ((read = inputStream.read(bytes)) != -1) { length += read; out.write(Base64.decodeBase64(bytes)); out.flush(); } inputStream.close(); out.close(); return file; } catch (IOException e) { throw e; } finally { inputStream.close(); if (out != null) { out.close(); } } }</code><technical_language>bytes array is a buffer. For small files is ok size of file buffer length, greater max of integer (roughly 2GB, 2^31-1), pass a long a parameter signature of method converting intValue? For files greater 2Gb size a Long, create a buffer of size, get OutOfMemoryException. a sane default buffer? a mixture of approaches, checking if file size is smaller threshold, file size buffer size, a default buffer size</technical_language>

Target:
private File convertInputStreamToFile(InputStream inputStream, Long size) throws IOException { OutputStream out = null; try { File file = new File(fileNameOrId); out = new FileOutputStream(file); int bufferSize = size.intValue() < 8192 ? size.intValue() : 8192; byte[] bytes = new byte[bufferSize]; int read = 0; while ((read = inputStream.read(bytes)) != -1) { length += read; out.write(Base64.decodeBase64(bytes)); out.flush(); } inputStream.close(); out.close(); return file; } catch (IOException e) { throw e; } finally { inputStream.close(); if (out != null) { out.close(); } } }
Source:
<code>public void onCompleted() { if (done) { return; } List<GroupedUnicast<K, V>> list = new ArrayList<GroupedUnicast<K, V>>(groups.values()); groups.clear(); <START> for (GroupedUnicast<K, V> e : list) { <END> e.onComplete(); } done = true; GROUP_COUNT.decrementAndGet(this); drain(); }</code><technical_language>iterate groups.values() avoid list allocation? want array structure for performance? If so, winning big iterating values() in constructor of ArrayList here</technical_language>

Target:
public void onCompleted() { if (done) { return; } for (GroupedUnicast<K, V> e : groups.values()) { e.onComplete(); } groups.clear(); done = true; GROUP_COUNT.decrementAndGet(this); drain(); }
Source:
<code><START> public List<DiskImage> asList() { return memoryDisk == null && metadataDisk == null ? List.of() : List.of(memoryDisk, metadataDisk); } <END></code><technical_language>This allocates a new immutable list time invoke, please cache list in initial creating if exists return</technical_language>

Target:
public List<DiskImage> asList() { if (diskList == null) { diskList = memoryDisk == null && metadataDisk == null ? List.of() : List.of(memoryDisk, metadataDisk); } return diskList; }
Source:
<code>public static DatastreamPositionResponse merge(DatastreamPositionResponse first, DatastreamPositionResponse second) { DatastreamPositionResponse response = new DatastreamPositionResponse(); <START> first.getDatastreams() <END> .forEach((datastream, sources) -> sources.getPhysicalSources() .forEach((source, position) -> response.updatePosition(datastream, source, position))); second.getDatastreams() .forEach((datastream, sources) -> sources.getPhysicalSources() .forEach((source, position) -> response.updatePosition(datastream, source, position))); return response; }</code><technical_language>Do need PhysicalSources get responses mutually exclusive? Is a scenario responses for PhysicalSource</technical_language>

Target:
public static DatastreamPositionResponse merge(DatastreamPositionResponse first, DatastreamPositionResponse second) { DatastreamPositionResponse result = new DatastreamPositionResponse(); first.getDatastreamToPhysicalSources().forEach((datastream, sources) -> sources.getPhysicalSourceToPosition().forEach((source, position) -> result.update(datastream, source, position))); second.getDatastreamToPhysicalSources().forEach((datastream, sources) -> sources.getPhysicalSourceToPosition().forEach((source, position) -> result.update(datastream, source, position))); return result; }
Source:
<code>public synchronized double getBPSAtoB() { <START> if (DoubleMath.fuzzyEquals(getDuration(), 0, Double.MIN_VALUE)) { <END> return 0; } return fNbBytesAtoB / getDuration(); }</code><technical_language>a small tolerance! This is concept delta in assertEquals(double, double, delta), similar 0.001? (or add some zeroes handle microseconds/nanoseconds etc.)</technical_language>

Target:
public synchronized double getBPSAtoB() { if (DoubleMath.fuzzyEquals(getDuration(), 0, DELTA)) { return 0; } return fNbBytesAtoB / getDuration(); }
Source:
<code>public void restart(String settingId, String noteId) { InterpreterSetting intpsetting = interpreterSettings.get(settingId); if (intpsetting != null && <START> noteIdIsExist(noteId) && <END> intpsetting.getOption().isProcess()) { intpsetting.closeAndRemoveInterpreterGroup(noteId); return; } restart(settingId); }</code><technical_language>I Preconditions instead of checking null yourself</technical_language>

Target:
public void restart(String settingId, String noteId) { InterpreterSetting intpsetting = interpreterSettings.get(settingId); Preconditions.checkNotNull(intpsetting); if (noteIdIsExist(noteId) && intpsetting.getOption().isProcess()) { intpsetting.closeAndRemoveInterpreterGroup(noteId); return; } restart(settingId); }
Source:
<code><START> public static Executor of(Executable executable) { <END> Jenkins jenkins = Jenkins.getInstance(); if (jenkins == null) { return null; } for (Computer computer : jenkins.getComputers()) { for (Executor executor : computer.getExecutors()) { if (executor.getCurrentExecutable() == executable) { return executor; } } for (Executor executor : computer.getOneOffExecutors()) { if (executor.getCurrentExecutable() == executable) { return executor; } } } return null; }</code><technical_language>@CheckForNull</technical_language>

Target:
public static @CheckForNull Executor of(Executable executable) { Jenkins jenkins = Jenkins.getInstance(); if (jenkins == null) { return null; } for (Computer computer : jenkins.getComputers()) { for (Executor executor : computer.getExecutors()) { if (executor.getCurrentExecutable() == executable) { return executor; } } for (Executor executor : computer.getOneOffExecutors()) { if (executor.getCurrentExecutable() == executable) { return executor; } } } return null; }
Source:
<code>public void testString() { ToolTipString empty = ToolTipString.fromString(""); ToolTipString complicatedString = ToolTipString.fromString("¯\\_(ツ)_/¯"); assertNotNull(empty); <START> assertNotNull(complicatedString); <END> assertEquals("", empty.toString()); assertEquals("¯\\_(ツ)_/¯", complicatedString.toString()); assertEquals("", empty.toHtmlString()); assertEquals("&macr;\\_(ツ)_/&macr;", complicatedString.toHtmlString()); }</code><technical_language>necessary, test fail</technical_language>

Target:
public void testString() { ToolTipString empty = ToolTipString.fromString(""); ToolTipString complicatedString = ToolTipString.fromString("¯\\_(ツ)_/¯"); assertEquals("", empty.toString()); assertEquals("¯\\_(ツ)_/¯", complicatedString.toString()); assertEquals("", empty.toHtmlString()); assertEquals("&macr;\\_(ツ)_/&macr;", complicatedString.toHtmlString()); }
Source:
<code><START> private boolean kfsVendorMaintenanceDocumentValidatedForSave(MaintenanceDocument vendorMaintenceDoc, PaymentWorksNewVendorRequestsBatchReportData reportData, PaymentWorksVendor pmwVendor) { <END> boolean documentValidated = false; try { vendorMaintenceDoc.validateBusinessRules(new SaveDocumentEvent(vendorMaintenceDoc)); LOG.info("kfsVendorMaintenanceDocumentValidatedForSave: vendorMaintenceDoc validate."); documentValidated = true; } catch (ValidationException ve) { List<String> validationErrors = getPaymentWorksBatchUtilityService().convertReportDataValidationErrors(GlobalVariables.getMessageMap().getErrorMessages()); captureKfsProcessingErrorsForVendor(pmwVendor, reportData, validationErrors); LOG.error("kfsVendorMaintenanceDocumentValidatedForSave: eDoc validation error(s): " + validationErrors.toString()); LOG.error("kfsVendorMaintenanceDocumentValidatedForSave: eDoc validation exception caught: " + ve.getMessage()); } finally { GlobalVariables.getMessageMap().clearErrorMessages(); } return documentValidated; }</code><technical_language>a fair amount of duplicate logic save route validation methods. If practical, good consolidate some of setup</technical_language>

Target:
private boolean kfsVendorMaintenanceDocumentValidatedForSave(MaintenanceDocument vendorMaintenceDoc, PaymentWorksNewVendorRequestsBatchReportData reportData, PaymentWorksVendor pmwVendor) { return kfsVendorMaintenanceDocumentValidatedForEvent(vendorMaintenceDoc, reportData, pmwVendor, new SaveDocumentEvent(vendorMaintenceDoc)); }
Source:
<code>public JavaScriptHeaderItem setNonce(String nonce) { <START> Args.notNull(nonce, "nonce"); <END> this.nonce = nonce; return this; }</code><technical_language>nonEmpty</technical_language>

Target:
public JavaScriptHeaderItem setNonce(String nonce) { this.nonce = nonce; return this; }
Source:
<code>public @NonNull Map<@NonNull String, @NonNull String> getWorkerInformation(long t) { try { int tid = fHostTid.getTid(); if (tid == -1) { return Collections.EMPTY_MAP; } <START> @Nullable KernelAnalysisModule <END> kam = TmfTraceManager.getInstance().getActiveTraceSet().stream() .filter(trace -> trace.getHostId().equals(getHostId())) .map(trace -> TmfTraceUtils.getAnalysisModuleOfClass(trace, KernelAnalysisModule.class, KernelAnalysisModule.ID)) .filter(mod -> mod != null) .findFirst().get(); ITmfStateSystem ss = kam.getStateSystem(); if (ss == null) { return Collections.EMPTY_MAP; } int quark; Map<String, String> info = new HashMap<>(); quark = ss.getQuarkAbsolute(Attributes.THREADS, Integer.toString(tid), Attributes.PRIO); ITmfStateInterval interval = ss.querySingleState(t, quark); ITmfStateValue stateValue = interval.getStateValue(); if (stateValue.getType().equals(ITmfStateValue.Type.INTEGER)) { info.put(NonNullUtils.nullToEmptyString(Messages.LttngWorker_threadPriority), Integer.toString(stateValue.unboxInt())); } return info; } catch (AttributeNotFoundException | StateSystemDisposedException e) { Activator.getDefault().logError(e.getMessage(), e); } return Collections.EMPTY_MAP; }</code><technical_language>I guess longer @Nullable</technical_language>

Target:
public @NonNull Map<@NonNull String, @NonNull String> getWorkerInformation(long t) { try { int tid = fHostTid.getTid(); if (tid == -1) { return Collections.EMPTY_MAP; } Optional<KernelAnalysisModule> kam = TmfTraceManager.getInstance().getActiveTraceSet().stream() .filter(trace -> trace.getHostId().equals(getHostId())) .map(trace -> TmfTraceUtils.getAnalysisModuleOfClass(trace, KernelAnalysisModule.class, KernelAnalysisModule.ID)) .filter(mod -> mod != null) .findFirst(); if (!kam.isPresent()) { return Collections.EMPTY_MAP; } ITmfStateSystem ss = kam.get().getStateSystem(); if (ss == null) { return Collections.EMPTY_MAP; } int quark; Map<String, String> info = new HashMap<>(); quark = ss.getQuarkAbsolute(Attributes.THREADS, Integer.toString(tid), Attributes.PRIO); ITmfStateInterval interval = ss.querySingleState(t, quark); ITmfStateValue stateValue = interval.getStateValue(); if (stateValue.getType().equals(ITmfStateValue.Type.INTEGER)) { info.put(NonNullUtils.nullToEmptyString(Messages.LttngWorker_threadPriority), Integer.toString(stateValue.unboxInt())); } return info; } catch (AttributeNotFoundException | StateSystemDisposedException e) { Activator.getDefault().logError(e.getMessage(), e); } return Collections.EMPTY_MAP; }
Source:
<code>public void testAsyncTaskWithSinglePartition() throws Exception { List<Integer> inputList = Arrays.asList(1, 2, 3, 4, 5); List<Integer> outputList = Arrays.asList(10, 20, 30, 40, 50); InMemorySystemDescriptor isd = new InMemorySystemDescriptor("async-test"); <START> InMemoryInputDescriptor<Integer> imid = isd <END> .getInputDescriptor("ints", new NoOpSerde<Integer>()) .withData(inputList); InMemoryOutputDescriptor imod = isd .getOutputDescriptor("ints-out", new NoOpSerde<>()) .withPartitionCount(1); TestRunner .of(MyAsyncStreamTask.class) .addInputStream(imid) .addOutputStream(imod) .run(Duration.ofSeconds(2)); Assert.assertThat(TestRunner.consumeStream(imod, Duration.ofMillis(1000)).get(0), IsIterableContainingInOrder.contains(outputList.toArray())); }</code><technical_language>Unrelated this PR, this (and other) class name TestAsyncStreamTask for consistency other tests</technical_language>

Target:
public void testAsyncTaskWithSinglePartition() throws Exception { List<Integer> inputList = Arrays.asList(1, 2, 3, 4, 5); List<Integer> outputList = Arrays.asList(10, 20, 30, 40, 50); InMemorySystemDescriptor isd = new InMemorySystemDescriptor("async-test"); InMemoryInputDescriptor<Integer> imid = isd .getInputDescriptor("ints", new NoOpSerde<Integer>()); InMemoryOutputDescriptor imod = isd .getOutputDescriptor("ints-out", new NoOpSerde<>()); TestRunner .of(MyAsyncStreamTask.class) .addInputStream(imid, inputList) .addOutputStream(imod, 1) .run(Duration.ofSeconds(2)); Assert.assertThat(TestRunner.consumeStream(imod, Duration.ofMillis(1000)).get(0), IsIterableContainingInOrder.contains(outputList.toArray())); }
Source:
<code>private int computeOffsetAtLocation(ITextViewer textViewer, int x, int y) { StyledText styledText= textViewer.getTextWidget(); IDocument document= textViewer.getDocument(); if (document == null) return -1; try { int widgetOffset= styledText.getOffsetAtPoint(new Point(x, y)); Point p= <START> styledText.getLocationAtOffset(widgetOffset); <END> if (p.x > x) { widgetOffset--; } if (textViewer instanceof ITextViewerExtension5) { ITextViewerExtension5 extension= (ITextViewerExtension5) textViewer; return extension.widgetOffset2ModelOffset(widgetOffset); } IRegion visibleRegion= textViewer.getVisibleRegion(); return widgetOffset + visibleRegion.getOffset(); } catch (IllegalArgumentException e) { return -1; } }</code><technical_language>rebase reverted changes? -1 passed causing exception</technical_language>

Target:
private int computeOffsetAtLocation(ITextViewer textViewer, int x, int y) { StyledText styledText= textViewer.getTextWidget(); IDocument document= textViewer.getDocument(); int widgetOffset = styledText.getOffsetAtPoint(new Point(x, y)); if (document == null || widgetOffset == -1) { return -1; } try { Point p= styledText.getLocationAtOffset(widgetOffset); if (p.x > x) { widgetOffset--; } if (textViewer instanceof ITextViewerExtension5) { ITextViewerExtension5 extension= (ITextViewerExtension5) textViewer; return extension.widgetOffset2ModelOffset(widgetOffset); } IRegion visibleRegion= textViewer.getVisibleRegion(); return widgetOffset + visibleRegion.getOffset(); } catch (IllegalArgumentException e) { return -1; } }
Source:
<code>public File move(File src, File dest) throws IOException { assertSessionCreated(); try { session.moveFile(src, dest); } catch (Exception e) { <START> throw new ResourceTransactionException("Error while copying file from " + src + " to " + dest, e); <END> } }</code><technical_language>"Error while moving file ..."</technical_language>

Target:
public File move(File src, File dest) throws IOException { assertSessionCreated(); try { session.moveFile(src, dest); return dest; } catch (Exception e) { throw new ResourceTransactionException("Error while moving file from " + src + " to " + dest, e); } }