// Path: src/main/java/com/versionone/jenkins/MessagesRes.java
// public class MessagesRes {
// 
//     private final static ResourceBundleHolder holder = ResourceBundleHolder.get(MessagesRes.class);
// 
//     public static String VersionOne_Notifier() {
//         return holder.format("VersionOne.Notifier");
//     }
// 
//     public static Localizable _VersionOne_Notifier() {
//         return new Localizable(holder, "VersionOne.Notifier");
//     }
// 
//     public static String connectionValid() {
//         return holder.format("connectionValid");
//     }
// 
//     public static String connectionFailedPath() {
//         return holder.format("connectionFailedPath");
//     }
// 
//     public static String connectionFailedUsername() {
//         return holder.format("connectionFailedUsername");
//     }
// 
//     public static String connectionFailedRefField(Object string) {
//         return holder.format("connectionFailedRefField", string);
//     }
// 
//     public static String connectionFailedProxyUrlMalformed() {
//         return holder.format("connectionFailedProxyUrlMalformed");
//     }
// 
//     public static String connectionFailedAccessToken() {
//         return holder.format("connectionFailedAccessToken");
//     }
// 
//     public static String cannotBeEmpty() {
//         return holder.format("cannotBeEmpty");
//     }
// 
//     public static String pathWrong() {
//         return holder.format("pathWrong");
//     }
// 
//     public static String pattternWrong() {
//         return holder.format("patternWrong");
//     }
// 
//     public static String processSuccess() {
//         return holder.format("processedSuccessfully");
//     }
// 
//     public static String connectionIsNotCorrect() {
//         return holder.format("connectionIsNotCorrect");
//     }
// 
//     public static String buildRunAlreadyExist() {
//         return holder.format("buildRunAlreadyExist");
//     }
// 
//     public static String buildProjectNotFound() {
//         return holder.format("buildProjectNotFound");
//     }
// 
//     public static String workitemClosedCannotAttachData(String workitemId) {
//         return holder.format("workitemClosedCannotAttachData", workitemId);
//     }
// }


