type stringclasses 1
value | dataset stringclasses 1
value | input stringlengths 75 160k | instruction stringlengths 117 171 | output stringlengths 88 168k |
|---|---|---|---|---|
Inversion-Mutation | megadiff | "@Override
public void handleEvent(OperationEvent event) {
if(event instanceof AuditTrailResult) {
AuditTrailResult auditResult = (AuditTrailResult) event;
if (!auditResult.getCollectionID().equals(collectionID)) {
log.warn("Received bad colle... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "handleEvent" | "@Override
public void handleEvent(OperationEvent event) {
if(event instanceof AuditTrailResult) {
AuditTrailResult auditResult = (AuditTrailResult) event;
if (!auditResult.getCollectionID().equals(collectionID)) {
log.warn("Received bad colle... |
Inversion-Mutation | megadiff | "private String buildFile (IPath filePath, IFile makefile, IManagedBuildInfo info) {
String outString = "";
IPath dir = makefile.getFullPath().removeLastSegments(1);
IPath relFilePath = filePath.removeFirstSegments(dir.segmentCount());
CommandLauncher launcher = new CommandLauncher();
String[] env = null... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "buildFile" | "private String buildFile (IPath filePath, IFile makefile, IManagedBuildInfo info) {
String outString = "";
IPath dir = makefile.getFullPath().removeLastSegments(1);
IPath relFilePath = filePath.removeFirstSegments(dir.segmentCount());
CommandLauncher launcher = new CommandLauncher();
String[] env = null... |
Inversion-Mutation | megadiff | "public Object getConnectionHandle(boolean recycle) throws Exception {
if (isFailed()) {
synchronized (this) {
try {
if (isFailed()) {
if (log.isDebugEnabled()) { log.debug("resource '" + bean.getUniqueName() + "' is marked as failed, ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getConnectionHandle" | "public Object getConnectionHandle(boolean recycle) throws Exception {
if (isFailed()) {
synchronized (this) {
try {
if (isFailed()) {
if (log.isDebugEnabled()) { log.debug("resource '" + bean.getUniqueName() + "' is marked as failed, ... |
Inversion-Mutation | megadiff | "@Test
public void testBuildNavigation() {
Collection<PageConfiguration> confs = new ArrayList<PageConfiguration>();
PageConfiguration conf = new PageConfiguration();
conf.setPageClass(LoginPage.class);
confs.add(conf);
moduleServiceMock.rebuildModuleLinks();
e... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "testBuildNavigation" | "@Test
public void testBuildNavigation() {
Collection<PageConfiguration> confs = new ArrayList<PageConfiguration>();
PageConfiguration conf = new PageConfiguration();
conf.setPageClass(LoginPage.class);
confs.add(conf);
expect(pageLocatorMock.getPageConfigurations()).a... |
Inversion-Mutation | megadiff | "public static Test suite() {
TestSuite suite = new TestSuite("Test for org.eclipse.mylar.tests");
//$JUnit-BEGIN$
// NOTE: the order of these tests matters
// TODO: make tests clear workbench state on completion
suite.addTest(AllMonitorTests.suite());
sui... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "suite" | "public static Test suite() {
TestSuite suite = new TestSuite("Test for org.eclipse.mylar.tests");
//$JUnit-BEGIN$
// NOTE: the order of these tests matters
// TODO: make tests clear workbench state on completion
suite.addTest(AllMonitorTests.suite());
sui... |
Inversion-Mutation | megadiff | "private void saveToRecorder(ProcessorURI curi,
Socket socket, Recorder recorder)
throws IOException, InterruptedException {
recorder.inputWrap(socket.getInputStream());
recorder.outputWrap(socket.getOutputStream());
recorder.markContentBegin();
// Read the remo... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "saveToRecorder" | "private void saveToRecorder(ProcessorURI curi,
Socket socket, Recorder recorder)
throws IOException, InterruptedException {
<MASK>recorder.markContentBegin();</MASK>
recorder.inputWrap(socket.getInputStream());
recorder.outputWrap(socket.getOutputStream());
// ... |
Inversion-Mutation | megadiff | "public void destroy()
{
mCache.destroy();
// close all listeners
final Iterator it = mListeners.iterator();
while (it.hasNext()) {
final AuditListener listener = (AuditListener) it.next();
final OutputStream os = listener.getOutputStream();
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "destroy" | "public void destroy()
{
mCache.destroy();
// close all listeners
final Iterator it = mListeners.iterator();
while (it.hasNext()) {
final AuditListener listener = (AuditListener) it.next();
final OutputStream os = listener.getOutputStream();
... |
Inversion-Mutation | megadiff | "public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
EvaluationContextManager.startup();
Protocol.invokeLater(new Runnable() {
public void run() {
if (bp_status_listener == null) bp_status_listener = new TCFBr... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "start" | "public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
Protocol.invokeLater(new Runnable() {
public void run() {
if (bp_status_listener == null) bp_status_listener = new TCFBreakpointStatusListener();
}
... |
Inversion-Mutation | megadiff | "public PAP deleteTrustedPAP(String papAlias) throws NotFoundException {
PAP pap = getPAP(papAlias);
distributionConfiguration.removePAP(papAlias);
papDAO.delete(papAlias);
papList.remove(pap);
return pap;
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "deleteTrustedPAP" | "public PAP deleteTrustedPAP(String papAlias) throws NotFoundException {
PAP pap = getPAP(papAlias);
<MASK>papList.remove(pap);</MASK>
distributionConfiguration.removePAP(papAlias);
papDAO.delete(papAlias);
return pap;
}" |
Inversion-Mutation | megadiff | "public synchronized void prune ( int numToKeep )
{
if (maxSize < 0)
return;
ArrayList<E> list = this.list;
int numToDelete = list.size() - numToKeep;
if (numToDelete <= 0)
return;
debug("prune() -> "+numToKeep);
sortIfWeShould();
List<E> deletionList = list.subList(0, numToDelete);
c... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "prune" | "public synchronized void prune ( int numToKeep )
{
if (maxSize < 0)
return;
<MASK>debug("prune() -> "+numToKeep);</MASK>
ArrayList<E> list = this.list;
int numToDelete = list.size() - numToKeep;
if (numToDelete <= 0)
return;
sortIfWeShould();
List<E> deletionList = list.subList(0, numTo... |
Inversion-Mutation | megadiff | "private void addNodeInformation(Netlist netList, HashMap<Network,SpiceNet> spiceNets, NodeInst ni)
{
// cells have no area or capacitance (for now)
if (ni.isCellInstance()) return; // No area for complex nodes
PrimitiveNode.Function function = ni.getFunction();
// initialize to examine the polygons ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "addNodeInformation" | "private void addNodeInformation(Netlist netList, HashMap<Network,SpiceNet> spiceNets, NodeInst ni)
{
// cells have no area or capacitance (for now)
if (ni.isCellInstance()) return; // No area for complex nodes
PrimitiveNode.Function function = ni.getFunction();
// initialize to examine the polygons ... |
Inversion-Mutation | megadiff | "public void mouseMoved(MouseEvent me) {
// Don't rotate unless they're actively looking at the window.
if(!gui.getImageWin().isFocused())
return;
if(me.isAltDown()) {
if(mouseStartX < 0) {
try {
stageStart[0] = mmc.getXPosition(xyStageLabel);
stageStart[1] = mmc.getYPosition(xyStag... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "mouseMoved" | "public void mouseMoved(MouseEvent me) {
// Don't rotate unless they're actively looking at the window.
if(!gui.getImageWin().isFocused())
return;
if(me.isAltDown()) {
if(mouseStartX < 0) {
<MASK>mouseStartX = me.getX();</MASK>
try {
stageStart[0] = mmc.getXPosition(xyStageLabel);
... |
Inversion-Mutation | megadiff | "@Override public void run() {
try {
Events events = Events.open(30000);
final Session session = new Session(getHeartBtIntValue(), getConfig(), getSessionStore(), getMessageFactory());
SocketChannel channel = SocketChannel.open();
channel.... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "@Override public void run() {
try {
Events events = Events.open(30000);
final Session session = new Session(getHeartBtIntValue(), getConfig(), getSessionStore(), getMessageFactory());
SocketChannel channel = SocketChannel.open();
channel.... |
Inversion-Mutation | megadiff | "private final TitanType makeTitanType(TitanTypeClass typeClass, String name, TypeAttribute.Map definition) {
verifyOpen();
Preconditions.checkArgument(StringUtils.isNotBlank(name));
TitanTypeVertex type;
if (typeClass==TitanTypeClass.KEY) {
TypeAttribute.isValidKeyDefin... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "makeTitanType" | "private final TitanType makeTitanType(TitanTypeClass typeClass, String name, TypeAttribute.Map definition) {
verifyOpen();
Preconditions.checkArgument(StringUtils.isNotBlank(name));
TitanTypeVertex type;
if (typeClass==TitanTypeClass.KEY) {
TypeAttribute.isValidKeyDefin... |
Inversion-Mutation | megadiff | "public void invokeServlet(SipRequest request) throws SipException
{
try
{
_invokingServlet = true;
_appSession.getContext().handle(request);
//getServer().handle(request);
}
catch (TooManyHopsException e)
{
throw new SipException(SipServletResponse.SC... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "invokeServlet" | "public void invokeServlet(SipRequest request) throws SipException
{
try
{
<MASK>_appSession.getContext().handle(request);</MASK>
_invokingServlet = true;
//getServer().handle(request);
}
catch (TooManyHopsException e)
{
throw new SipException(SipServl... |
Inversion-Mutation | megadiff | "public void doWrite(Query query) throws Exception {
Writer writer = connect();
try {
for (Result r : query.getResults()) {
if (isDebugEnabled()) {
log.debug(r.toString());
}
Map<String, Object> resultValues = r.getVa... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doWrite" | "public void doWrite(Query query) throws Exception {
Writer writer = connect();
try {
for (Result r : query.getResults()) {
if (isDebugEnabled()) {
log.debug(r.toString());
}
Map<String, Object> resultValues = r.getVa... |
Inversion-Mutation | megadiff | "public void addComponentAtStart(QName component) {
if(pos == components.length) {
QName[] t = new QName[pos + 1];
System.arraycopy(components, 0, t, 1, pos);
components = t;
components[0] = component;
} else {
System.arraycopy(components, 0, components, 1, pos... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "addComponentAtStart" | "public void addComponentAtStart(QName component) {
if(pos == components.length) {
QName[] t = new QName[pos + 1];
System.arraycopy(components, 0, t, 1, pos);
components = t;
components[0] = component;
} else {
System.arraycopy(components, 0, components, 1, pos... |
Inversion-Mutation | megadiff | "@Override
public void dispose() {
owner.getLoggerGUI().info("sto chiudendo l'interfaccia.");
owner.stopClient();
super.dispose();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "dispose" | "@Override
public void dispose() {
owner.getLoggerGUI().info("sto chiudendo l'interfaccia.");
<MASK>super.dispose();</MASK>
owner.stopClient();
}" |
Inversion-Mutation | megadiff | "public AnyViewParameters handle() {
try {
final String actionmethod = PostDecoder.decodeAction(normalizedmap);
// Do this FIRST in case it discovers any scopelocks required
presmanager.scopeRestore();
// invoke all state-altering operations within the runnable wrapper.
postwr... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "handle" | "public AnyViewParameters handle() {
<MASK>final String actionmethod = PostDecoder.decodeAction(normalizedmap);</MASK>
try {
// Do this FIRST in case it discovers any scopelocks required
presmanager.scopeRestore();
// invoke all state-altering operations within the runnable wrapper.
... |
Inversion-Mutation | megadiff | "private int createAndRunCluster(String clustername) throws Throwable {
//load the cluster description from the cd argument
String hoyaClusterDir = serviceArgs.hoyaClusterURI;
URI hoyaClusterURI = new URI(hoyaClusterDir);
Path clusterDirPath = new Path(hoyaClusterURI);
Path clusterSpecPath =
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createAndRunCluster" | "private int createAndRunCluster(String clustername) throws Throwable {
//load the cluster description from the cd argument
String hoyaClusterDir = serviceArgs.hoyaClusterURI;
URI hoyaClusterURI = new URI(hoyaClusterDir);
Path clusterDirPath = new Path(hoyaClusterURI);
Path clusterSpecPath =
... |
Inversion-Mutation | megadiff | "private void editCellAction(boolean newWindow)
{
Cell cell = null;
int pageNo = 1;
if (getCurrentlySelectedObject(0) instanceof Cell)
{
cell = (Cell)getCurrentlySelectedObject(0);
} else if (getCurrentlySelectedObject(0) instanceof ExplorerTreeModel.MultiPageCell)
{
ExplorerTreeMod... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "editCellAction" | "private void editCellAction(boolean newWindow)
{
Cell cell = null;
int pageNo = 1;
if (getCurrentlySelectedObject(0) instanceof Cell)
{
cell = (Cell)getCurrentlySelectedObject(0);
} else if (getCurrentlySelectedObject(0) instanceof ExplorerTreeModel.MultiPageCell)
{
ExplorerTreeMod... |
Inversion-Mutation | megadiff | "@Override
public void stop() {
long stopTime = System.nanoTime();
long current = 0;
while (!stopNanos.compareAndSet(current, stopTime)) {
current = stopNanos.get();
stopTime = Math.max(stopTime, current);
}
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "stop" | "@Override
public void stop() {
<MASK>long current = 0;</MASK>
long stopTime = System.nanoTime();
while (!stopNanos.compareAndSet(current, stopTime)) {
current = stopNanos.get();
stopTime = Math.max(stopTime, current);
}
}" |
Inversion-Mutation | megadiff | "@Test
public void rootTest5() {
l.setValues(Levels.INFO);
r.setLevel(l);
r.addAppenderRef("A1");
r.generateProperties(p);
testExpected("INFO, A1");
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "rootTest5" | "@Test
public void rootTest5() {
l.setValues(Levels.INFO);
r.setLevel(l);
<MASK>r.generateProperties(p);</MASK>
r.addAppenderRef("A1");
testExpected("INFO, A1");
}" |
Inversion-Mutation | megadiff | "@Override
public void onTabSelected(Tab tab, FragmentTransaction ft) {
ft = getSupportFragmentManager().beginTransaction();
ft.setCustomAnimations(android.R.anim.fade_in, android.R.anim.fade_out);
ft.replace(R.id.main_root, mFragments[tab.getPosition()]);
ft.commit();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onTabSelected" | "@Override
public void onTabSelected(Tab tab, FragmentTransaction ft) {
ft = getSupportFragmentManager().beginTransaction();
<MASK>ft.replace(R.id.main_root, mFragments[tab.getPosition()]);</MASK>
ft.setCustomAnimations(android.R.anim.fade_in, android.R.anim.fade_out);
ft.commit();
}" |
Inversion-Mutation | megadiff | "synchronized static void stop() {
if (server != null) {
server.stop();
}
initialized = false;
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "stop" | "synchronized static void stop() {
if (server != null) {
server.stop();
<MASK>initialized = false;</MASK>
}
}" |
Inversion-Mutation | megadiff | "@SuppressWarnings("fallthrough")
public TaskState doBuild() throws GameActionException {
// Build Chassis
if (builder.isActive()) return TaskState.ACTIVE;
switch(p) {
case -2:
// I shouldn't be able to build after a fail without initializing.
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doBuild" | "@SuppressWarnings("fallthrough")
public TaskState doBuild() throws GameActionException {
// Build Chassis
if (builder.isActive()) return TaskState.ACTIVE;
switch(p) {
case -2:
// I shouldn't be able to build after a fail without initializing.
... |
Inversion-Mutation | megadiff | "public WorkflowApp(AbstractWorkflowDataModel wfdm, String dir, boolean useSge, File seqwareJar,
String slotsSgeParamFormat, String maxMemorySgeParamFormat) {
this.wfdm = wfdm;
this.unqiueWorkingDir = dir;
this.jobs = new ArrayList<OozieJob>();
this.fileJobMap = new HashMap<Sqw... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "WorkflowApp" | "public WorkflowApp(AbstractWorkflowDataModel wfdm, String dir, boolean useSge, File seqwareJar,
String slotsSgeParamFormat, String maxMemorySgeParamFormat) {
this.wfdm = wfdm;
this.unqiueWorkingDir = dir;
this.jobs = new ArrayList<OozieJob>();
this.fileJobMap = new HashMap<Sqw... |
Inversion-Mutation | megadiff | "protected final Watchers getWatches(NotifyType type) throws OrmException {
Watchers matching = new Watchers();
Set<Account.Id> projectWatchers = new HashSet<Account.Id>();
for (AccountProjectWatch w : args.db.get().accountProjectWatches()
.byProject(change.getProject())) {
if (w.isNot... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getWatches" | "protected final Watchers getWatches(NotifyType type) throws OrmException {
Watchers matching = new Watchers();
Set<Account.Id> projectWatchers = new HashSet<Account.Id>();
for (AccountProjectWatch w : args.db.get().accountProjectWatches()
.byProject(change.getProject())) {
<MASK>projec... |
Inversion-Mutation | megadiff | "public void testTimeout() throws Exception {
DataSourceBean bean1 = new DataSourceBean();
bean1.setClassName(MockXADataSource.class.getName());
bean1.setUniqueName("pds1");
bean1.setPoolSize(5);
bean1.setAutomaticEnlistingEnabled(true);
DataSourceBean bean2 = new... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "testTimeout" | "public void testTimeout() throws Exception {
DataSourceBean bean1 = new DataSourceBean();
bean1.setClassName(MockXADataSource.class.getName());
bean1.setUniqueName("pds1");
bean1.setPoolSize(5);
bean1.setAutomaticEnlistingEnabled(true);
DataSourceBean bean2 = new... |
Inversion-Mutation | megadiff | "public void free() {
parentPool.reclaim(this);
isFreed = true;
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "free" | "public void free() {
<MASK>isFreed = true;</MASK>
parentPool.reclaim(this);
}" |
Inversion-Mutation | megadiff | "private void genJavaAction(SourceGenerator sourceGenerator, Class<?> clazz, String actionContext, FileWriter fileWriter, File javaMainSrcPath) {
String doPackage = clazz.getPackage().getName();
String baseBizPackage = StringUtil.getLastBefore(doPackage, ".biz.");
String baseActionPackage = b... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "genJavaAction" | "private void genJavaAction(SourceGenerator sourceGenerator, Class<?> clazz, String actionContext, FileWriter fileWriter, File javaMainSrcPath) {
String doPackage = clazz.getPackage().getName();
String baseBizPackage = StringUtil.getLastBefore(doPackage, ".biz.");
String baseActionPackage = b... |
Inversion-Mutation | megadiff | "@Override
protected void pointDone(Point point, MapContext vc, ToolManager tm)
throws TransitionException {
try {
final ILayer layer = vc.getSelectedLayers()[0];
final GeoRaster geoRaster = layer.getRaster();
final Coordinate realWorldCoordinate = point.getCoordinate();
final Point2D gridConte... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "pointDone" | "@Override
protected void pointDone(Point point, MapContext vc, ToolManager tm)
throws TransitionException {
try {
final ILayer layer = vc.getSelectedLayers()[0];
final GeoRaster geoRaster = layer.getRaster();
final Coordinate realWorldCoordinate = point.getCoordinate();
final Point2D gridConte... |
Inversion-Mutation | megadiff | "public String compileString(String code) throws IOException {
compiler = new Compiler(types, packages);
loadTranslation();
return javaCode = compiler.compile(code);
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "compileString" | "public String compileString(String code) throws IOException {
<MASK>loadTranslation();</MASK>
compiler = new Compiler(types, packages);
return javaCode = compiler.compile(code);
}" |
Inversion-Mutation | megadiff | "@Override
public void onItemSelected(AdapterView<?> parent, View view, int position,
long id) {
Subtitle subtitle = null;
if (firstSelection) {
boolean automaticallySelectSubtitle = preferences.getBoolean(
"automatic_subtitle_selection", false);
if (automaticallySelectSubtitle) {
String ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onItemSelected" | "@Override
public void onItemSelected(AdapterView<?> parent, View view, int position,
long id) {
Subtitle subtitle = null;
if (firstSelection) {
boolean automaticallySelectSubtitle = preferences.getBoolean(
"automatic_subtitle_selection", false);
if (automaticallySelectSubtitle) {
String ... |
Inversion-Mutation | megadiff | "@Override
protected void
processUnsolicited (Parcel p) {
Object ret;
int dataPosition = p.dataPosition(); // save off position within the Parcel
int response = p.readInt();
switch(response) {
case RIL_UNSOL_RIL_CONNECTED: // Fix for NV/RUIM setting on CDMA S... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "processUnsolicited" | "@Override
protected void
processUnsolicited (Parcel p) {
Object ret;
int dataPosition = p.dataPosition(); // save off position within the Parcel
int response = p.readInt();
switch(response) {
case RIL_UNSOL_RIL_CONNECTED: // Fix for NV/RUIM setting on CDMA S... |
Inversion-Mutation | megadiff | "@Override
protected void buildUnmanagedDevices() {
Map<String, String> customMap = new HashMap<String, String>();
List<VmDevice> vmDevices =
DbFacade.getInstance()
.getVmDeviceDAO()
.getUnmanagedDevicesByVmId(vm.getId());
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "buildUnmanagedDevices" | "@Override
protected void buildUnmanagedDevices() {
Map<String, String> customMap = new HashMap<String, String>();
List<VmDevice> vmDevices =
DbFacade.getInstance()
.getVmDeviceDAO()
.getUnmanagedDevicesByVmId(vm.getId());
... |
Inversion-Mutation | megadiff | "public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
PropertyMediator property = (PropertyMediator) object;
if (itemPropertyDescriptors != null) {
itemPropertyDescriptors.clear();
}
super.getPropertyDescriptors(object);
addPropertyNamePropertyDescriptor(object);
ad... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getPropertyDescriptors" | "public List<IItemPropertyDescriptor> getPropertyDescriptors(Object object) {
PropertyMediator property = (PropertyMediator) object;
if (itemPropertyDescriptors != null) {
itemPropertyDescriptors.clear();
}
super.getPropertyDescriptors(object);
addPropertyNamePropertyDescriptor(object);
ad... |
Inversion-Mutation | megadiff | "protected XSAttributeUseImpl traverseLocal(Element attrDecl,
XSDocumentInfo schemaDoc,
SchemaGrammar grammar,
XSComplexTypeDecl enclosingCT) {
// General Attribute Checking
Object[] attrValues = fAttrChecker.checkAttributes(attrDecl, false, schemaDoc);... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "traverseLocal" | "protected XSAttributeUseImpl traverseLocal(Element attrDecl,
XSDocumentInfo schemaDoc,
SchemaGrammar grammar,
XSComplexTypeDecl enclosingCT) {
// General Attribute Checking
Object[] attrValues = fAttrChecker.checkAttributes(attrDecl, false, schemaDoc);... |
Inversion-Mutation | megadiff | "private static String pathNameToString(List name) {
if ( name == null ) {
throw new RuntimeException("PathName reference may not be null for "+
"conversion to String");
}
if ( name.size() == 0 ) {
throw new RuntimeException("PathName must contain at... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "pathNameToString" | "private static String pathNameToString(List name) {
if ( name == null ) {
throw new RuntimeException("PathName reference may not be null for "+
"conversion to String");
}
if ( name.size() == 0 ) {
throw new RuntimeException("PathName must contain at... |
Inversion-Mutation | megadiff | "@Override
public void tearDown() throws Exception {
HibernateUtil.closeSession();
TestDatabase.resetMySQLDatabase();
super.tearDown();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "tearDown" | "@Override
public void tearDown() throws Exception {
<MASK>TestDatabase.resetMySQLDatabase();</MASK>
HibernateUtil.closeSession();
super.tearDown();
}" |
Inversion-Mutation | megadiff | "private boolean performNewSearch(boolean forground) {
SearchPatternData patternData= getPatternData();
if (patternData.fileNamePatterns == null || fExtensions.getText().length() <= 0) {
patternData.fileNamePatterns= new HashSet(1);
patternData.fileNamePatterns.add("*"); //$NON-NLS-1$
}
// S... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "performNewSearch" | "private boolean performNewSearch(boolean forground) {
<MASK>org.eclipse.search.ui.NewSearchUI.activateSearchResultView();</MASK>
SearchPatternData patternData= getPatternData();
if (patternData.fileNamePatterns == null || fExtensions.getText().length() <= 0) {
patternData.fileNamePatterns= new HashSet... |
Inversion-Mutation | megadiff | "@Override
public void run() {
aggressiveUnload();
Coordinate c;
do {
if (isBeyondThreshold()) {
step = 0;
}
c = getCurrentPosition();
step++;
} while (!tryLoadChunk(c.getX(), c.getY()));
last = step;
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "@Override
public void run() {
aggressiveUnload();
Coordinate c;
do {
<MASK>step++;</MASK>
if (isBeyondThreshold()) {
step = 0;
}
c = getCurrentPosition();
} while (!tryLoadChunk(c.getX(), c.getY()));
last = step;
}" |
Inversion-Mutation | megadiff | "@Override
public void configure(JobConf jobConf) {
if (parameters == null) {
ParameteredGeneralizations.configureParameters(this, jobConf);
}
try {
if (weightsFile.get() != null) {
FileSystem fs = FileSystem.get(weightsFile.get().toUri(), jobConf);
Vector weights = (V... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "configure" | "@Override
public void configure(JobConf jobConf) {
if (parameters == null) {
ParameteredGeneralizations.configureParameters(this, jobConf);
}
try {
<MASK>FileSystem fs = FileSystem.get(weightsFile.get().toUri(), jobConf);</MASK>
if (weightsFile.get() != null) {
Vector w... |
Inversion-Mutation | megadiff | "public static Popup addScrollPaneIfNecessary(JPopupMenu popupMenu, int x, int y) {
SimpleScrollPane contents = new SimpleScrollPane(popupMenu, SimpleScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, SimpleScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
if (popupMenu instanceof JidePopupMenu && popupMenu.getPreferredS... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "addScrollPaneIfNecessary" | "public static Popup addScrollPaneIfNecessary(JPopupMenu popupMenu, int x, int y) {
if (popupMenu instanceof JidePopupMenu && popupMenu.getPreferredSize().height != ((JidePopupMenu) popupMenu).getPreferredScrollableViewportSize().height) {
if (popupMenu.getLayout() instanceof DefaultMenuLayout) {... |
Inversion-Mutation | megadiff | "public UndoController(JTextArea textArea)
{
this.textArea = textArea;
lastUndoEdit = new CompoundEdit();
lastDisplayEdit = new CompoundEdit();
toUndo = lastUndoEdit;
view = new EditHistoryView(this);
view.addEdit(lastDisplayEdit);
undoAction = new UndoAction(this);
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "UndoController" | "public UndoController(JTextArea textArea)
{
this.textArea = textArea;
<MASK>undoAction = new UndoAction(this);</MASK>
lastUndoEdit = new CompoundEdit();
lastDisplayEdit = new CompoundEdit();
toUndo = lastUndoEdit;
view = new EditHistoryView(this);
view.addEdit(lastDisplayEdit);
}" |
Inversion-Mutation | megadiff | "public ModelAndView handleRequest(HttpServletRequest request,
HttpServletResponse response) throws Exception {
if (contentType != null) {
response.setContentType(contentType);
}
ExtendedModelMap model = new ExtendedModelMap();
populateModel(model, request);
ModelAndView mv = new ModelAnd... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "handleRequest" | "public ModelAndView handleRequest(HttpServletRequest request,
HttpServletResponse response) throws Exception {
if (contentType != null) {
response.setContentType(contentType);
}
ExtendedModelMap model = new ExtendedModelMap();
<MASK>ModelAndView mv = new ModelAndView(viewName, model);</MASK>... |
Inversion-Mutation | megadiff | "public void writeStyleSheet() {
try {
BufferedWriter writer = new BufferedWriter(new FileWriter(file));
Iterator iter = getStyleMap().keySet().iterator();
while (iter.hasNext()) {
String name = (String) iter.next();
String style = getStyle(name);
if ( !isDefaultStyle(name) && name.indexOf... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "writeStyleSheet" | "public void writeStyleSheet() {
try {
BufferedWriter writer = new BufferedWriter(new FileWriter(file));
Iterator iter = getStyleMap().keySet().iterator();
while (iter.hasNext()) {
String name = (String) iter.next();
if ( !isDefaultStyle(name) && name.indexOf(".") == -1 ) {
name = "." + ... |
Inversion-Mutation | megadiff | "public View() {
super();
this.setTitle("TSPArena");
this.getContentPane().setPreferredSize(new Dimension(640, 480));
this.setVisible(true);
this.pack(); //FORCE it to be 640 x 480, this has given me grief
this.setResizable(false);
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "View" | "public View() {
super();
this.setTitle("TSPArena");
this.getContentPane().setPreferredSize(new Dimension(640, 480));
<MASK>this.pack(); //FORCE it to be 640 x 480, this has given me grief</MASK>
this.setVisible(true);
this.setResizable(false);
}" |
Inversion-Mutation | megadiff | "private void onDataConnectionAttached() {
if (DBG) log("onDataConnectionAttached");
mAttached.set(true);
if (getOverallState() == DctConstants.State.CONNECTED) {
if (DBG) log("onDataConnectionAttached: start polling notify attached");
startNetStatPoll();
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onDataConnectionAttached" | "private void onDataConnectionAttached() {
if (DBG) log("onDataConnectionAttached");
if (getOverallState() == DctConstants.State.CONNECTED) {
if (DBG) log("onDataConnectionAttached: start polling notify attached");
startNetStatPoll();
startDataStallAlarm(DATA_ST... |
Inversion-Mutation | megadiff | "public static <T> void copy(Collection<T> source, Collection<T> target) {
Assert.isTrue(source != null, "源集合不能为空。");
Assert.isTrue(source != null, "目标集合不能为空。");
target.clear();
if (!source.isEmpty()) {
for (T o : source) {
target.add(o);
}
}
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "copy" | "public static <T> void copy(Collection<T> source, Collection<T> target) {
Assert.isTrue(source != null, "源集合不能为空。");
Assert.isTrue(source != null, "目标集合不能为空。");
if (!source.isEmpty()) {
<MASK>target.clear();</MASK>
for (T o : source) {
target.add(o);
}
}
}" |
Inversion-Mutation | megadiff | "public void flush(Connection connection) throws SQLException {
SessionImpl.LOG.debug("Flushing session {0}", this);
final ArrayList<ManagedInstance<?>> updates = Lists.newArrayList(this.newEntities);
final ArrayList<ManagedInstance<?>> removals = Lists.newArrayListWithCapacity(this.changedEntities.size());
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "flush" | "public void flush(Connection connection) throws SQLException {
SessionImpl.LOG.debug("Flushing session {0}", this);
final ArrayList<ManagedInstance<?>> updates = Lists.newArrayList(this.newEntities);
final ArrayList<ManagedInstance<?>> removals = Lists.newArrayListWithCapacity(this.changedEntities.size());
... |
Inversion-Mutation | megadiff | "GameEngine() {
keys = new HashSet<Integer>();
window = new JFrame();
window.setLayout(new BorderLayout());
window.setSize(800, 600);
window.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
area = new JDrawingArea(this);
window.add(area, Border... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "GameEngine" | "GameEngine() {
keys = new HashSet<Integer>();
window = new JFrame();
window.setLayout(new BorderLayout());
window.setSize(800, 600);
window.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
<MASK>window.setVisible(true);</MASK>
area = new JDrawi... |
Inversion-Mutation | megadiff | "public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
throws IOException, ServletException {
if (exchangeHandler != null) {
logger.info("Filtering a EasySOA API request");
response = new HttpMessageResponseWrapper((HttpServletResponse) response);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doFilter" | "public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
throws IOException, ServletException {
<MASK>logger.info("Filtering a EasySOA API request");</MASK>
if (exchangeHandler != null) {
response = new HttpMessageResponseWrapper((HttpServletResponse) re... |
Inversion-Mutation | megadiff | "public void printStackTrace(PrintStream pStream) {
super.printStackTrace(pStream);
if (linkedException != null) {
pStream.println("Caused by:");
linkedException.printStackTrace(pStream);
}
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "printStackTrace" | "public void printStackTrace(PrintStream pStream) {
super.printStackTrace(pStream);
if (linkedException != null) {
pStream.println("Caused by:");
}
<MASK>linkedException.printStackTrace(pStream);</MASK>
}" |
Inversion-Mutation | megadiff | "public void addImplicitConstraints(CADShapeEnum cse, boolean recursive)
{
for (Iterator it = discrete.iterator(); it.hasNext(); )
{
BDiscretization discr = (BDiscretization) it.next();
Iterator itc;
if (recursive)
itc = shapesExplorer(cse);
else
itc = shapesIterator();
while (it... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "addImplicitConstraints" | "public void addImplicitConstraints(CADShapeEnum cse, boolean recursive)
{
for (Iterator it = discrete.iterator(); it.hasNext(); )
{
BDiscretization discr = (BDiscretization) it.next();
Iterator itc;
if (recursive)
itc = shapesExplorer(cse);
else
itc = shapesIterator();
while (it... |
Inversion-Mutation | megadiff | "private void runHand(GameIDGenerator gameIDGenerator, PublicGameInfo gameInfo, Level blindsLevel) {
gameInfo.setBlinds(blindsLevel.getSmallBlindAmount(), blindsLevel.getBigBlindAmount());
gameInfo.setGameID(gameIDGenerator.getNextGameID());
Dealer dealer = dealers.get(gameInfo);
d... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "runHand" | "private void runHand(GameIDGenerator gameIDGenerator, PublicGameInfo gameInfo, Level blindsLevel) {
gameInfo.setBlinds(blindsLevel.getSmallBlindAmount(), blindsLevel.getBigBlindAmount());
gameInfo.setGameID(gameIDGenerator.getNextGameID());
Dealer dealer = dealers.get(gameInfo);
d... |
Inversion-Mutation | megadiff | "@SuppressWarnings("nls")
public ScannerConfigPlugin() {
if (IS_MS_WINDOWS) {
System.loadLibrary("OpenThreadsWin32");
System.loadLibrary("opencv_core248");
System.loadLibrary("opencv_highgui248");
System.loadLibrary("opencv_imgproc248");
Sy... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "ScannerConfigPlugin" | "@SuppressWarnings("nls")
public ScannerConfigPlugin() {
if (IS_MS_WINDOWS) {
System.loadLibrary("OpenThreadsWin32");
<MASK>System.loadLibrary("dmscanlib");</MASK>
System.loadLibrary("opencv_core248");
System.loadLibrary("opencv_highgui248");
... |
Inversion-Mutation | megadiff | "public void beginRequest(HttpServletRequest request)
{
BeanMap beanMap = new SimpleBeanMap();
request.setAttribute(REQUEST_ATTRIBUTE_NAME, beanMap);
super.beginRequest(request.getRequestURI(), beanMap);
restoreSessionContext(request.getSession());
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "beginRequest" | "public void beginRequest(HttpServletRequest request)
{
<MASK>restoreSessionContext(request.getSession());</MASK>
BeanMap beanMap = new SimpleBeanMap();
request.setAttribute(REQUEST_ATTRIBUTE_NAME, beanMap);
super.beginRequest(request.getRequestURI(), beanMap);
}" |
Inversion-Mutation | megadiff | "private void addTemporaryWallpaperTile(Uri uri) {
mTempWallpaperTiles.add(uri);
// Add a tile for the image picked from Gallery
FrameLayout pickedImageThumbnail = (FrameLayout) getLayoutInflater().
inflate(R.layout.wallpaper_picker_item, mWallpapersView, false);
set... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "addTemporaryWallpaperTile" | "private void addTemporaryWallpaperTile(Uri uri) {
mTempWallpaperTiles.add(uri);
// Add a tile for the image picked from Gallery
FrameLayout pickedImageThumbnail = (FrameLayout) getLayoutInflater().
inflate(R.layout.wallpaper_picker_item, mWallpapersView, false);
set... |
Inversion-Mutation | megadiff | "public void updateStations() {
if (eavdamMenu == null || eavdamMenu.getShowOnMapMenu() == null) {
return;
}
data = DBHandler.getData();
if (data != null) {
Options options = OptionsMenuItem.loadOptions();
//currentIcons = options.getI... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "updateStations" | "public void updateStations() {
if (eavdamMenu == null || eavdamMenu.getShowOnMapMenu() == null) {
return;
}
data = DBHandler.getData();
if (data != null) {
Options options = OptionsMenuItem.loadOptions();
//currentIcons = options.getI... |
Inversion-Mutation | megadiff | "public boolean hasSideEffects()
{
switch (type) {
case Token.EXPR_VOID:
case Token.COMMA:
if (last != null)
return last.hasSideEffects();
else
return true;
case Token.HOOK:
if (first == null ||
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "hasSideEffects" | "public boolean hasSideEffects()
{
switch (type) {
case Token.EXPR_VOID:
<MASK>case Token.EXPR_RESULT:</MASK>
case Token.COMMA:
if (last != null)
return last.hasSideEffects();
else
return true;
case T... |
Inversion-Mutation | megadiff | "@Override
public void execute(String commandString, ConnectionContext context) throws IOException
{
context.getSession().quit();
context.sendResponse("221 Bye");
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "execute" | "@Override
public void execute(String commandString, ConnectionContext context) throws IOException
{
<MASK>context.sendResponse("221 Bye");</MASK>
context.getSession().quit();
}" |
Inversion-Mutation | megadiff | "public FitSphere(final Vector3D[] points) {
Vector3D mean = Vector3D.ZERO;
for(Vector3D point : points)
mean = mean.add(point.scalarMultiply(1D/(double)points.length));
ReportingUtils.logMessage("MEAN: " + mean.toString());
final Vector3D endMean = new Vector3D(mean.getX(), mean.getY(), mean.getZ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "FitSphere" | "public FitSphere(final Vector3D[] points) {
Vector3D mean = Vector3D.ZERO;
for(Vector3D point : points)
mean = mean.add(point.scalarMultiply(1D/(double)points.length));
ReportingUtils.logMessage("MEAN: " + mean.toString());
final Vector3D endMean = new Vector3D(mean.getX(), mean.getY(), mean.getZ... |
Inversion-Mutation | megadiff | "@Test
public void testCanRemove() {
assertTrue(productGroup1.canRemove());
assertTrue(storageUnit1.canRemove());
productGroup1.add(productGroup2);
productGroup2.add(product1);
storageUnit1.add(productGroup1);
storageUnit1.add(item1);
assertFalse(productGroup1.canRemove());
assertFalse(storag... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "testCanRemove" | "@Test
public void testCanRemove() {
assertTrue(productGroup1.canRemove());
assertTrue(storageUnit1.canRemove());
productGroup1.add(productGroup2);
productGroup2.add(product1);
<MASK>storageUnit1.add(item1);</MASK>
storageUnit1.add(productGroup1);
assertFalse(productGroup1.canRemove());
asser... |
Inversion-Mutation | megadiff | "public ModelAndView populateContentModel(HttpServletRequest request) {
for (int i = 0; i < modelBuilders.length; i++) {
ModelBuilder modelBuilder = modelBuilders[i];
if (modelBuilder.isValid(request)) {
logger.info("Using " + modelBuilder.getClass().getName() + " to serve path: " + request.getPathInfo(... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "populateContentModel" | "public ModelAndView populateContentModel(HttpServletRequest request) {
for (int i = 0; i < modelBuilders.length; i++) {
ModelBuilder modelBuilder = modelBuilders[i];
if (modelBuilder.isValid(request)) {
logger.info("Using " + modelBuilder.getClass().getName() + " to serve path: " + request.getPathInfo(... |
Inversion-Mutation | megadiff | "public void createSession() {
Configuration configuration = new Configuration();
configuration.configure();
Properties prop = new Properties();
try {
prop.load(new FileInputStream("trademarket.props"));
} catch (FileNotFoundException e) {
prop.put("hibernate.connection.username", "root")... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createSession" | "public void createSession() {
Configuration configuration = new Configuration();
configuration.configure();
Properties prop = new Properties();
try {
prop.load(new FileInputStream("trademarket.props"));
} catch (FileNotFoundException e) {
prop.put("hibernate.connection.username", "root")... |
Inversion-Mutation | megadiff | "public void actionPerformed(ActionEvent e)
{
String command;
Debug.println("Got action: " + e.getActionCommand());
if(e.getSource() == lObjView){
if(e.getActionCommand().equals("Done")){
lObjView.close();
remove(lObjView);
add(me);
}
} else if(e.getSource() == viewMenu){
if(e.... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "actionPerformed" | "public void actionPerformed(ActionEvent e)
{
String command;
Debug.println("Got action: " + e.getActionCommand());
if(e.getSource() == lObjView){
if(e.getActionCommand().equals("Done")){
lObjView.close();
remove(lObjView);
add(me);
}
} else if(e.getSource() == viewMenu){
if(e.... |
Inversion-Mutation | megadiff | "@Override
public User createFromParcel(Parcel source) {
int id = source.readInt();
String name = source.readString();
String area = source.readString();
return new User(name, area, id);
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createFromParcel" | "@Override
public User createFromParcel(Parcel source) {
int id = source.readInt();
<MASK>String area = source.readString();</MASK>
String name = source.readString();
return new User(name, area, id);
}" |
Inversion-Mutation | megadiff | "public static boolean saveUserData() {
try {
DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
Document userList = docBuilder.newDocument();
Element rootElement = userLis... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "saveUserData" | "public static boolean saveUserData() {
try {
DocumentBuilderFactory docFactory = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = docFactory.newDocumentBuilder();
Document userList = docBuilder.newDocument();
Element rootElement = userLis... |
Inversion-Mutation | megadiff | "private void serializeEvent(DataOutput out) throws IOException {
if (event == null) {
out.writeBoolean(false);
return;
}
out.writeBoolean(true);
out.writeInt(eventType.ordinal());
if (eventType.equals(EventType.TASK_STATUS_UPDATE_EVENT)) {
// TODO NEWTEZ convert to PB
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "serializeEvent" | "private void serializeEvent(DataOutput out) throws IOException {
if (event == null) {
out.writeBoolean(false);
return;
}
out.writeBoolean(true);
if (eventType.equals(EventType.TASK_STATUS_UPDATE_EVENT)) {
// TODO NEWTEZ convert to PB
TaskStatusUpdateEvent sEvt = (TaskSt... |
Inversion-Mutation | megadiff | "public NettyConnectionsPool(int maxTotalConnections, int maxConnectionPerHost, long maxIdleTime, boolean sslConnectionPoolEnabled, int maxConnectionLifeTimeInMs, Timer idleConnectionDetector) {
this.maxTotalConnections = maxTotalConnections;
this.maxConnectionPerHost = maxConnectionPerHost;
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "NettyConnectionsPool" | "public NettyConnectionsPool(int maxTotalConnections, int maxConnectionPerHost, long maxIdleTime, boolean sslConnectionPoolEnabled, int maxConnectionLifeTimeInMs, Timer idleConnectionDetector) {
this.maxTotalConnections = maxTotalConnections;
this.maxConnectionPerHost = maxConnectionPerHost;
... |
Inversion-Mutation | megadiff | "@Override
protected void handleUpdate(Update u) {
super.handleUpdate(u);
changed.clear();
for (Entity next : u.getUpdatedEntities()) {
if (next instanceof Building) {
Building b = (Building)next;
if (b.isBrokennessDefined()) {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "handleUpdate" | "@Override
protected void handleUpdate(Update u) {
changed.clear();
for (Entity next : u.getUpdatedEntities()) {
if (next instanceof Building) {
Building b = (Building)next;
if (b.isBrokennessDefined()) {
// Brokenness has chang... |
Inversion-Mutation | megadiff | "@EventHandler(priority = EventPriority.HIGHEST)
public void onPlayerInterract(PlayerInteractEvent event) {
SpectatorManager manager = getAPI().getSpectatorManager();
Player player = event.getPlayer();
if (manager.getSpectators().contains(player.getName())) {
manager.cycl... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onPlayerInterract" | "@EventHandler(priority = EventPriority.HIGHEST)
public void onPlayerInterract(PlayerInteractEvent event) {
SpectatorManager manager = getAPI().getSpectatorManager();
Player player = event.getPlayer();
if (manager.getSpectators().contains(player.getName())) {
<MASK>event.s... |
Inversion-Mutation | megadiff | "public static List<String> getMatchingURIs(Resource current, String namespace, List<Property> properties, JenaConnect vivo) {
StringBuilder sbQuery = new StringBuilder();
ArrayList<String> filters = new ArrayList<String>();
int valueCount = 0;
sbQuery.append("SELECT ?uri\nWHERE\n{");
for(Property p : pr... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getMatchingURIs" | "public static List<String> getMatchingURIs(Resource current, String namespace, List<Property> properties, JenaConnect vivo) {
StringBuilder sbQuery = new StringBuilder();
ArrayList<String> filters = new ArrayList<String>();
int valueCount = 0;
sbQuery.append("SELECT ?uri\nWHERE\n{");
for(Property p : pr... |
Inversion-Mutation | megadiff | "@Override
public Image getImage() {
synchronized (this) {
if (image == null) {
image = AbstractUIPlugin.imageDescriptorFromPlugin(Plugin.PLUGIN_ID, "/icons/brick.png").createImage();
}
return image;
}
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getImage" | "@Override
public Image getImage() {
synchronized (this) {
if (image == null) {
image = AbstractUIPlugin.imageDescriptorFromPlugin(Plugin.PLUGIN_ID, "/icons/brick.png").createImage();
}
}
<MASK>return image;</MASK>
}" |
Inversion-Mutation | megadiff | "public static void main(String[] args) {
ArrayList<String> jobConfArgs = new ArrayList<String>();
String inputPathStr = null;
String outputDir = null;
try {
for (int i = 0; i < args.length; i++) {
if (args[i].equals("-input")) {
inputPathStr = args[++i];
} ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "main" | "public static void main(String[] args) {
ArrayList<String> jobConfArgs = new ArrayList<String>();
String inputPathStr = null;
String outputDir = null;
try {
for (int i = 0; i < args.length; i++) {
if (args[i].equals("-input")) {
inputPathStr = args[++i];
} ... |
Inversion-Mutation | megadiff | "@TestTargetNew(
level = TestLevel.COMPLETE,
method = "setDither",
args = {boolean.class}
)
public void testSetDither() {
assertConstantStateNotSet();
assertNull(mDrawableContainer.getCurrent());
mDrawableContainer.setConstantState(mDrawableContainerStat... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "testSetDither" | "@TestTargetNew(
level = TestLevel.COMPLETE,
method = "setDither",
args = {boolean.class}
)
public void testSetDither() {
assertConstantStateNotSet();
assertNull(mDrawableContainer.getCurrent());
mDrawableContainer.setDither(false);
mDrawableCo... |
Inversion-Mutation | megadiff | "private void decode_corbaloc (String addr)
{
String host = "127.0.0.1"; //default to localhost
short port = 2809; // default IIOP port
int major = 1;
int minor = 2; // should this be 0? should it be configurable?
String errorstr =
"Illegal IIOP protoco... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "decode_corbaloc" | "private void decode_corbaloc (String addr)
{
String host = "127.0.0.1"; //default to localhost
short port = 2809; // default IIOP port
int major = 1;
int minor = 2; // should this be 0? should it be configurable?
String errorstr =
"Illegal IIOP protoco... |
Inversion-Mutation | megadiff | "@Override
protected void hideFakeTitleBar() {
if (isFakeTitleBarShowing()) {
mFakeTitleBar.setEditMode(false);
mTabBar.onHideTitleBar();
mContentView.removeView(mFakeTitleBar);
}
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "hideFakeTitleBar" | "@Override
protected void hideFakeTitleBar() {
if (isFakeTitleBarShowing()) {
mFakeTitleBar.setEditMode(false);
<MASK>mContentView.removeView(mFakeTitleBar);</MASK>
mTabBar.onHideTitleBar();
}
}" |
Inversion-Mutation | megadiff | "public String getEndpoint(HttpServletRequest request) {
Map<String, Object> map = applicationContext.getEndpointTypes();
Collection<Method> methods = new HashSet<Method>();
for(Entry<String, Object> entry: map.entrySet()) {
Collection<Method> m = Reflections.getAllMethods(entry.getValue().getClass(), ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getEndpoint" | "public String getEndpoint(HttpServletRequest request) {
Map<String, Object> map = applicationContext.getEndpointTypes();
Collection<Method> methods = new HashSet<Method>();
for(Entry<String, Object> entry: map.entrySet()) {
Collection<Method> m = Reflections.getAllMethods(entry.getValue().getClass(), ... |
Inversion-Mutation | megadiff | "public ClientProxy getProxy(String service, String id) {
final ObjectNamespace ns = new DefaultObjectNamespace(service, id);
final ClientProxy proxy = proxies.get(ns);
if (proxy != null) {
return proxy;
}
final ClientProxyFactory factory = proxyFactories.get(se... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getProxy" | "public ClientProxy getProxy(String service, String id) {
final ObjectNamespace ns = new DefaultObjectNamespace(service, id);
final ClientProxy proxy = proxies.get(ns);
if (proxy != null) {
return proxy;
}
final ClientProxyFactory factory = proxyFactories.get(se... |
Inversion-Mutation | megadiff | "private void suspendExpression(AbstractAST x) {
setCurrentAST(x);
if(suspendRequest) {
suspendRequest = false;
debugger.notifySuspend();
} else if (expressionStepModeEnabled()) {
if (debugger.isStepping() || debugger.hasEnabledBreakpoint(getCurrentAST().getLocation())) {
debugger.notifySuspe... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "suspendExpression" | "private void suspendExpression(AbstractAST x) {
setCurrentAST(x);
if(suspendRequest) {
<MASK>debugger.notifySuspend();</MASK>
suspendRequest = false;
} else if (expressionStepModeEnabled()) {
if (debugger.isStepping() || debugger.hasEnabledBreakpoint(getCurrentAST().getLocation())) {
<MASK>d... |
Inversion-Mutation | megadiff | "public boolean AssertNot(String value, String src) {
boolean result = false;
String msg = "";
if (isRegex(value)) {
value = this.strToRegex(value);
if (src.matches(value)) {
this.FailedAsserts += 1;
msg = String.format("(!)Assert Failed, Found Unexpected text: '%s'.", value);
this._... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "AssertNot" | "public boolean AssertNot(String value, String src) {
boolean result = false;
String msg = "";
if (isRegex(value)) {
value = this.strToRegex(value);
if (src.matches(value)) {
this.FailedAsserts += 1;
msg = String.format("(!)Assert Failed, Found Unexpected text: '%s'.", value);
this._... |
Inversion-Mutation | megadiff | "@Override
public ClassImportStatementInfo resolve(final TargetClassInfo usingClass,
final CallableUnitInfo usingMethod, final ClassInfoManager classInfoManager,
final FieldInfoManager fieldInfoManager, final MethodInfoManager methodInfoManager) {
// s³ÈÄÑoµÅÈ¢©ð`... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "resolve" | "@Override
public ClassImportStatementInfo resolve(final TargetClassInfo usingClass,
final CallableUnitInfo usingMethod, final ClassInfoManager classInfoManager,
final FieldInfoManager fieldInfoManager, final MethodInfoManager methodInfoManager) {
// s³ÈÄÑoµÅÈ¢©ð`... |
Inversion-Mutation | megadiff | "@Override
public Representation getRepresentation(final Status status, final Request request, final Response response)
{
final Map<String, Object> dataModel = RestletUtils.getBaseDataModel(request);
dataModel.put("contentTemplate", "error.html.ftl");
dataModel.put("pageTi... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getRepresentation" | "@Override
public Representation getRepresentation(final Status status, final Request request, final Response response)
{
final Map<String, Object> dataModel = RestletUtils.getBaseDataModel(request);
dataModel.put("contentTemplate", "error.html.ftl");
dataModel.put("pageTi... |
Inversion-Mutation | megadiff | "public void load( ComponentSystemEvent event )
throws AbortProcessingException, ConfigurationException {
LOG.debug( "Load form for goup with id " + grpId );
if ( form != null ) {
form.getChildren().clear();
if ( forms.containsKey( grpId ) ) {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "load" | "public void load( ComponentSystemEvent event )
throws AbortProcessingException, ConfigurationException {
LOG.debug( "Load form for goup with id " + grpId );
if ( form != null ) {
form.getChildren().clear();
if ( forms.containsKey( grpId ) ) {
... |
Inversion-Mutation | megadiff | "private void executeAsForked(List<String> dmlFiles, String classFullName, String domainModelClassName) throws BuildException {
CommandlineJava cmd;
try {
cmd = (CommandlineJava) (getCommandline().clone());
} catch (CloneNotSupportedException e) {
throw new BuildException("This shouldn't happen", e,... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "executeAsForked" | "private void executeAsForked(List<String> dmlFiles, String classFullName, String domainModelClassName) throws BuildException {
CommandlineJava cmd;
try {
cmd = (CommandlineJava) (getCommandline().clone());
} catch (CloneNotSupportedException e) {
throw new BuildException("This shouldn't happen", e,... |
Inversion-Mutation | megadiff | "@Override
public void onCreate(Bundle icicle) {
this.mTestPath = (String) icicle.get("path");
String timeout_str = (String) icicle.get("timeout");
if (timeout_str != null) {
try {
this.mTimeoutInMillis = Integer.parseInt(timeout_str);
} catch ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onCreate" | "@Override
public void onCreate(Bundle icicle) {
<MASK>super.onCreate(icicle);</MASK>
this.mTestPath = (String) icicle.get("path");
String timeout_str = (String) icicle.get("timeout");
if (timeout_str != null) {
try {
this.mTimeoutInMillis = Integer... |
Inversion-Mutation | megadiff | "@Override
public void testEnded(String host) {
if(workerThread == null) {
return;
}
started = false;
workerThread.interrupt();
shutdownConnectors();
//reset autoFileName for next test run
autoFileBaseName = null;
counter = 0;
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "testEnded" | "@Override
public void testEnded(String host) {
if(workerThread == null) {
return;
}
workerThread.interrupt();
shutdownConnectors();
//reset autoFileName for next test run
autoFileBaseName = null;
counter = 0;
<MASK>started = fa... |
Inversion-Mutation | megadiff | "@Override
public Set<SquareMatrix> compute() {
if (nodes.size() <= 500) {
for (MagicTreeNode node: nodes) {
node.get_children();
result.addAll(node.build());
}
} else {
int half = nodes.size() / 2;
List<MagicTreeNode> upper_half = nodes.subList(0, half)... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "compute" | "@Override
public Set<SquareMatrix> compute() {
if (nodes.size() <= 500) {
for (MagicTreeNode node: nodes) {
node.get_children();
result.addAll(node.build());
}
} else {
int half = nodes.size() / 2;
List<MagicTreeNode> upper_half = nodes.subList(0, half)... |
Inversion-Mutation | megadiff | "static boolean executeScript(final NodeModel node, String script, final MModeController pMindMapController,
final IErrorHandler pErrorHandler, final PrintStream pOutStream,
final HashMap pScriptCookies) {
if (!noUserPermissionRequired) {
final int sh... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "executeScript" | "static boolean executeScript(final NodeModel node, String script, final MModeController pMindMapController,
final IErrorHandler pErrorHandler, final PrintStream pOutStream,
final HashMap pScriptCookies) {
if (!noUserPermissionRequired) {
final int sh... |
Inversion-Mutation | megadiff | "private void tryCloseSocket(Socket socket) {
try {
cancelAllRequests("channel closed");
socket.close();
} catch (IOException e1) {
logger.log(Level.WARNING,
"Unable to close socket " + socket,
e1);
}
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "tryCloseSocket" | "private void tryCloseSocket(Socket socket) {
try {
<MASK>socket.close();</MASK>
cancelAllRequests("channel closed");
} catch (IOException e1) {
logger.log(Level.WARNING,
"Unable to close socket " + socket,
e1);
... |
Inversion-Mutation | megadiff | "public SWTBotTreeItem doubleClick() {
assertEnabled();
asyncExec(new VoidResult() {
public void run() {
tree.setSelection(widget);
}
});
notifyTree(SWT.Selection);
notifyTree(SWT.MouseDown);
notifyTree(SWT.MouseUp);
notifyTree(SWT.MouseDown);
notifyTree(SWT.MouseDoubleClick);
n... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doubleClick" | "public SWTBotTreeItem doubleClick() {
assertEnabled();
<MASK>notifyTree(SWT.MouseDown);</MASK>
asyncExec(new VoidResult() {
public void run() {
tree.setSelection(widget);
}
});
notifyTree(SWT.Selection);
notifyTree(SWT.MouseUp);
<MASK>notifyTree(SWT.MouseDown);</MASK>
notifyTree(S... |
Inversion-Mutation | megadiff | "@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
super.setIntegerProperty("loadUrlTimeoutValue", 60000);
super.setIntegerProperty("splashscreen", R.drawable.splash);
super.loadUrl("file:///android_asset/www/index.html", 60000... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onCreate" | "@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
super.setIntegerProperty("splashscreen", R.drawable.splash);
super.loadUrl("file:///android_asset/www/index.html", 60000);
<MASK>super.setIntegerProperty("loadUrlTimeoutValue",... |
Inversion-Mutation | megadiff | "public ClassLoaderManager(Object commMgrBean) {
classloaderMap = new HashMap<Long, ClassLoader>();
objectToBundle = new HashMap<Object, Long>();
thisBundleId = getBundleId(commMgrBean);
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "ClassLoaderManager" | "public ClassLoaderManager(Object commMgrBean) {
<MASK>thisBundleId = getBundleId(commMgrBean);</MASK>
classloaderMap = new HashMap<Long, ClassLoader>();
objectToBundle = new HashMap<Object, Long>();
}" |
Inversion-Mutation | megadiff | "private void addWherePredicate(
StringBuilder whereBuilder,
Predicate predicate,
Predicate parentPredicate,
boolean usesLeftJoin,
boolean deferMetricAndHavingPredicates) {
if (predicate instanceof CompoundPredicate) {
CompoundPred... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "addWherePredicate" | "private void addWherePredicate(
StringBuilder whereBuilder,
Predicate predicate,
Predicate parentPredicate,
boolean usesLeftJoin,
boolean deferMetricAndHavingPredicates) {
if (predicate instanceof CompoundPredicate) {
CompoundPred... |
Inversion-Mutation | megadiff | "public void deleteData() throws SQLException, IOException {
update("delete from role_rights where roleid not in(1);");
update("delete from role_assignments where userid not in (1);");
update("delete from roles where name not in ('Admin');");
update("delete from facility_approved_products;");
u... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "deleteData" | "public void deleteData() throws SQLException, IOException {
update("delete from role_rights where roleid not in(1);");
update("delete from role_assignments where userid not in (1);");
update("delete from roles where name not in ('Admin');");
update("delete from facility_approved_products;");
u... |
Inversion-Mutation | megadiff | "@Override
public void resultSet(ResultSet rs) throws SQLException {
ResultSetMetaData rsmd = rs.getMetaData();
int cols = rsmd.getColumnCount();
int[] types = new int[cols];
String[] labels = new String[cols];
for (int i = 0; i < cols; i++) {
types[i] = rsmd.getColumnType(i + 1);
labels[i] = r... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "resultSet" | "@Override
public void resultSet(ResultSet rs) throws SQLException {
ResultSetMetaData rsmd = rs.getMetaData();
int cols = rsmd.getColumnCount();
int[] types = new int[cols];
String[] labels = new String[cols];
for (int i = 0; i < cols; i++) {
types[i] = rsmd.getColumnType(i + 1);
labels[i] = r... |
Inversion-Mutation | megadiff | "public static MenuBar createMenuBar()
{
// create the menu bar
MenuBar menuBar = new MenuBar();
MenuItem m;
int buckyBit = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
/****************************** THE FILE MENU ******************************/
Menu fileMenu = new Menu("File", '... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createMenuBar" | "public static MenuBar createMenuBar()
{
// create the menu bar
MenuBar menuBar = new MenuBar();
MenuItem m;
int buckyBit = Toolkit.getDefaultToolkit().getMenuShortcutKeyMask();
/****************************** THE FILE MENU ******************************/
Menu fileMenu = new Menu("File", '... |
Inversion-Mutation | megadiff | "private Element createAttributeElement(Element tag, String name, PropertyBase attribute) {
Element attr = tag.addElement("attribute");
addDescription(attr, attribute);
attr.addElement("name").addText(name);
if (attribute.isRequired()) {
attr.addElement("required").addT... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createAttributeElement" | "private Element createAttributeElement(Element tag, String name, PropertyBase attribute) {
Element attr = tag.addElement("attribute");
addDescription(attr, attribute);
attr.addElement("name").addText(name);
<MASK>attr.addElement("type").addText(attribute.getType().getName());</MASK>... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.