Code Monkey home page Code Monkey logo

Comments (1)

twiglet avatar twiglet commented on August 13, 2024
class TC {

        public TC() {}

        public bool TCtest1(out string modifiedUrlString, string urlString){
        modifiedUrlString = urlString.ToUpper();
    return false;
    }

        public bool TCtest2(out string user, out string passwd, string urlString){
        user = urlString.ToUpper();
        passwd = urlString.ToLower();
    return true;
    }


        public void TCtest(string urlString)
        {

            string modifiedUrlString=null;
            string engineAuthUser=null;
            string engineAuthPassword=null;

            if (TCtest1(out modifiedUrlString, urlString))
            {
                System.Console.WriteLine(modifiedUrlString);
            }
            else if (TCtest2(out engineAuthUser, out engineAuthPassword, urlString))
            {
                if (!String.IsNullOrEmpty(engineAuthUser) && !String.IsNullOrEmpty(engineAuthPassword))
                {
                    System.Console.WriteLine(engineAuthUser + engineAuthPassword);
                }
                else
                {
                    System.Console.WriteLine("Null or Null");
                }
            }
            else
            {
            System.Console.WriteLine("They really didn't like us");
            }
        }

        public void TCtest_workaround(string urlString)
        {

            string modifiedUrlString=null;
            string engineAuthUser=null;
            string engineAuthPassword=null;

    bool optTCTest1 = TCtest1(out modifiedUrlString, urlString);
            if (optTCTest1)
            {
                System.Console.WriteLine(modifiedUrlString);
            }
            else {
        bool optTCTest2 = TCtest2(out engineAuthUser, out engineAuthPassword, urlString);
        if (optTCTest2)
                {
        if (!String.IsNullOrEmpty(engineAuthUser) && !String.IsNullOrEmpty(engineAuthPassword))
                    {
            System.Console.WriteLine(engineAuthUser + engineAuthPassword);
                    }
                    else
                    {
            System.Console.WriteLine("Null or Null");
                    }
        }
                else
                {
                    System.Console.WriteLine("They really didn't like us");
                }
           }
        }

gives

//

package Tester.RefOut;

import CS2JNet.JavaSupport.language.RefSupport;
import CS2JNet.System.StringSupport;

public class TC
{
public TC() throws Exception {
}

public boolean tCtest1(RefSupport<String> modifiedUrlString, String urlString) throws Exception {
    modifiedUrlString.setValue(urlString.toUpperCase());
    return false;
}

public boolean tCtest2(RefSupport<String> user, RefSupport<String> passwd, String urlString) throws Exception {
    user.setValue(urlString.toUpperCase());
    passwd.setValue(urlString.toLowerCase());
    return true;
}

public void tCtest(String urlString) throws Exception {
    String modifiedUrlString = null;
    String engineAuthUser = null;
    String engineAuthPassword = null;
    boolean boolVar___0 = tCtest1(refVar___0,urlString);
    if (boolVar___0)
    {
        System.out.println(modifiedUrlString);
    }
    else
    {
        RefSupport<String> refVar___0 = new RefSupport<String>();
        RefSupport<String> refVar___1 = new RefSupport<String>();
        RefSupport<String> refVar___2 = new RefSupport<String>();
        boolean boolVar___1 = tCtest2(refVar___1,refVar___2,urlString);
        modifiedUrlString = refVar___0.getValue();
        engineAuthUser = refVar___1.getValue();
        engineAuthPassword = refVar___2.getValue();
        if (boolVar___1)
        {
            if (!StringSupport.isNullOrEmpty(engineAuthUser) && !StringSupport.isNullOrEmpty(engineAuthPassword))
            {
                System.out.println(engineAuthUser + engineAuthPassword);
            }
            else
            {
                System.out.println("Null or Null");
            } 
        }
        else
        {
            System.out.println("They really didn't like us");
        } 
    } 
}

public void tCtest_workaround(String urlString) throws Exception {
    String modifiedUrlString = null;
    String engineAuthUser = null;
    String engineAuthPassword = null;
    RefSupport<String> refVar___3 = new RefSupport<String>();
    boolean optTCTest1 = tCtest1(refVar___3,urlString);
    modifiedUrlString = refVar___3.getValue();
    if (optTCTest1)
    {
        System.out.println(modifiedUrlString);
    }
    else
    {
        RefSupport<String> refVar___4 = new RefSupport<String>();
        RefSupport<String> refVar___5 = new RefSupport<String>();
        boolean optTCTest2 = tCtest2(refVar___4,refVar___5,urlString);
        engineAuthUser = refVar___4.getValue();
        engineAuthPassword = refVar___5.getValue();
        if (optTCTest2)
        {
            if (!StringSupport.isNullOrEmpty(engineAuthUser) && !StringSupport.isNullOrEmpty(engineAuthPassword))
            {
                System.out.println(engineAuthUser + engineAuthPassword);
            }
            else
            {
                System.out.println("Null or Null");
            } 
        }
        else
        {
            System.out.println("They really didn't like us");
        } 
    } 
}

}

from cs2j.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.