import java.io.PrintStream;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import com.versionone.DB;
import com.versionone.apiclient.exceptions.APIException;
import com.versionone.apiclient.exceptions.ConnectionException;
import com.versionone.apiclient.exceptions.OidException;
import com.versionone.apiclient.filters.*;
import com.versionone.apiclient.interfaces.IAttributeDefinition;
import com.versionone.jenkins.MessagesRes;
import com.versionone.apiclient.exceptions.V1Exception;
import com.versionone.apiclient.interfaces.IAssetType;
import com.versionone.apiclient.interfaces.IServices;
import com.versionone.apiclient.services.QueryResult;
import com.versionone.apiclient.*;
import java.net.MalformedURLException;
        }
    }

    private String buildChangeSetName(VcsModification change) {
        StringBuilder name = new StringBuilder();
        name.append('\'');
        name.append(change.getUserName());
        if (change.getDate() != null) {
            name.append("\' on \'");
            name.append(new DB.DateTime(change.getDate()));
        }
        name.append('\'');
        return name.toString();
    }

    private void associateWithBuildRun(Asset buildRun, Collection<Asset> changeSets, Set<Asset> workitems) throws V1Exception, MalformedURLException {
        IAttributeDefinition buildRunChangeSetsAttrDef = buildRun.getAssetType().getAttributeDefinition("ChangeSets");
        for (Asset changeSet : changeSets) {
            IAttributeDefinition changeSetNameAttrDef = changeSet.getAssetType().getAttributeDefinition("Name");
            IAttributeDefinition changeSetPrimaryWorkitemsAttrDef = changeSet.getAssetType().getAttributeDefinition("PrimaryWorkitems");

            buildRun.addAttributeValue(buildRunChangeSetsAttrDef, changeSet.getOid());

            logger.println("VersionOne: Added changeset " + changeSet.getAttribute(changeSetNameAttrDef).getValue());

            for (Asset workitem : workitems) {
                IAttributeDefinition workItemIsClosedAttrDef = workitem.getAssetType().getAttributeDefinition("IsClosed");
                IAttributeDefinition workItemCompletedInBuildRunsAttrDef = workitem.getAssetType().getAttributeDefinition("CompletedInBuildRuns");

                if (Boolean.parseBoolean(workitem.getAttribute(workItemIsClosedAttrDef).getValue().toString())) {
// Path: src/main/java/com/versionone/jenkins/MessagesRes.java
// public class MessagesRes {
// 
//     private final static ResourceBundleHolder holder = ResourceBundleHolder.get(MessagesRes.class);
// 
//     public static String VersionOne_Notifier() {
//         return holder.format("VersionOne.Notifier");
//     }
// 
//     public static Localizable _VersionOne_Notifier() {
//         return new Localizable(holder, "VersionOne.Notifier");
//     }
// 
//     public static String connectionValid() {
//         return holder.format("connectionValid");
//     }
// 
//     public static String connectionFailedPath() {
//         return holder.format("connectionFailedPath");
//     }
// 
//     public static String connectionFailedUsername() {
//         return holder.format("connectionFailedUsername");
//     }
// 
//     public static String connectionFailedRefField(Object string) {
//         return holder.format("connectionFailedRefField", string);
//     }
// 
//     public static String connectionFailedProxyUrlMalformed() {
//         return holder.format("connectionFailedProxyUrlMalformed");
//     }
// 
//     public static String connectionFailedAccessToken() {
//         return holder.format("connectionFailedAccessToken");
//     }
// 
//     public static String cannotBeEmpty() {
//         return holder.format("cannotBeEmpty");
//     }
// 
//     public static String pathWrong() {
//         return holder.format("pathWrong");
//     }
// 
//     public static String pattternWrong() {
//         return holder.format("patternWrong");
//     }
// 
//     public static String processSuccess() {
//         return holder.format("processedSuccessfully");
//     }
// 
//     public static String connectionIsNotCorrect() {
//         return holder.format("connectionIsNotCorrect");
//     }
// 
//     public static String buildRunAlreadyExist() {
//         return holder.format("buildRunAlreadyExist");
//     }
// 
//     public static String buildProjectNotFound() {
//         return holder.format("buildProjectNotFound");
//     }
// 
//     public static String workitemClosedCannotAttachData(String workitemId) {
//         return holder.format("workitemClosedCannotAttachData", workitemId);
//     }
// }


// Path: src/main/java/com/versionone/integration/ciCommon/V1Worker.java
import java.io.PrintStream;
import java.util.*;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import com.versionone.DB;
import com.versionone.apiclient.exceptions.APIException;
import com.versionone.apiclient.exceptions.ConnectionException;
import com.versionone.apiclient.exceptions.OidException;
import com.versionone.apiclient.filters.*;
import com.versionone.apiclient.interfaces.IAttributeDefinition;
import com.versionone.jenkins.MessagesRes;
import com.versionone.apiclient.exceptions.V1Exception;
import com.versionone.apiclient.interfaces.IAssetType;
import com.versionone.apiclient.interfaces.IServices;
import com.versionone.apiclient.services.QueryResult;
import com.versionone.apiclient.*;
import java.net.MalformedURLException;

        }
    }

    private String buildChangeSetName(VcsModification change) {
        StringBuilder name = new StringBuilder();
        name.append('\'');
        name.append(change.getUserName());
        if (change.getDate() != null) {
            name.append("\' on \'");
            name.append(new DB.DateTime(change.getDate()));
        }
        name.append('\'');
        return name.toString();
    }

    private void associateWithBuildRun(Asset buildRun, Collection<Asset> changeSets, Set<Asset> workitems) throws V1Exception, MalformedURLException {
        IAttributeDefinition buildRunChangeSetsAttrDef = buildRun.getAssetType().getAttributeDefinition("ChangeSets");
        for (Asset changeSet : changeSets) {
            IAttributeDefinition changeSetNameAttrDef = changeSet.getAssetType().getAttributeDefinition("Name");
            IAttributeDefinition changeSetPrimaryWorkitemsAttrDef = changeSet.getAssetType().getAttributeDefinition("PrimaryWorkitems");

            buildRun.addAttributeValue(buildRunChangeSetsAttrDef, changeSet.getOid());

            logger.println("VersionOne: Added changeset " + changeSet.getAttribute(changeSetNameAttrDef).getValue());

            for (Asset workitem : workitems) {
                IAttributeDefinition workItemIsClosedAttrDef = workitem.getAssetType().getAttributeDefinition("IsClosed");
                IAttributeDefinition workItemCompletedInBuildRunsAttrDef = workitem.getAssetType().getAttributeDefinition("CompletedInBuildRuns");

                if (Boolean.parseBoolean(workitem.getAttribute(workItemIsClosedAttrDef).getValue().toString())) {
                    logger.println("VersionOne: " + MessagesRes.workitemClosedCannotAttachData(getWorkitemDisplayString(workitem)));