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 IMarkerResolution[] getResolutions(IMarker marker) {
ArrayList<IMarkerResolution> resolutions = new ArrayList<IMarkerResolution>();
int position = marker.getAttribute(IMarker.CHAR_START, 0);
try {
if(marker.getResource() instanceof IFile){
IFile file = (IFile)marker.getResource();
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getResolutions" | "@Override
public IMarkerResolution[] getResolutions(IMarker marker) {
ArrayList<IMarkerResolution> resolutions = new ArrayList<IMarkerResolution>();
int position = marker.getAttribute(IMarker.CHAR_START, 0);
try {
if(marker.getResource() instanceof IFile){
IFile file = (IFile)marker.getResource();
... |
Inversion-Mutation | megadiff | "public Constant asJava() {
Type type = getType();
String txt = originalTextualRepresentation;
switch (type) {
case Byte:
case Int:
case Long:
case LongString:
case Short:
txt = trimT... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "asJava" | "public Constant asJava() {
Type type = getType();
String txt = originalTextualRepresentation;
switch (type) {
case Byte:
case Int:
<MASK>case IntegerString:</MASK>
case Long:
case LongString:
... |
Inversion-Mutation | megadiff | "public void shutdown() throws CoreException {
if (fDescriptorManager != null) {
fDescriptorManager.shutdown();
}
if (fCoreModel != null) {
fCoreModel.shutdown();
}
if (cdtLog != null) {
cdtLog.shutdown();
}
super.shutdown();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "shutdown" | "public void shutdown() throws CoreException {
<MASK>super.shutdown();</MASK>
if (fDescriptorManager != null) {
fDescriptorManager.shutdown();
}
if (fCoreModel != null) {
fCoreModel.shutdown();
}
if (cdtLog != null) {
cdtLog.shutdown();
}
}" |
Inversion-Mutation | megadiff | "private void findConnectingPorts(ArcProto startArc, ArcProto endArc, StringBuffer ds) {
// throw away route if it's longer than shortest good route
if (specifiedRoute.size() > getShortestRouteLength())
return;
if (startArc == endArc) {
saveRoute(specifiedRoute);... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "findConnectingPorts" | "private void findConnectingPorts(ArcProto startArc, ArcProto endArc, StringBuffer ds) {
// throw away route if it's longer than shortest good route
if (specifiedRoute.size() > getShortestRouteLength())
return;
if (startArc == endArc) {
saveRoute(specifiedRoute);... |
Inversion-Mutation | megadiff | "public void createEmbeddedForm(Element startElement) throws XFormsException {
// receive all models from given element
List<Element> modelElements = getModelElements(startElement);
final int nrOfModels = modelElements.size();
// list containing all model of embded form
Arra... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createEmbeddedForm" | "public void createEmbeddedForm(Element startElement) throws XFormsException {
// receive all models from given element
List<Element> modelElements = getModelElements(startElement);
final int nrOfModels = modelElements.size();
// list containing all model of embded form
Arra... |
Inversion-Mutation | megadiff | "private static void decodeTextSegment(BitSource bits, StringBuffer result) throws FormatException {
// Three Text values are encoded in a 16-bit value as
// (1600 * C1) + (40 * C2) + C3 + 1
// TODO(bbrown): The Upper Shift with Text doesn't work in the 4 value scenario all the time
boolean upperShi... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "decodeTextSegment" | "private static void decodeTextSegment(BitSource bits, StringBuffer result) throws FormatException {
// Three Text values are encoded in a 16-bit value as
// (1600 * C1) + (40 * C2) + C3 + 1
// TODO(bbrown): The Upper Shift with Text doesn't work in the 4 value scenario all the time
boolean upperShi... |
Inversion-Mutation | megadiff | "Dialog createDialog() {
final View layout = View.inflate(Launcher.this, R.layout.rename_folder, null);
mInput = (EditText) layout.findViewById(R.id.folder_name);
AlertDialog.Builder builder = new AlertDialog.Builder(Launcher.this);
builder.setIcon(0);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createDialog" | "Dialog createDialog() {
<MASK>mWaitingForResult = true;</MASK>
final View layout = View.inflate(Launcher.this, R.layout.rename_folder, null);
mInput = (EditText) layout.findViewById(R.id.folder_name);
AlertDialog.Builder builder = new AlertDialog.Builder(Launcher.t... |
Inversion-Mutation | megadiff | "@Override
public void init(ReceivedTransaction receivedTransaction,
EntityOperation entityOperation) {
view.setController(this);
view.resetComponents();
model.registerObserver(view);
model.setEntityAndEntityOperation(receivedTransaction, entityOperation);
customerModel.registerObserver(view);... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "init" | "@Override
public void init(ReceivedTransaction receivedTransaction,
EntityOperation entityOperation) {
view.setController(this);
view.resetComponents();
<MASK>customerModel.registerObserver(view);</MASK>
model.registerObserver(view);
model.setEntityAndEntityOperation(receivedTransaction, entit... |
Inversion-Mutation | megadiff | "private void loadAndBindAllApps() {
final long t = DEBUG_LOADERS ? SystemClock.uptimeMillis() : 0;
// Don't use these two variables in any of the callback runnables.
// Otherwise we hold a reference to them.
final Callbacks oldCallbacks = mCallbacks... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "loadAndBindAllApps" | "private void loadAndBindAllApps() {
final long t = DEBUG_LOADERS ? SystemClock.uptimeMillis() : 0;
// Don't use these two variables in any of the callback runnables.
// Otherwise we hold a reference to them.
final Callbacks oldCallbacks = mCallbacks... |
Inversion-Mutation | megadiff | "public IPropertyDescriptor[] getPropertyDescriptors() {
if (fDescriptors == null) {
try {
final List<IPropertyDescriptor> descriptors = new ArrayList<IPropertyDescriptor>();
fDescriptors = new TCFTask<IPropertyDescriptor[]>(fNode.getChannel()) {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getPropertyDescriptors" | "public IPropertyDescriptor[] getPropertyDescriptors() {
if (fDescriptors == null) {
try {
fDescriptors = new TCFTask<IPropertyDescriptor[]>(fNode.getChannel()) {
<MASK>final List<IPropertyDescriptor> descriptors = new ArrayList<IPropertyDescriptor>();</MASK>... |
Inversion-Mutation | megadiff | "public void leverInn() {
Date innTid = new Date();
if(leietid(innTid) > Sykkel.getMAXTID()) {
if(leietid(innTid) - 3 == 1 ) {
setMerknad(innTid, "Sykkel ble levert " + (leietid(innTid) - Sykkel.getMAXTID()) + " time for sent");
}
else {
setMerknad(... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "leverInn" | "public void leverInn() {
Date innTid = new Date();
if(leietid(innTid) > Sykkel.getMAXTID()) {
if(leietid(innTid) - 3 == 1 ) {
setMerknad(innTid, "Sykkel ble levert " + (leietid(innTid) - Sykkel.getMAXTID()) + " time for sent");
}
else {
setMerknad(... |
Inversion-Mutation | megadiff | "private void processText(boolean ignorable) throws SAXException {
firstCIIChunk = true;
if(context.expectText() && (!ignorable || !WhiteSpaceProcessor.isWhiteSpace(buffer))) {
if (!hasBase64Data) {
visitor.text(buffer);
} else {
visitor.tex... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "processText" | "private void processText(boolean ignorable) throws SAXException {
firstCIIChunk = true;
if(context.expectText() && (!ignorable || !WhiteSpaceProcessor.isWhiteSpace(buffer))) {
if (!hasBase64Data) {
visitor.text(buffer);
<MASK>buffer.setLength(0);</MASK>
... |
Inversion-Mutation | megadiff | "private List<StopPoint> stopPointList( Route route) {
List<StopPoint> stopPoints = new ArrayList<StopPoint>();
try {
for ( int i=0; i<routeStopCount; i++) {
StopArea stopArea = modelFactory.createModel(StopArea.class);
StopPoint stopPoint = new StopPoint... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "stopPointList" | "private List<StopPoint> stopPointList( Route route) {
List<StopPoint> stopPoints = new ArrayList<StopPoint>();
try {
for ( int i=0; i<routeStopCount; i++) {
StopArea stopArea = modelFactory.createModel(StopArea.class);
StopPoint stopPoint = new StopPoint... |
Inversion-Mutation | megadiff | "public void mine() throws NoSuchAlgorithmException {
String startString = randomString();
String currentString;
MessageDigest md = MessageDigest.getInstance("SHA-512");
StringBuffer sb;
while (MainView.getStatus()) {
for (int counter = 0; counter < 999999999; counter++) {
MainView.updateCounter... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "mine" | "public void mine() throws NoSuchAlgorithmException {
String startString = randomString();
String currentString;
MessageDigest md = MessageDigest.getInstance("SHA-512");
StringBuffer sb;
for (int counter = 0; counter < 999999999; counter++) {
<MASK>while (MainView.getStatus()) {</MASK>
MainView... |
Inversion-Mutation | megadiff | "public boolean schedule(long lazyTimeout)
{
long execution = System.nanoTime() + TimeUnit.MILLISECONDS.toNanos(lazyTimeout);
if (_task == null || execution < _execution)
{
cancel();
_execution = execution;
_task = _baye... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "schedule" | "public boolean schedule(long lazyTimeout)
{
<MASK>cancel();</MASK>
long execution = System.nanoTime() + TimeUnit.MILLISECONDS.toNanos(lazyTimeout);
if (_task == null || execution < _execution)
{
_execution = execution;
_tas... |
Inversion-Mutation | megadiff | "public void authenticate(SVNRepositoryImpl repository) throws SVNException {
SVNErrorMessage failureReason = null;
Object[] items = read("[((*W)?S)]", null);
List mechs = SVNReader.getList(items, 0);
myRealm = SVNReader.getString(items, 1);
if (mechs == null || mechs.size()... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "authenticate" | "public void authenticate(SVNRepositoryImpl repository) throws SVNException {
SVNErrorMessage failureReason = null;
Object[] items = read("[((*W)?S)]", null);
List mechs = SVNReader.getList(items, 0);
myRealm = SVNReader.getString(items, 1);
if (mechs == null || mechs.size()... |
Inversion-Mutation | megadiff | "public static void config(Object target, World world) {
try {
Class<?> clazz = target.getClass();
do {
for (Field field : clazz.getDeclaredFields()) {
Mapper annotation = field.getAnnotation(Mapper.class);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "config" | "public static void config(Object target, World world) {
try {
Class<?> clazz = target.getClass();
do {
for (Field field : clazz.getDeclaredFields()) {
Mapper annotation = field.getAnnotation(Mapper.class);
... |
Inversion-Mutation | megadiff | "@Override
protected void onPostExecute(Integer result) {
super.onPostExecute(result);
if (result == DropboxAPI.STATUS_SUCCESS) {
if (m_config != null
&& m_config.authStatus == DropboxAPI.STATUS_SUCCESS) {
m_act.setLoggedIn(true);
m_act.storeKeys(m_config.accessTokenKey,
m_config.ac... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onPostExecute" | "@Override
protected void onPostExecute(Integer result) {
super.onPostExecute(result);
if (result == DropboxAPI.STATUS_SUCCESS) {
if (m_config != null
&& m_config.authStatus == DropboxAPI.STATUS_SUCCESS) {
m_act.storeKeys(m_config.accessTokenKey,
m_config.accessTokenSecret);
<MASK>... |
Inversion-Mutation | megadiff | "@Override
public boolean onItemLongClick(final AdapterView<?> l, final View v, final int position, final long id)
{
v.setSelected(true);
final SimpleLocation location = (SimpleLocation) l.getItemAtPosition(position);
final String[] items = getResources().getStringArray(R.array.location_list_fragment_con... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onItemLongClick" | "@Override
public boolean onItemLongClick(final AdapterView<?> l, final View v, final int position, final long id)
{
v.setSelected(true);
final SimpleLocation location = (SimpleLocation) l.getItemAtPosition(position);
final String[] items = getResources().getStringArray(R.array.location_list_fragment_con... |
Inversion-Mutation | megadiff | "public static void main( String[] args )
throws Exception
{
Commands command = new Commands();
DatabaseFormat databaseFormat;
OperationMode mode;
SupportedDatabase databaseType;
try
{
Args.parse( command, args );
databa... | 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 )
throws Exception
{
Commands command = new Commands();
DatabaseFormat databaseFormat;
OperationMode mode;
SupportedDatabase databaseType;
try
{
Args.parse( command, args );
databa... |
Inversion-Mutation | megadiff | "@Override
public void receivePath(AStarPath newPath) {
if (this.waitingForPath)
{
this.path = newPath;
if (!path.isEmpty())
{
world.setNodesOccupied(occupiedNode, entity.getSize(), 0);
this.occupiedNode = path.getNextNode().getNode();
world.setNodesOccupied(occupiedNode, entity.ge... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "receivePath" | "@Override
public void receivePath(AStarPath newPath) {
if (this.waitingForPath)
{
this.path = newPath;
<MASK>world.setNodesOccupied(occupiedNode, entity.getSize(), 0);</MASK>
if (!path.isEmpty())
{
this.occupiedNode = path.getNextNode().getNode();
world.setNodesOccupied(occupiedNod... |
Inversion-Mutation | megadiff | "protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException {
UrlMappingsHolder holder = lookupUrlMappings();
GrailsApplication application = lookupApplication();
GrailsWebRequest webRequest = (Grails... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doFilterInternal" | "protected void doFilterInternal(HttpServletRequest request, HttpServletResponse response, FilterChain filterChain) throws ServletException, IOException {
UrlMappingsHolder holder = lookupUrlMappings();
GrailsApplication application = lookupApplication();
GrailsWebRequest webRequest = (Grails... |
Inversion-Mutation | megadiff | "private List<RelationManager> computeSelectionPath(Component source, Relation relation) {
List<RelationManager> selectionPath = new ArrayList<RelationManager>();
/*
* If resolve = exist or internal, only ApamMan must be called
*/
boolean resolveExternal = relation.getResolve() == ResolvePolicy.EXT... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "computeSelectionPath" | "private List<RelationManager> computeSelectionPath(Component source, Relation relation) {
List<RelationManager> selectionPath = new ArrayList<RelationManager>();
/*
* If resolve = exist or internal, only ApamMan must be called
*/
boolean resolveExternal = relation.getResolve() == ResolvePolicy.EXT... |
Inversion-Mutation | megadiff | "public void drop() {
addCompleteCollideList();
float temp = (pc.getDirection() == Direction.LEFT ? -3f : 3f);
this.setVector2D(new Vector2D(temp, -2f));
this.pc = null;
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "drop" | "public void drop() {
<MASK>this.pc = null;</MASK>
addCompleteCollideList();
float temp = (pc.getDirection() == Direction.LEFT ? -3f : 3f);
this.setVector2D(new Vector2D(temp, -2f));
}" |
Inversion-Mutation | megadiff | "public BaseFrame(Dimension windowSize) {
this.windowSize = windowSize;
add("Center", new GamePanel());
setSize(windowSize);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
c = new Controls();
addKeyListener(c);
addMouseListener(c);
addMouseMotionListener(c);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "BaseFrame" | "public BaseFrame(Dimension windowSize) {
this.windowSize = windowSize;
add("Center", new GamePanel());
setSize(windowSize);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
addKeyListener(c);
addMouseListener(c);
addMouseMotionListener(c);
<MASK>c = new Controls();</MASK... |
Inversion-Mutation | megadiff | "public Report(AssetReportCollection arc) {
this.arc = arc;
logger = JOVALMsg.getLogger();
requests = new HashMap<String, XccdfBenchmark>();
for (ReportRequestType req : arc.getReportRequests().getReportRequest()) {
Object request = req.getContent().getAny();
if (request instanceof XccdfBenchmark) {... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "Report" | "public Report(AssetReportCollection arc) {
this.arc = arc;
requests = new HashMap<String, XccdfBenchmark>();
for (ReportRequestType req : arc.getReportRequests().getReportRequest()) {
Object request = req.getContent().getAny();
if (request instanceof XccdfBenchmark) {
requests.put(req.getId(), (X... |
Inversion-Mutation | megadiff | "private void init() {
setContentView(R.layout.textquestion);
textView = (TextView) findViewById(R.id.textquestion_questionTV);
initButton();
initAnswerEditText();
initContent();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "init" | "private void init() {
setContentView(R.layout.textquestion);
textView = (TextView) findViewById(R.id.textquestion_questionTV);
<MASK>initAnswerEditText();</MASK>
initButton();
initContent();
}" |
Inversion-Mutation | megadiff | "public static double mean(int[] a) {
double mean =0;
int sum = 0;
for (int i=0; i<a.length; i++) {
sum =sum + a[i];
}
mean = sum/(a.length);
return mean;
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "mean" | "public static double mean(int[] a) {
double mean =0;
int sum = 0;
for (int i=0; i<a.length; i++) {
sum =sum + a[i];
<MASK>mean = sum/(a.length);</MASK>
}
return mean;
}" |
Inversion-Mutation | megadiff | "private void createDisk(Properties properties) {
String diskRoot = getDiskZkPath(properties.get(DiskProperties.UUID_KEY).toString());
zk.saveDiskProperties(diskRoot, properties);
DiskUtils.createDisk(properties);
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createDisk" | "private void createDisk(Properties properties) {
String diskRoot = getDiskZkPath(properties.get(DiskProperties.UUID_KEY).toString());
<MASK>DiskUtils.createDisk(properties);</MASK>
zk.saveDiskProperties(diskRoot, properties);
}" |
Inversion-Mutation | megadiff | "@Override
public void init() {
tabPane.addTab("Deer agent", new PopulationPanel());
tabPane.addTab("Grass agent", new PopulationPanel());
tabPane.addTab("Wolf agent", new PopulationPanel());
add(tabPane);
pack();
setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
setTitle("Population settings"... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "init" | "@Override
public void init() {
tabPane.addTab("Deer agent", new PopulationPanel());
tabPane.addTab("Grass agent", new PopulationPanel());
tabPane.addTab("Wolf agent", new PopulationPanel());
add(tabPane);
<MASK>setVisible(true);</MASK>
pack();
setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
... |
Inversion-Mutation | megadiff | "public void setRootComponent(AComponent rootComponent) {
this.contentPanel.getChildren().clear();
this.rootComponent = null;
if (rootComponent != null) {
this.contentPanel.getChildren().add(rootComponent);
this.rootComponent = rootComponent;
}
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "setRootComponent" | "public void setRootComponent(AComponent rootComponent) {
this.contentPanel.getChildren().clear();
this.rootComponent = null;
if (rootComponent != null) {
this.contentPanel.getChildren().add(rootComponent);
}
<MASK>this.rootComponent = rootComponent;</MASK>
... |
Inversion-Mutation | megadiff | "private final void attachWriter(final AtmosphereResource r) {
final AtmosphereRequest request = r.getRequest();
AtmosphereResponse res = r.getResponse();
AsyncIOWriter writer = res.getAsyncIOWriter();
BlockingQueue<AtmosphereResource> queue = (BlockingQueue<AtmosphereResource>)
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "attachWriter" | "private final void attachWriter(final AtmosphereResource r) {
final AtmosphereRequest request = r.getRequest();
AtmosphereResponse res = r.getResponse();
AsyncIOWriter writer = res.getAsyncIOWriter();
BlockingQueue<AtmosphereResource> queue = (BlockingQueue<AtmosphereResource>)
... |
Inversion-Mutation | megadiff | "private ContextGuard(PyObject manager) {
__exit__method = manager.__getattr__("__exit__");
__enter__method = manager.__getattr__("__enter__");
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "ContextGuard" | "private ContextGuard(PyObject manager) {
<MASK>__enter__method = manager.__getattr__("__enter__");</MASK>
__exit__method = manager.__getattr__("__exit__");
}" |
Inversion-Mutation | megadiff | "@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
Log.d("MainActivity", "onActivityResult called with requestCode " + requestCode);
if (!isMosesServiceRunning())
startAndBindService();
if (requestCode == 1) { // Login activity
waitingForResult = false;
swi... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onActivityResult" | "@Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
Log.d("MainActivity", "onActivityResult called with requestCode " + requestCode);
if (!isMosesServiceRunning())
startAndBindService();
if (requestCode == 1) { // Login activity
waitingForResult = false;
swi... |
Inversion-Mutation | megadiff | "@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
String handle = req.getParameter("id");
UserService userService = UserServiceFactory.getUserService();
if (handle != null && userService.isUserLoggedIn()) {
long taskdefHa... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doGet" | "@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
String handle = req.getParameter("id");
UserService userService = UserServiceFactory.getUserService();
<MASK>long taskdefHandle = Long.parseLong(handle);</MASK>
if (handle !=... |
Inversion-Mutation | megadiff | "protected void tearDown() throws Exception {
// Simple strategy to prevent connection leaks
if (connection != null
&& !connection.isClosed())
{
connection.close();
}
connection = null;
testContext = null;
tester = null;
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "tearDown" | "protected void tearDown() throws Exception {
// Simple strategy to prevent connection leaks
if (connection != null
&& !connection.isClosed())
{
connection.close();
<MASK>connection = null;</MASK>
}
testContext = null;
tester ... |
Inversion-Mutation | megadiff | "public static MediaFormat payloadTypeToMediaFormat(
PayloadTypePacketExtension payloadType,
DynamicPayloadTypeRegistry ptRegistry)
{
byte pt = (byte)payloadType.getID();
boolean unknown = false;
//convert params to a name:value map
Li... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "payloadTypeToMediaFormat" | "public static MediaFormat payloadTypeToMediaFormat(
PayloadTypePacketExtension payloadType,
DynamicPayloadTypeRegistry ptRegistry)
{
byte pt = (byte)payloadType.getID();
boolean unknown = false;
//convert params to a name:value map
Li... |
Inversion-Mutation | megadiff | "private void cbFindNext()
{
if (m_pattern == null)
return;
Node root = m_gameTree.getRoot();
Node node = NodeUtils.findInComments(m_currentNode, m_pattern);
if (node == null)
if (m_currentNode != root)
if (showQuestion("End of tree rea... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "cbFindNext" | "private void cbFindNext()
{
if (m_pattern == null)
return;
Node root = m_gameTree.getRoot();
Node node = NodeUtils.findInComments(m_currentNode, m_pattern);
if (node == null)
if (m_currentNode != root)
if (showQuestion("End of tree rea... |
Inversion-Mutation | megadiff | "@Override
public void onBackPressed() {
NavUtils.navigateUpFromSameTask(this);
super.onBackPressed();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onBackPressed" | "@Override
public void onBackPressed() {
<MASK>super.onBackPressed();</MASK>
NavUtils.navigateUpFromSameTask(this);
}" |
Inversion-Mutation | megadiff | "public void save(EncogPersistedObject obj, WriteXML out) {
ActivationGaussian g = (ActivationGaussian)obj;
out.beginTag(obj.getClass().getSimpleName());
out.addProperty(ATTRIBUTE_CENTER, g.getGausian().getCenter());
out.addProperty(ATTRIBUTE_PEAK, g.getGausian().getPeak());
out.addProperty(ATTRIBUTE_WID... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "save" | "public void save(EncogPersistedObject obj, WriteXML out) {
ActivationGaussian g = (ActivationGaussian)obj;
out.addProperty(ATTRIBUTE_CENTER, g.getGausian().getCenter());
out.addProperty(ATTRIBUTE_PEAK, g.getGausian().getPeak());
out.addProperty(ATTRIBUTE_WIDTH, g.getGausian().getWidth());
<MASK>out.beg... |
Inversion-Mutation | megadiff | "public DBInterface(Connection conn, String user) throws java.sql.SQLException
{
this.conn = conn;
userLogged = user;
stmt = conn.createStatement();
String userSchema = this.getUserMetaDataSchemaName() ;
String query = "SET search_path TO " + userSchema + ", cas_metadata, public;";
stmt.execute(qu... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "DBInterface" | "public DBInterface(Connection conn, String user) throws java.sql.SQLException
{
this.conn = conn;
userLogged = user;
String userSchema = this.getUserMetaDataSchemaName() ;
String query = "SET search_path TO " + userSchema + ", cas_metadata, public;";
<MASK>stmt = conn.createStatement();</MASK>
st... |
Inversion-Mutation | megadiff | "private boolean parse(final AttributedList<Path> childs, FTPFileEntryParser parser, BufferedReader reader)
throws IOException {
if(null == reader) {
// This is an empty directory
return false;
}
boolean success = false;
String line;
wh... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "parse" | "private boolean parse(final AttributedList<Path> childs, FTPFileEntryParser parser, BufferedReader reader)
throws IOException {
if(null == reader) {
// This is an empty directory
return false;
}
boolean success = false;
String line;
wh... |
Inversion-Mutation | megadiff | "private void addOrder(final Map<String, String> values) {
long startDate = System.currentTimeMillis();
long endDate = startDate;
long millsInHour = 3600000;
long millsInMinute = 60000;
if (!values.get("scheduled_start_date").isEmpty()) {
try {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "addOrder" | "private void addOrder(final Map<String, String> values) {
long startDate = System.currentTimeMillis();
long endDate = startDate;
long millsInHour = 3600000;
long millsInMinute = 60000;
if (!values.get("scheduled_start_date").isEmpty()) {
try {
... |
Inversion-Mutation | megadiff | "@Override
public void remove() {
if (!mEntryValid) {
throw new IllegalStateException();
}
colRemoveAt(mIndex);
mIndex--;
mEnd--;
mEntryValid = false;
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "remove" | "@Override
public void remove() {
if (!mEntryValid) {
throw new IllegalStateException();
}
mIndex--;
mEnd--;
mEntryValid = false;
<MASK>colRemoveAt(mIndex);</MASK>
}" |
Inversion-Mutation | megadiff | "private boolean parseReg(String regRecord, long orgId)
{
Case currentCase = Case.getCurrentCase(); // get the most updated case
SleuthkitCase tempDb = currentCase.getSleuthkitCase();
try {
File regfile = new File(regRecord);
BufferedReade... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "parseReg" | "private boolean parseReg(String regRecord, long orgId)
{
Case currentCase = Case.getCurrentCase(); // get the most updated case
SleuthkitCase tempDb = currentCase.getSleuthkitCase();
try {
File regfile = new File(regRecord);
BufferedReade... |
Inversion-Mutation | megadiff | "private void insert(OwnIdentity identity) throws IOException {
Bucket tempB = mTBF.makeBucket(64 * 1024); /* FIXME: Tweak */
OutputStream os = null;
try {
os = tempB.getOutputStream();
mWoT.getXMLTransformer().exportOwnIdentity(identity, os);
os.close(); os = null;
tempB.setReadOnly();
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "insert" | "private void insert(OwnIdentity identity) throws IOException {
Bucket tempB = mTBF.makeBucket(64 * 1024); /* FIXME: Tweak */
OutputStream os = null;
try {
os = tempB.getOutputStream();
mWoT.getXMLTransformer().exportOwnIdentity(identity, os);
os.close(); os = null;
tempB.setReadOnly();
... |
Inversion-Mutation | megadiff | "private List<String> addUsersRealm( boolean notify) {
// return the list of user eids for successfully added user
List<String> addedUserEIds = new Vector<String>();
if (userRoleEntries != null && !userRoleEntries.isEmpty()) {
if (site != null) {
// get realm object
String realmId = site.getRef... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "addUsersRealm" | "private List<String> addUsersRealm( boolean notify) {
// return the list of user eids for successfully added user
List<String> addedUserEIds = new Vector<String>();
if (userRoleEntries != null && !userRoleEntries.isEmpty()) {
if (site != null) {
// get realm object
String realmId = site.getRef... |
Inversion-Mutation | megadiff | "public void hidePlaceholder() {
if (super.getTextBox().getText().equals(this.getPlaceholderText())) {
super.getTextBox().setText("");
}
super.getTextBox().removeStyleName(this.getPlaceholderStyleName());
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "hidePlaceholder" | "public void hidePlaceholder() {
if (super.getTextBox().getText().equals(this.getPlaceholderText())) {
super.getTextBox().setText("");
<MASK>super.getTextBox().removeStyleName(this.getPlaceholderStyleName());</MASK>
}
}" |
Inversion-Mutation | megadiff | "public void run() {
try {
int width = Display.getDisplayMode().getWidth();
int height = Display.getDisplayMode().getHeight();
Display.create();
// Display.setDisplayMode(new DisplayMode(width, height));
Display.setFullscreen(true);
Display.setVSyncEnabled(true);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "public void run() {
try {
int width = Display.getDisplayMode().getWidth();
int height = Display.getDisplayMode().getHeight();
Display.create();
// Display.setDisplayMode(new DisplayMode(width, height));
Display.setFullscreen(true);
Display.setVSyncEnabled(true);
... |
Inversion-Mutation | megadiff | "@SuppressWarnings("unchecked")
@Override
public void handleMessage(Message msgP) {
final Activity a = SynodroidFragment.this.getActivity();
if (a != null){
final SynoServer server = ((Synodroid) a.getApplication()).getServer();
Synodroid app = (Synodroid) a.getApplication();
Style msg_sty... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "handleMessage" | "@SuppressWarnings("unchecked")
@Override
public void handleMessage(Message msgP) {
final Activity a = SynodroidFragment.this.getActivity();
<MASK>final SynoServer server = ((Synodroid) a.getApplication()).getServer();</MASK>
if (a != null){
Synodroid app = (Synodroid) a.getApplication();
S... |
Inversion-Mutation | megadiff | "private ByteArrayOutputStream encodeToBytes() throws IOException {
ByteArrayOutputStream buf = new ByteArrayOutputStream();
ObjectOutputStream oos = null;
try {
oos = new ObjectOutputStream(new GZIPOutputStream(buf));
oos.writeObject(this);
} finally {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "encodeToBytes" | "private ByteArrayOutputStream encodeToBytes() throws IOException {
ByteArrayOutputStream buf = new ByteArrayOutputStream();
ObjectOutputStream oos = null;
try {
oos = new ObjectOutputStream(new GZIPOutputStream(buf));
oos.writeObject(this);
} finally {
... |
Inversion-Mutation | megadiff | "protected void processStaleIndexEntries(TitanType type, boolean repair) throws RepairException {
if (!type.isPropertyKey()) {
throw new RepairException("the given type is not a property key");
}
//begin graph and store transactions
InternalTitanTransaction itx = (In... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "processStaleIndexEntries" | "protected void processStaleIndexEntries(TitanType type, boolean repair) throws RepairException {
if (!type.isPropertyKey()) {
throw new RepairException("the given type is not a property key");
}
//begin graph and store transactions
InternalTitanTransaction itx = (In... |
Inversion-Mutation | megadiff | "@Deprecated
@Override
public boolean newMap(URL url) throws FileNotFoundException, XMLParseException, IOException, URISyntaxException {
final IMapViewManager mapViewManager = Controller.getCurrentController().getMapViewManager();
if (mapViewManager.tryToChangeToMapView(url))
return false;
if (AddOn... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "newMap" | "@Deprecated
@Override
public boolean newMap(URL url) throws FileNotFoundException, XMLParseException, IOException, URISyntaxException {
final IMapViewManager mapViewManager = Controller.getCurrentController().getMapViewManager();
if (mapViewManager.tryToChangeToMapView(url))
return false;
if (AddOn... |
Inversion-Mutation | megadiff | "protected void handleCompareInputChange() {
// before setting the new input we have to save the old
Object input = getInput();
if (!isSaving() && (isLeftDirty() || isRightDirty())) {
if (Utilities.RUNNING_TESTS) {
if (Utilities.TESTING_FLUSH_ON_COMPARE_INPUT_CHANGE) {
flushContent(input, n... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "handleCompareInputChange" | "protected void handleCompareInputChange() {
// before setting the new input we have to save the old
Object input = getInput();
if (!isSaving() && (isLeftDirty() || isRightDirty())) {
if (Utilities.RUNNING_TESTS) {
if (Utilities.TESTING_FLUSH_ON_COMPARE_INPUT_CHANGE) {
flushContent(input, n... |
Inversion-Mutation | megadiff | "public void handlePageException(Throwable e)
throws ServletException, IOException
{
if (e instanceof SkipPageException)
return;
HttpServletRequest request = getCauchoRequest();
request.setAttribute("javax.servlet.jsp.jspException", e);
CauchoResponse response = getCauchoRespons... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "handlePageException" | "public void handlePageException(Throwable e)
throws ServletException, IOException
{
if (e instanceof SkipPageException)
return;
HttpServletRequest request = getCauchoRequest();
request.setAttribute("javax.servlet.jsp.jspException", e);
CauchoResponse response = getCauchoRespons... |
Inversion-Mutation | megadiff | "public boolean removeSyncBytes(IResource resource, int depth) throws TeamException {
if (resource.exists() || resource.isPhantom()) {
try {
if (depth != IResource.DEPTH_ZERO || internalGetSyncBytes(resource) != null) {
getSynchronizer().flushSyncInfo(getSyncName(), resource, depth);
return true... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "removeSyncBytes" | "public boolean removeSyncBytes(IResource resource, int depth) throws TeamException {
if (resource.exists() || resource.isPhantom()) {
try {
if (depth != IResource.DEPTH_ZERO || internalGetSyncBytes(resource) != null) {
getSynchronizer().flushSyncInfo(getSyncName(), resource, depth);
}
<MAS... |
Inversion-Mutation | megadiff | "private void traverseShortestPaths() {
Collection<IAtom> canonicalizeAtoms = new SimpleAtomCanonicalisation().canonicalizeAtoms(atomContainer);
for (IAtom sourceAtom : canonicalizeAtoms) {
StringBuffer sb = new StringBuffer();
if (sourceAtom instanceof IPseudoAtom) {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "traverseShortestPaths" | "private void traverseShortestPaths() {
Collection<IAtom> canonicalizeAtoms = new SimpleAtomCanonicalisation().canonicalizeAtoms(atomContainer);
for (IAtom sourceAtom : canonicalizeAtoms) {
StringBuffer <MASK>sb = new StringBuffer();</MASK>
if (sourceAtom instanceof IPseudo... |
Inversion-Mutation | megadiff | "public NodeUpdateService(final Node node) {
this.node = node;
nodeSyncService = new ThreadPoolExecutor(1, 1, 1, TimeUnit.MINUTES,
new LinkedBlockingQueue<Runnable>()) {
@Override
protected void afterExecute(final Runnable r, final Throwable t) {
node.setDegraded(getQueue().isEmpty());
time... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "NodeUpdateService" | "public NodeUpdateService(final Node node) {
this.node = node;
nodeSyncService = new ThreadPoolExecutor(1, 1, 1, TimeUnit.MINUTES,
new LinkedBlockingQueue<Runnable>()) {
@Override
protected void afterExecute(final Runnable r, final Throwable t) {
node.setDegraded(getQueue().isEmpty());
time... |
Inversion-Mutation | megadiff | "@Override
public void run() {
try {
// If there is connection and the timer can work.
if (timerEnabled.get() && node.getChannel() != null
&& node.getChannel().isConnected()) {
// The copy of the signals to send must be isolated
final Set<Signal> signalsCopy = new HashSet<... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "@Override
public void run() {
try {
// If there is connection and the timer can work.
if (timerEnabled.get() && node.getChannel() != null
&& node.getChannel().isConnected()) {
// The copy of the signals to send must be isolated
final Set<Signal> signalsCopy = new HashSet<... |
Inversion-Mutation | megadiff | "protected void doCopyToCimi(final CimiContext context, final Credentials dataService, final CimiCredentials dataCimi) {
this.fill(context, dataService, dataCimi);
if (true == context.mustBeExpanded(dataCimi)) {
dataCimi.setUserName(dataService.getUserName());
dataCimi.setKey... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doCopyToCimi" | "protected void doCopyToCimi(final CimiContext context, final Credentials dataService, final CimiCredentials dataCimi) {
this.fill(context, dataService, dataCimi);
if (true == context.mustBeExpanded(dataCimi)) {
dataCimi.setUserName(dataService.getUserName());
// Next write ... |
Inversion-Mutation | megadiff | "public void draw(SpriteBatch batch, FringeLayer layer, float delta) {
layer.begin();
for (ClientEntity e : entities) {
layer.renderTill(batch, e.getEntity().getY());
e.getView().draw(batch, e, delta);
}
layer.end(batch);
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "draw" | "public void draw(SpriteBatch batch, FringeLayer layer, float delta) {
layer.begin();
for (ClientEntity e : entities) {
<MASK>e.getView().draw(batch, e, delta);</MASK>
layer.renderTill(batch, e.getEntity().getY());
}
layer.end(batch);
}" |
Inversion-Mutation | megadiff | "public boolean addAccount(SipProfile profile) throws SameThreadException {
int status = pjsuaConstants.PJ_FALSE;
if (!created) {
Log.e(THIS_FILE, "PJSIP is not started here, nothing can be done");
return status == pjsuaConstants.PJ_SUCCESS;
}
PjSipAccount... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "addAccount" | "public boolean addAccount(SipProfile profile) throws SameThreadException {
int status = pjsuaConstants.PJ_FALSE;
if (!created) {
Log.e(THIS_FILE, "PJSIP is not started here, nothing can be done");
return status == pjsuaConstants.PJ_SUCCESS;
}
PjSipAccount... |
Inversion-Mutation | megadiff | "@Override
public void synchronizeActiveTasks(final boolean manual, final SyncResultCallback callback) {
callback.started();
callback.incrementMax(100);
gtasksPreferenceService.recordSyncStart();
new Thread(new Runnable() {
public void run() {
c... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "synchronizeActiveTasks" | "@Override
public void synchronizeActiveTasks(final boolean manual, final SyncResultCallback callback) {
callback.started();
callback.incrementMax(100);
gtasksPreferenceService.recordSyncStart();
new Thread(new Runnable() {
public void run() {
c... |
Inversion-Mutation | megadiff | "public void run() {
callback.incrementProgress(50);
String authToken = getValidatedAuthToken();
final GtasksInvoker invoker = new GtasksInvoker(authToken);
try {
gtasksListService.updateLists(invoker.allGtaskLists());
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "public void run() {
callback.incrementProgress(50);
String authToken = getValidatedAuthToken();
final GtasksInvoker invoker = new GtasksInvoker(authToken);
try {
gtasksListService.updateLists(invoker.allGtaskLists());
... |
Inversion-Mutation | megadiff | "public void doAssignedWork() {
logger.finest("Entering method doAssignedWork.");
if (workLeft > 0) {
if (state == UnitState.IMPROVING) {
// Has the improvement been completed already? Do nothing.
if (getWorkImprovement().isComplete()) {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "doAssignedWork" | "public void doAssignedWork() {
logger.finest("Entering method doAssignedWork.");
if (workLeft > 0) {
if (state == UnitState.IMPROVING) {
// Has the improvement been completed already? Do nothing.
if (getWorkImprovement().isComplete()) {
... |
Inversion-Mutation | megadiff | "public void indexFile(SourceFile squidFile, File sonarFile) {
if (canIndexFiles) {
LOG.debug("C# BRIDGE is indexing {}:", squidFile.getKey());
indexChildren(squidFile.getChildren(), sonarFile);
} else {
throw new IllegalStateException(
"The CSharpResourcesBridge has been lock... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "indexFile" | "public void indexFile(SourceFile squidFile, File sonarFile) {
<MASK>LOG.debug("C# BRIDGE is indexing {}:", squidFile.getKey());</MASK>
if (canIndexFiles) {
indexChildren(squidFile.getChildren(), sonarFile);
} else {
throw new IllegalStateException(
"The CSharpResourcesBridge ha... |
Inversion-Mutation | megadiff | "@SuppressWarnings("unchecked")
public PacketHandler() {
try {
final List<ClassInfo> classes = new ArrayList<ClassInfo>(ClassPath
.from(this.getClass().getClassLoader()).getTopLevelClasses(
"logisticspipes.network.packets"));
Collections.sort(classes, new Comparator<ClassInfo>() {
@Ove... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "PacketHandler" | "@SuppressWarnings("unchecked")
public PacketHandler() {
try {
final List<ClassInfo> classes = new ArrayList<ClassInfo>(ClassPath
.from(this.getClass().getClassLoader()).getTopLevelClasses(
"logisticspipes.network.packets"));
Collections.sort(classes, new Comparator<ClassInfo>() {
@Ove... |
Inversion-Mutation | megadiff | "public static void exportConfig(String url) {
try {
FileConnection con = (FileConnection)Connector.open(url);
if (!con.exists()) {
con.create();
}
Configuration.serialise(con.openOutputStream());
String name = con.getName();
con.close();
GpsMid.getInstance().alert(Locale.get("gener... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "exportConfig" | "public static void exportConfig(String url) {
try {
FileConnection con = (FileConnection)Connector.open(url);
if (!con.exists()) {
con.create();
}
Configuration.serialise(con.openOutputStream());
<MASK>con.close();</MASK>
String name = con.getName();
GpsMid.getInstance().alert(Loca... |
Inversion-Mutation | megadiff | "@Override
protected View onCreateDialogView() {
LinearLayout.LayoutParams params;
LinearLayout layout = new LinearLayout(mContext);
layout.setOrientation(LinearLayout.VERTICAL);
layout.setPadding(6, 6, 6, 6);
mValueText = new TextView(mContext);
mValueText.s... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "onCreateDialogView" | "@Override
protected View onCreateDialogView() {
LinearLayout.LayoutParams params;
LinearLayout layout = new LinearLayout(mContext);
layout.setOrientation(LinearLayout.VERTICAL);
layout.setPadding(6, 6, 6, 6);
mValueText = new TextView(mContext);
mValueText.s... |
Inversion-Mutation | megadiff | "@Override
public void remove() {
if (!mEntryValid) {
throw new IllegalStateException();
}
colRemoveAt(mIndex);
mIndex--;
mEnd--;
mEntryValid = false;
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "remove" | "@Override
public void remove() {
if (!mEntryValid) {
throw new IllegalStateException();
}
mIndex--;
mEnd--;
mEntryValid = false;
<MASK>colRemoveAt(mIndex);</MASK>
}" |
Inversion-Mutation | megadiff | "private void createCoverMenu() {
coverMenu = new JPopupMenu();
JMenuItem replaceCoverItem = new JMenuItem("Add/Replace Cover...");
replaceCoverItem.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
MP3File mp3 = getSelectedMP3();
if(mp3 ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createCoverMenu" | "private void createCoverMenu() {
coverMenu = new JPopupMenu();
JMenuItem replaceCoverItem = new JMenuItem("Add/Replace Cover...");
replaceCoverItem.addActionListener(new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
MP3File mp3 = getSelectedMP3();
if(mp3 ... |
Inversion-Mutation | megadiff | "@Override
public void actionPerformed(ActionEvent e) {
MP3File mp3 = getSelectedMP3();
if(mp3 != null){
JFileChooser fileChooser = new JFileChooser();
fileChooser.setAcceptAllFileFilterUsed(false);
fileChooser.setFileFilter(new AllImagesFileFilter());
if(fileChooser.showOpenDialo... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "actionPerformed" | "@Override
public void actionPerformed(ActionEvent e) {
MP3File mp3 = getSelectedMP3();
if(mp3 != null){
JFileChooser fileChooser = new JFileChooser();
<MASK>fileChooser.setFileFilter(new AllImagesFileFilter());</MASK>
fileChooser.setAcceptAllFileFilterUsed(false);
if(fileChooser.... |
Inversion-Mutation | megadiff | "public boolean performItemClick(View view, int position, long id) {
if (mOnItemClickListener != null) {
if (view != null) {
view.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_CLICKED);
}
mOnItemClickListener.onItemClick(this, view, position, id);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "performItemClick" | "public boolean performItemClick(View view, int position, long id) {
if (mOnItemClickListener != null) {
<MASK>playSoundEffect(SoundEffectConstants.CLICK);</MASK>
if (view != null) {
view.sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_CLICKED);
}
... |
Inversion-Mutation | megadiff | "private void call(String procUri, CallMeta resultMeta, Object... arguments) {
WampMessage.Call call = new WampMessage.Call(newId(), procUri, arguments.length);
for (int i = 0; i < arguments.length; ++i) {
call.mArgs[i] = arguments[i];
}
mCalls.put(call.mCallId, resultMeta);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "call" | "private void call(String procUri, CallMeta resultMeta, Object... arguments) {
WampMessage.Call call = new WampMessage.Call(newId(), procUri, arguments.length);
for (int i = 0; i < arguments.length; ++i) {
call.mArgs[i] = arguments[i];
}
<MASK>mWriter.forward(call);</MASK>
... |
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 void stop() {
mLibVLC.stop();
mEventManager.removeHandler(mEventHandler);
setRemoteControlClientPlaybackState(RemoteControlClient.PLAYSTATE_STOPPED);
mCurrentMedia = null;
mMediaList.clear();
mPrevious.clear();
mHandler.removeMessages(SHOW_PROGRES... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "stop" | "private void stop() {
<MASK>mEventManager.removeHandler(mEventHandler);</MASK>
mLibVLC.stop();
setRemoteControlClientPlaybackState(RemoteControlClient.PLAYSTATE_STOPPED);
mCurrentMedia = null;
mMediaList.clear();
mPrevious.clear();
mHandler.removeMessages... |
Inversion-Mutation | megadiff | "final public void argument(ProcedureType procedureType) throws ParseException {
String s = null;
ArgumentType argumentType = null;
DatabaseType argumentDataType = null;
ArgumentTypeDirection argDirection = ArgumentTypeDirection.IN; // by default, arguments are IN
String direction = null;
boolean defaultAss... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "argument" | "final public void argument(ProcedureType procedureType) throws ParseException {
String s = null;
ArgumentType argumentType = null;
DatabaseType argumentDataType = null;
ArgumentTypeDirection argDirection = ArgumentTypeDirection.IN; // by default, arguments are IN
String direction = null;
boolean defaultAss... |
Inversion-Mutation | megadiff | "public void run() {
while (refresh) {
world.explore();
try {
Thread.sleep(ttr * 1000);
} catch (InterruptedException e) { /* Do nothing */
System.out.println(
"Ic2d exploring thread has b... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "public void run() {
while (refresh) {
try {
<MASK>world.explore();</MASK>
Thread.sleep(ttr * 1000);
} catch (InterruptedException e) { /* Do nothing */
System.out.println(
"Ic2d explo... |
Inversion-Mutation | megadiff | "public void publish(HttpServletRequest request,
HttpServletResponse response, Map<String, String> parameters)
throws ServletException, IOException {
try {
// Retrieve the application responsible for the request
List<ColumnOrSuperColumn> application = getApplication(parameters.get("id"));
tr.ope... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "publish" | "public void publish(HttpServletRequest request,
HttpServletResponse response, Map<String, String> parameters)
throws ServletException, IOException {
try {
<MASK>tr.open();</MASK>
// Retrieve the application responsible for the request
List<ColumnOrSuperColumn> application = getApplication(paramete... |
Inversion-Mutation | megadiff | "@Override public boolean toHTML(StringBuilder sb){
// if(title != null && !title.isEmpty())DocGen.HTML.title(sb,title);
if(glm_model == null){
sb.append("No model yet...");
return true;
}
DocGen.HTML.paragraph(sb,"Model Key: "+glm_model._selfKey);
if(glm_model.submodels != null... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "toHTML" | "@Override public boolean toHTML(StringBuilder sb){
// if(title != null && !title.isEmpty())DocGen.HTML.title(sb,title);
<MASK>DocGen.HTML.paragraph(sb,"Model Key: "+glm_model._selfKey);</MASK>
if(glm_model == null){
sb.append("No model yet...");
return true;
}
if(glm_model.subm... |
Inversion-Mutation | megadiff | "@Override
public void actionPerformed(ActionEvent actionEvent) {
listModel.setMessage("Loading list of data sets... just a moment");
cultureHubClient.fetchDataSetList(new CultureHubClient.ListReceiveListener() {
@Override
public void listReceived(final List<CultureHubCl... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "actionPerformed" | "@Override
public void actionPerformed(ActionEvent actionEvent) {
listModel.setMessage("Loading list of data sets... just a moment");
cultureHubClient.fetchDataSetList(new CultureHubClient.ListReceiveListener() {
@Override
public void listReceived(final List<CultureHubCl... |
Inversion-Mutation | megadiff | "@Override
public void failed(Exception e) {
LOG.warn("Fetching list failed", e);
sipModel.getFeedback().alert("Failed to receive data set list");
Exec.swing(new Runnable() {
@Override
public void run() {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "failed" | "@Override
public void failed(Exception e) {
LOG.warn("Fetching list failed", e);
Exec.swing(new Runnable() {
@Override
public void run() {
<MASK>sipModel.getFeedback().alert("Failed to receive data set li... |
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 | "protected void installUsingP2( final String repositoryURL, final String installIU, final String destination,
final Map<String, String> extraEnv )
throws Exception
{
FileUtils.deleteDirectory( destination );
final File basedir = ResourceExtractor.sim... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "installUsingP2" | "protected void installUsingP2( final String repositoryURL, final String installIU, final String destination,
final Map<String, String> extraEnv )
throws Exception
{
FileUtils.deleteDirectory( destination );
final File basedir = ResourceExtractor.sim... |
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 | "protected void initialize(IParseController controller, Language language) {
// (Thrown exceptions are shown directly in the editor view.)
this.language = language;
if (controller instanceof DynamicParseController)
this.parseController = (SGLRParseController) ((DynamicParseController) controller).getWrappe... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "initialize" | "protected void initialize(IParseController controller, Language language) {
// (Thrown exceptions are shown directly in the editor view.)
if (controller instanceof DynamicParseController)
this.parseController = (SGLRParseController) ((DynamicParseController) controller).getWrapped();
<MASK>this.language ... |
Inversion-Mutation | megadiff | "private void processPushBundle(boolean isPushPluginActive) {
Bundle extras = getIntent().getExtras();
if (extras != null) {
Bundle originalExtras = extras.getBundle("pushBundle");
if (!isPushPluginActive) {
originalExtras.putBoolean("coldstart", true);
}
PushPlug... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "processPushBundle" | "private void processPushBundle(boolean isPushPluginActive) {
Bundle extras = getIntent().getExtras();
if (extras != null) {
Bundle originalExtras = extras.getBundle("pushBundle");
if (!isPushPluginActive) {
originalExtras.putBoolean("coldstart", true);
<MASK>PushPlugin.s... |
Inversion-Mutation | megadiff | "void scheduleSync(Account account, boolean uploadChangesOnly, String url) {
Bundle extras = new Bundle();
if (uploadChangesOnly) {
extras.putBoolean(ContentResolver.SYNC_EXTRAS_UPLOAD, uploadChangesOnly);
}
if (url != null) {
extras.... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "scheduleSync" | "void scheduleSync(Account account, boolean uploadChangesOnly, String url) {
Bundle extras = new Bundle();
if (uploadChangesOnly) {
extras.putBoolean(ContentResolver.SYNC_EXTRAS_UPLOAD, uploadChangesOnly);
}
if (url != null) {
extras.... |
Inversion-Mutation | megadiff | "private static ProgramPathDisabler createProgramPathsChain(Configuration configuration) {
return new ProgramPathDisabler(
new ConfigurationProgramPaths(configuration,
new WindowsRegistryProgramPaths(
new PlatformSpecificDefaultPathsFactory().get())));
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "createProgramPathsChain" | "private static ProgramPathDisabler createProgramPathsChain(Configuration configuration) {
return new ProgramPathDisabler(
<MASK>new WindowsRegistryProgramPaths(</MASK>
new ConfigurationProgramPaths(configuration,
new PlatformSpecificDefaultPathsFactory().get())));
}" |
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 | "@Override
public void write(Cluster cluster) throws IOException {
StringBuilder line = new StringBuilder();
line.append(createNode(String.valueOf(cluster.getId())));
List<WeightedVectorWritable> points = getClusterIdToPoints().get(cluster.getId());
if (points != null) {
for (WeightedVecto... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "write" | "@Override
public void write(Cluster cluster) throws IOException {
StringBuilder line = new StringBuilder();
line.append(createNode(String.valueOf(cluster.getId())));
List<WeightedVectorWritable> points = getClusterIdToPoints().get(cluster.getId());
if (points != null) {
for (WeightedVecto... |
Inversion-Mutation | megadiff | "public AssemblyInfo getAssemblyInfo()
{
String basedir = mavenProject.getBasedir().toString();
AssemblyInfo assemblyInfo = new AssemblyInfo();
String description = mavenProject.getDescription();
String version = mavenProject.getVersion();
String name = mavenProject.get... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getAssemblyInfo" | "public AssemblyInfo getAssemblyInfo()
{
String basedir = mavenProject.getBasedir().toString();
AssemblyInfo assemblyInfo = new AssemblyInfo();
String description = mavenProject.getDescription();
String version = mavenProject.getVersion();
String name = mavenProject.get... |
Inversion-Mutation | megadiff | "public void stop() throws JMSException {
toConnection.stop();
fromConnection.stop();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "stop" | "public void stop() throws JMSException {
fromConnection.stop();
<MASK>toConnection.stop();</MASK>
}" |
Inversion-Mutation | megadiff | "public static Collection<String> getGuestAccountsToDelete(int limit) {
List<String> uids = new ArrayList<String>();
try {
int excess = guestUserCount() - limit;
Base64Counter count = new Base64Counter();
while (excess-- > 0) {
// Deletes oldest ones first
String uid;
do {
uid = ... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "getGuestAccountsToDelete" | "public static Collection<String> getGuestAccountsToDelete(int limit) {
List<String> uids = new ArrayList<String>();
try {
int excess = guestUserCount() - limit;
while (excess-- > 0) {
// Deletes oldest ones first
<MASK>Base64Counter count = new Base64Counter();</MASK>
String uid;
do ... |
Inversion-Mutation | megadiff | "private void loadAndBindAllApps() {
final long t = DEBUG_LOADERS ? SystemClock.uptimeMillis() : 0;
// Don't use these two variables in any of the callback runnables.
// Otherwise we hold a reference to them.
final Callbacks oldCallbacks = mCallbacks... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "loadAndBindAllApps" | "private void loadAndBindAllApps() {
final long t = DEBUG_LOADERS ? SystemClock.uptimeMillis() : 0;
// Don't use these two variables in any of the callback runnables.
// Otherwise we hold a reference to them.
final Callbacks oldCallbacks = mCallbacks... |
Inversion-Mutation | megadiff | "public void testBuildIndex() {
try {
indexBuilder.startup();
// run buildIndex
indexBuilder.doCommand(new IndexAllCommand(), new IndexBuilderListener() {
public void buildSuccess(IndexBuilderEvent event) {
try {
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "testBuildIndex" | "public void testBuildIndex() {
try {
indexBuilder.startup();
// run buildIndex
indexBuilder.doCommand(new IndexAllCommand(), new IndexBuilderListener() {
public void buildSuccess(IndexBuilderEvent event) {
try {
... |
Inversion-Mutation | megadiff | "public void buildError(IndexBuilderEvent event) {
buildFinished = true;
fail();
}" | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "buildError" | "public void buildError(IndexBuilderEvent event) {
<MASK>fail();</MASK>
buildFinished = true;
}" |
Inversion-Mutation | megadiff | "private List<GlobalSilverContent> transformSilverContentsToGlobalSilverContents(
List<SilverContentInterface> silverContentTempo, String instanceId,
PdcSearchSessionController pdcSC)
throws Exception {
List<GlobalSilverContent> alSilverContents = new ArrayList<GlobalSilverContent>();
Sil... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "transformSilverContentsToGlobalSilverContents" | "private List<GlobalSilverContent> transformSilverContentsToGlobalSilverContents(
List<SilverContentInterface> silverContentTempo, String instanceId,
PdcSearchSessionController pdcSC)
throws Exception {
List<GlobalSilverContent> alSilverContents = new ArrayList<GlobalSilverContent>();
Sil... |
Inversion-Mutation | megadiff | "private void storeHistory(ConnectionResource conn, History history,
Repository repository) throws SQLException {
Integer reposId = null;
Map<String, Integer> authors = null;
Map<String, Integer> files = null;
PreparedStatement addChangeset = null;
PreparedSta... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "storeHistory" | "private void storeHistory(ConnectionResource conn, History history,
Repository repository) throws SQLException {
Integer reposId = null;
Map<String, Integer> authors = null;
Map<String, Integer> files = null;
PreparedStatement addChangeset = null;
PreparedSta... |
Inversion-Mutation | megadiff | "public void run() {
FileConnection file = null;
InputStream is = null;
Image capturedImage = null;
try {
file = (FileConnection) Connector.open("file://" + imagePath, Connector.READ_WRITE);
is = file.openInputStream();
capturedImage = Image.createImage(is);
... | You are a Java Developer and you want to perform "Inversion-Mutation" by changing order of statementsfor provided "run" | "public void run() {
FileConnection file = null;
InputStream is = null;
Image capturedImage = null;
try {
file = (FileConnection) Connector.open("file://" + imagePath, Connector.READ_WRITE);
is = file.openInputStream();
capturedImage = Image.createImage(is);
... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.