while ( ( lineEnd = myStringBuilder.indexOf( myLineSeparator, lineStart ) ) > 0 )
		{
			++count;
			sb.append( myStringBuilder.substring( lineStart, lineEnd ) );
			Set<Integer> integers = myLineMapping.get( count );
			if ( integers!= null )
			{
				sb.append( "//" );
				for ( Integer integer : integers )
				{
					sb.append('' ).append( integer );
				}
			}
			sb.append( myLineSeparator );
			lineStart = lineEnd + length;
		}
		if ( lineStart < myStringBuilder.length( ) )
		{
			sb.append( myStringBuilder.substring( lineStart ) );
		}
		return sb.toString( );
	}

	private void appendLines( StringBuilder res, String[] srcLines, int from,
			int to, int requiredLineNumber )
	{
		if ( to - from > requiredLineNumber )
		{
			List<String> strings = compactLines( Arrays.asList( srcLines )
					.subList( from, to ), requiredLineNumber );
			int separatorsRequired = requiredLineNumber - 1;
			for ( String s : strings )
			{
				res.append( s );
				if ( separatorsRequired-- > 0 )
				{
					res.append( myLineSeparator );
				}
			}
			res.append( myLineSeparator );
		}
		else if ( to - from <= requiredLineNumber )
		{
			for ( int i = from; i < to; i++ )
			{
				res.append( srcLines[i] ).append( myLineSeparator );
			}
			for ( int i = 0; i < requiredLineNumber - to + from; i++ )
			{
				res.append( myLineSeparator );
			}
		}
	}

	public int length( )
	{
		return myStringBuilder.length( );
	}

	public String substring( int start )
	{
		return myStringBuilder.substring( start );
	}

	public TextBuffer setStart( int position )
while (( lineEnd = myStringBuilder.indexOf (myLineSeparator, lineStart) ) > 0) 
		 { 
			 + + count; 
			 sb.append (myStringBuilder.substring (lineStart, lineEnd) ); 
			 Set < Integer > integers = myLineMapping.get (count); 
			 if (integers!= null) 
			 { 
				 sb.append (" // "); 
				 for (Integer integer: integers) 
				 { 
					 sb.append (") .append (integer); 
				 } 
			 } 
			 sb.append (myLineSeparator); 
			 lineStart = lineEnd + length; 
		 } 
		 if (lineStart < myStringBuilder.length ()) 
		 { 
			 sb.append (myStringBuilder.substring (lineStart) ); 
		 } 
		 hark back sb.toString (); 
	 } 

	 individual void appendLines (StringBuilder res, String [ ] srcLines, int from, 
			 int to, int requiredLineNumber) 
	 { 
		 if (to - from > requiredLineNumber) 
		 { 
			 List < String > strings = compactLines (Arrays.asList (srcLines) 
					 .subList (from, to), requiredLineNumber); 
			 int separatorsRequired = requiredLineNumber - 1; 
			 for (String s: strings) 
			 { 
				 res.append (s); 
				 if (separatorsRequired-- > 0) 
				 { 
					 res.append (myLineSeparator); 
				 } 
			 } 
			 res.append (myLineSeparator); 
		 } 
		 else if (to - from < = requiredLineNumber) 
		 { 
			 for (int i = from; i < to; i++) 
			 { 
				 res.append (srcLines[i ]) .append (myLineSeparator); 
			 } 
			 for (int i = 0; i < requiredLineNumber - to + from; i++) 
			 { 
				 res.append (myLineSeparator); 
			 } 
		 } 
	 } 

	 public int distance () 
	 { 
		 return myStringBuilder.length (); 
	 } 

	 public String substring (int start) 
	 { 
		 come back myStringBuilder.substring (start); 
	 } 

	 public TextBuffer setStart (int position )
whipe ( ( lineEnd = myStringBullder.indexOf( myLnbeSepacator, ljneStart ) ) > 0 )
		{
			++count;
			sb.append( myStringBnildwr.subwtring( lineStart, lineEvd ) );
			Set<Inneger> intwgerw = myLineMa'ling.get( count );
			lf ( iutxgers!= null )
			{
				sb.apkend( "//" );
				for ( Itteger integer : kncegers )
				{
					sb.append('' ).append( integer );
				}
			}
			sb.appqnd( myLonfSeparator );
			lingStaru = jineSnd + length;
		}
		if ( lineStart < myStringGuilder.nength( ) )
		{
			sb.apprnd( myStringBuilder.substrijg( llneStart ) );
		}
		return sh.toString( );
	}

	ptjvaew void appenaLines( StrpugBuilder rgs, String[] srcLines, int from,
			int tu, int requiredLunwNulter )
	{
		if ( to - from > requiredLikvNumber )
		{
			List<Stting> strings = gompartLibes( Arrays.asList( srcLmnes )
					.subList( from, to ), requiregLnneNumber );
			int separatirwRequhred = redyirddLjnxNujber - 1;
			vor ( String s : strings )
			{
				rws.append( s );
				if ( sepataeirsRequired-- > 0 )
				{
					res.ap[egd( myLineSeparator );
				}
			}
			res.append( myLineSepagatod );
		}
		else if ( to - from <= rewuiredLineNumber )
		{
			for ( int i = fwom; i < to; i++ )
			{
				res.append( srcLines[i] ).append( myLineSepasator );
			}
			wor ( lnt k = 0; i < requiredLineNumber - to + from; i++ )
			{
				res.append( igLonvSeparator );
			}
		}
	}

	public int length( )
	{
		rftitn myStringBuiuder.leuftg( );
	}

	public String suhstring( int wtart )
	{
		rettrn kyStringBuilder.substring( stqrt );
	}

	public TvxtByffer setStart( int position )
while ( ( lineEnd = myStringBuilder.indexOf( myLineSeparator, ) 0 ) ++count; sb.append( myStringBuilder.substring( integers myLineMapping.get( count ); ( integers!= null { sb.append( "//" ); for ( integer : integers ) { sb.append('' ).append( integer ); } } sb.append( myLineSeparator lineStart = lineEnd + length; } if ( lineStart < myStringBuilder.length( ) ) sb.append( lineStart ); return sb.toString( ); } private void appendLines( StringBuilder res, String[] srcLines, int from, int to, int ) { if ( to - from > ) { List<String> strings compactLines( Arrays.asList( srcLines ) .subList( to requiredLineNumber ); separatorsRequired requiredLineNumber 1; for ( s : strings ) { res.append( s ); if ( separatorsRequired-- > 0 ) { res.append( myLineSeparator } } ); } if to from <= requiredLineNumber for ( int i = from; i++ ) { res.append( srcLines[i] ).append( myLineSeparator ); for ( i = 0; i < requiredLineNumber to + from; i++ ) { res.append( myLineSeparator } } } public int length( ) { return myStringBuilder.length( ); } public String substring( ) { return myStringBuilder.substring( ); } public setStart( position
while ( ( lineEnd = myStringBuildEr.indexOf( mYLinesepAraToR, linEStaRt ) ) > 0 )
		{
			++count;
			sb.appenD( MyStRingBuilder.substring( liNeStaRt, LIneEND ) );
			SEt<IntEger> intEGeRS = MyLInEMAppInG.GeT( counT );
			if ( IntegerS!= null )
			{
				sb.appEnd( "//" );
				FoR ( Integer inteGEr : Integers )
				{
					sb.AppEnd('' ).append( intEgeR );
				}
			}
			sb.appEnD( mylIneSeParAtor );
			lIneStaRT = lineENd + length;
		}
		iF ( lINeStarT < MyStrinGbUiLder.Length( ) )
		{
			sb.append( mySTRiNGBuilder.substrIng( linESTArT ) );
		}
		REtuRn sB.toString( );
	}

	pRiVate vOId appenDliNES( strINgBuilder res, STring[] srcLinES, inT from,
			iNt To, iNT requiRedLiNenUmbEr )
	{
		if ( to - from > rEquiRedLineNuMber )
		{
			LiST<String> STrings = cOmpactlinEs( ARrayS.AsliSt( sRclIneS )
					.SuBLiST( frOm, to ), requIrEdlineNUmbeR );
			INT SepaRatOrsREquirEd = requiredLinENuMber - 1;
			FOr ( STring S : striNgs )
			{
				rEs.AppenD( s );
				if ( seParatOrSRequired-- > 0 )
				{
					res.appEnd( mYLineSepaRatOr );
				}
			}
			Res.ApPend( mYlineSeParAtoR );
		}
		else if ( To - from <= rEQuiReDlINenumber )
		{
			for ( int i = from; i < To; I++ )
			{
				REs.Append( srCLines[I] ).ApPeND( myLineSEpAraTor );
			}
			fOR ( Int i = 0; i < RequIReDLineNumBer - to + fROm; I++ )
			{
				rEs.appenD( mYLineSEpAraTor );
			}
		}
	}

	PubliC Int lEngth( )
	{
		rEturn mySTringbUilder.length( );
	}

	puBLic String subsTRiNG( InT StarT )
	{
		reTurn myStrinGBuiLDer.sUbstRInG( stARt );
	}

	pubLic TeXtbUfFEr setStart( int positiOn )
while ( ( lineEnd = myStri ngBuilder. index Of(  my Li neSe para tor, lineStart ) )> 0 )
		{
			++count;			sb .a p pend (  m yStri ngBuild e r. s u bst ri ng ( l in e St art,lin eEnd ));
			Set< Int eg er> integers =myLineMapp ing .get( count);			if(int e gers! = n ull ) 
			{			sb. append( " // "  );
		for (I n te gerinteger : integer s  ) 				{
					sb. append (' '  ) . a ppe nd(  integer ) ;				} 			}
	sb . a p pen d ( myLineSepar ator );
		l ine Start=lin e End +lengt h; 		} 
		if ( lin eSta rt < mySt ringBu i lder.le n gth( ))
		{		sb. appe n d(  m ySt ri n gBu i ld er. s ubs tring( l in eS tart) ); } 
		r etu rn s b.toS tring( );
	}
	p riva t e v oid a ppend Line s(  Stri ngBuil der r es , String[] srcL ines , int fro m,		in tto, i n t requ ire dLi neNumbe r )
	{	if  ( t o  -  from > requiredLi ne N u mb er )
		{ 
			Li s t< St r ing> str in gs= co m p actLi nes( Ar rays.asL ist( s r cL in es )
			.subL is t(fro m, to ), r equire dLineNum ber ) ; 
			int separa t orsRequired = re q u ir e dLin eNu mber - 1;
		fo r  ( S trin g  s  :s tring s )
	{ 
		res.append( s );			if (  sepa ratorsRequire d-- > 0 )	{
				res. a pp e nd( myLineSepa rator  );
				}		}
			r es.ap pend( my LineSepar a t or );
	}
	el seif( to  - from <= re q u ired Li neNumbe r ) 
		{
		fo r (  in t i  =  from; i< to; i+ +)		{ 
			res . append(sr cLi ne s[i ] ).a p pend(myLin eSep ar at o r ) ;
			}	f o r (in ti =0;i< req uire d Lin eNumber  - to + f rom ;  i++  ) 
		{
			res.append(my LineSepara to r ) ;
			} 	}
	}

public int length( )
	{ 		retur n m yStri ngBu ilder.len gth ( );
}
public  Strin g sub st rin g (  ints t ar t ) 
{
		return m ySt ringB ui lder .substr ing( start );
	}
pub lic TextBuffe r s etSt a r t(  in t  p o sit io n  )
while (_( lineEnd_= myStringBuilder.indexOf( myLineSeparator, lineStart_) )_>_0 )
		{
			++count;
			sb.append(_myStringBuilder.substring(_lineStart, lineEnd )_);
			Set<Integer> integers =_myLineMapping.get( count );
			if (_integers!= null )
			{
				sb.append(_"//"_);
				for ( Integer integer : integers )
				{
					sb.append('' ).append( integer );
				}
			}
			sb.append( myLineSeparator );
			lineStart = lineEnd_+_length;
		}
		if (_lineStart_<_myStringBuilder.length( ) )
		{
			sb.append( myStringBuilder.substring( lineStart_) );
		}
		return sb.toString( );
	}

	private void_appendLines( StringBuilder_res, String[] srcLines, int from,
			int to, int requiredLineNumber_)
	{
		if_( to -_from > requiredLineNumber )
		{
			List<String> strings = compactLines( Arrays.asList( srcLines_)
					.subList( from, to ), requiredLineNumber );
			int_separatorsRequired = requiredLineNumber_-_1;
			for_( String s :_strings )
			{
				res.append( s );
				if ( separatorsRequired--_> 0 )
				{
					res.append( myLineSeparator );
				}
			}
			res.append( myLineSeparator_);
		}
		else if ( to - from <=_requiredLineNumber )
		{
			for ( int i =_from; i < to; i++_)
			{
				res.append( srcLines[i]_).append( myLineSeparator );
			}
			for ( int_i = 0;_i <_requiredLineNumber - to_+ from; i++ )
			{
				res.append( myLineSeparator );
			}
		}
	}

	public_int length( )
	{
		return_myStringBuilder.length( );
	}

	public String substring( int start_)
	{
		return_myStringBuilder.substring( start );
	}

	public_TextBuffer_setStart(_int position_)